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

Unified Diff: src/cmd/8g/ggen.c

Issue 84400043: code review 84400043: cmd/6g, cmd/8g: disable Duff's device on NaCl. (Closed)
Patch Set: diff -r 8cd4598a3975 https://go.googlecode.com/hg/ Created 11 years ago
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/8g/cgen.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/8g/ggen.c
===================================================================
--- a/src/cmd/8g/ggen.c
+++ b/src/cmd/8g/ggen.c
@@ -75,7 +75,7 @@
for(i = 0; i < cnt; i += widthreg) {
p = appendpp(p, AMOVL, D_AX, 0, D_SP+D_INDIR, frame+lo+i);
}
- } else if(cnt <= 128*widthreg) {
+ } else if(!nacl && cnt <= 128*widthreg) {
p = appendpp(p, ALEAL, D_SP+D_INDIR, frame+lo, D_DI, 0);
p = appendpp(p, ADUFFZERO, D_NONE, 0, D_ADDR, 1*(128-cnt/widthreg));
p->to.sym = linksym(pkglookup("duffzero", runtimepkg));
@@ -176,7 +176,7 @@
agen(nl, &n1);
gconreg(AMOVL, 0, D_AX);
- if(q > 128) {
+ if(q > 128 || (q >= 4 && nacl)) {
gconreg(AMOVL, q, D_CX);
gins(AREP, N, N); // repeat
gins(ASTOSL, N, N); // STOL AL,*(DI)+
« no previous file with comments | « src/cmd/8g/cgen.c ('k') | no next file » | no next file with comments »

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