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

Unified Diff: src/cmd/8l/span.c

Issue 6846057: code review 6846057: cmd/8l: fix data corruption for MULB SI, (Closed)
Patch Set: diff -r d686006f8945 https://go.googlecode.com/hg/ Created 11 years, 4 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/6l/span.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/8l/span.c
===================================================================
--- a/src/cmd/8l/span.c
+++ b/src/cmd/8l/span.c
@@ -1272,7 +1272,9 @@
pp = *p;
z = p->from.type;
if(z >= D_BP && z <= D_DI) {
- if(isax(&p->to)) {
+ if(isax(&p->to) || p->to.type == D_NONE) {
+ // We certainly don't want to exchange
+ // with AX if the op is MUL or DIV.
*andptr++ = 0x87; /* xchg lhs,bx */
asmand(&p->from, reg[D_BX]);
subreg(&pp, z, D_BX);
« no previous file with comments | « src/cmd/6l/span.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