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

Unified Diff: src/cmd/6g/peep.c

Issue 6819123: code review 6819123: cmd/gc: add division rewrite to walk pass. (Closed)
Patch Set: diff -r 538f0e9733bc https://go.googlecode.com/hg/ Created 11 years, 3 months 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/6g/ggen.c ('k') | src/cmd/8g/cgen.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/6g/peep.c
===================================================================
--- a/src/cmd/6g/peep.c
+++ b/src/cmd/6g/peep.c
@@ -536,8 +536,10 @@
p->as = ASHLQ;
break;
}
- } else {
- // explicit zero extension
+ } else if(p->from.type >= D_NONE) {
+ // explicit zero extension, but don't
+ // do that if source is a byte register
+ // (only AH can occur and it's forbidden).
switch(p->as) {
case AMOVB:
p->as = AMOVBQZX;
« no previous file with comments | « src/cmd/6g/ggen.c ('k') | src/cmd/8g/cgen.c » ('j') | no next file with comments »

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