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

Side by Side Diff: src/cmd/6g/ggen.c

Issue 160200044: [dev.power64] code review 160200044: build: merge default into dev.power64 (Closed)
Patch Set: diff -r be0c14f62257b42485019e9e1db23cf40d2e249f https://code.google.com/p/go Created 10 years, 4 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/6g/gg.h ('k') | src/cmd/6g/gsubr.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 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 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 #undef EXTERN 5 #undef EXTERN
6 #define EXTERN 6 #define EXTERN
7 #include <u.h> 7 #include <u.h>
8 #include <libc.h> 8 #include <libc.h>
9 #include "gg.h" 9 #include "gg.h"
10 #include "opt.h" 10 #include "opt.h"
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 cgenr(nr, &n2, N); 936 cgenr(nr, &n2, N);
937 nodreg(&ax, t, D_AX); 937 nodreg(&ax, t, D_AX);
938 gmove(&n1, &ax); 938 gmove(&n1, &ax);
939 gins(a, &n2, N); 939 gins(a, &n2, N);
940 regfree(&n2); 940 regfree(&n2);
941 regfree(&n1); 941 regfree(&n1);
942 942
943 if(t->width == 1) { 943 if(t->width == 1) {
944 // byte multiply behaves differently. 944 // byte multiply behaves differently.
945 nodreg(&ax, t, D_AH); 945 nodreg(&ax, t, D_AH);
946 » » nodreg(&dx, t, D_DL); 946 » » nodreg(&dx, t, D_DX);
947 gmove(&ax, &dx); 947 gmove(&ax, &dx);
948 } 948 }
949 nodreg(&dx, t, D_DX); 949 nodreg(&dx, t, D_DX);
950 gmove(&dx, res); 950 gmove(&dx, res);
951 } 951 }
952 952
953 /* 953 /*
954 * generate shift according to op, one of: 954 * generate shift according to op, one of:
955 * res = nl << nr 955 * res = nl << nr
956 * res = nl >> nr 956 * res = nl >> nr
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 // which will be shorter to encode than plain 0. 1210 // which will be shorter to encode than plain 0.
1211 p2->as = AMOVL; 1211 p2->as = AMOVL;
1212 p2->from.type = D_AX; 1212 p2->from.type = D_AX;
1213 if(regtyp(&p->from)) 1213 if(regtyp(&p->from))
1214 p2->to.type = p->from.type + D_INDIR; 1214 p2->to.type = p->from.type + D_INDIR;
1215 else 1215 else
1216 p2->to.type = D_INDIR+D_NONE; 1216 p2->to.type = D_INDIR+D_NONE;
1217 p2->to.offset = 0; 1217 p2->to.offset = 0;
1218 } 1218 }
1219 } 1219 }
OLDNEW
« no previous file with comments | « src/cmd/6g/gg.h ('k') | src/cmd/6g/gsubr.c » ('j') | no next file with comments »

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