Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3861)

Side by Side Diff: src/cmd/5g/prog.c

Issue 92760044: code review 92760044: runtime: use duff zero and copy to initialize memory (Closed)
Patch Set: diff -r a6cb2adc55eb https://khr%40golang.org@code.google.com/p/go/ Created 10 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/cmd/5g/peep.c ('k') | src/cmd/5g/reg.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Go Authors. All rights reserved. 1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 #include <u.h> 5 #include <u.h>
6 #include <libc.h> 6 #include <libc.h>
7 #include "gg.h" 7 #include "gg.h"
8 #include "opt.h" 8 #include "opt.h"
9 9
10 enum 10 enum
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 [AMOVDW]= {SizeL | LeftRead | RightWrite | Conv}, 86 [AMOVDW]= {SizeL | LeftRead | RightWrite | Conv},
87 [AMOVFD]= {SizeD | LeftRead | RightWrite | Conv}, 87 [AMOVFD]= {SizeD | LeftRead | RightWrite | Conv},
88 [AMOVFW]= {SizeL | LeftRead | RightWrite | Conv}, 88 [AMOVFW]= {SizeL | LeftRead | RightWrite | Conv},
89 89
90 // Moves. 90 // Moves.
91 [AMOVB]= {SizeB | LeftRead | RightWrite | Move}, 91 [AMOVB]= {SizeB | LeftRead | RightWrite | Move},
92 [AMOVD]= {SizeD | LeftRead | RightWrite | Move}, 92 [AMOVD]= {SizeD | LeftRead | RightWrite | Move},
93 [AMOVF]= {SizeF | LeftRead | RightWrite | Move}, 93 [AMOVF]= {SizeF | LeftRead | RightWrite | Move},
94 [AMOVH]= {SizeW | LeftRead | RightWrite | Move}, 94 [AMOVH]= {SizeW | LeftRead | RightWrite | Move},
95 [AMOVW]= {SizeL | LeftRead | RightWrite | Move}, 95 [AMOVW]= {SizeL | LeftRead | RightWrite | Move},
96 // In addtion, duffzero reads R0,R1 and writes R1. This fact is
97 // encoded in peep.c
98 [ADUFFZERO]= {Call},
99 // In addtion, duffcopy reads R1,R2 and writes R0,R1,R2. This fact is
100 // encoded in peep.c
101 [ADUFFCOPY]= {Call},
96 102
97 // These should be split into the two different conversions instead 103 // These should be split into the two different conversions instead
98 // of overloading the one. 104 // of overloading the one.
99 [AMOVBS]= {SizeB | LeftRead | RightWrite | Conv}, 105 [AMOVBS]= {SizeB | LeftRead | RightWrite | Conv},
100 [AMOVBU]= {SizeB | LeftRead | RightWrite | Conv}, 106 [AMOVBU]= {SizeB | LeftRead | RightWrite | Conv},
101 [AMOVHS]= {SizeW | LeftRead | RightWrite | Conv}, 107 [AMOVHS]= {SizeW | LeftRead | RightWrite | Conv},
102 [AMOVHU]= {SizeW | LeftRead | RightWrite | Conv}, 108 [AMOVHU]= {SizeW | LeftRead | RightWrite | Conv},
103 ········ 109 ········
104 // Jumps. 110 // Jumps.
105 [AB]= {Jump | Break}, 111 [AB]= {Jump | Break},
(...skipping 30 matching lines...) Expand all
136 } 142 }
137 143
138 if((info->flags & RegRead) && p->reg == NREG) { 144 if((info->flags & RegRead) && p->reg == NREG) {
139 info->flags &= ~RegRead; 145 info->flags &= ~RegRead;
140 info->flags |= CanRegRead | RightRead; 146 info->flags |= CanRegRead | RightRead;
141 } 147 }
142 ········ 148 ········
143 if(((p->scond & C_SCOND) != C_SCOND_NONE) && (info->flags & RightWrite)) 149 if(((p->scond & C_SCOND) != C_SCOND_NONE) && (info->flags & RightWrite))
144 info->flags |= RightRead; 150 info->flags |= RightRead;
145 } 151 }
OLDNEW
« no previous file with comments | « src/cmd/5g/peep.c ('k') | src/cmd/5g/reg.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b