summaryrefslogtreecommitdiff
path: root/sys/src/cmd/6l
diff options
context:
space:
mode:
authorAram Hăvărneanu <aram@mgk.ro>2014-05-30 12:28:01 +0200
committerAram Hăvărneanu <aram@mgk.ro>2014-05-30 12:28:01 +0200
commitbf0d5c8abbe9d4e3a145df29bee8ef2758d01884 (patch)
tree19a0ae52aab138503e959b78be3f1ed89bd72fc0 /sys/src/cmd/6l
parent17d0dea87c80203aaf0199cb33dea0afc4a7f956 (diff)
6a, 6c, 6l: fix copy propagation
Without an explicit signal for a truncation, copy propagation will sometimes propagate a 32-bit truncation and end up overwriting uses of the original 64-bit value. This was independently discovered and fixed in Go. See: http://golang.org/issue/1315 https://codereview.appspot.com/6002043/ Thanks Charles Forsyth for tips and advice.
Diffstat (limited to 'sys/src/cmd/6l')
-rw-r--r--sys/src/cmd/6l/optab.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/src/cmd/6l/optab.c b/sys/src/cmd/6l/optab.c
index 133bb1d2f..c4243b6ca 100644
--- a/sys/src/cmd/6l/optab.c
+++ b/sys/src/cmd/6l/optab.c
@@ -772,6 +772,7 @@ Optab optab[] =
{ AMOVNTPS, yxr_ml, Pm, 0x2b },
{ AMOVNTQ, ymr_ml, Pm, 0xe7 },
{ AMOVQ, ymovq, Pw, 0x89,0x8b,0x31,0xc7,(00),0xb8,0xc7,(00),0x6f,0x7f,0x6e,0x7e,Pf2,0xd6,Pe,0xd6,Pe,0x6e,Pe,0x7e },
+ { AMOVQL, yrl_ml, Px, 0x89 },
{ AMOVQOZX, ymrxr, Pf3, 0xd6,0x7e },
{ AMOVSB, ynone, Pb, 0xa4 },
{ AMOVSD, yxmov, Pf2, 0x10,0x11 },