Skip to content

Commit 92d918d

Browse files
Damien Lespiaubradfitz
Damien Lespiau
authored andcommitted
cmd/internal/obj/x86: fix adcb r/mem8,reg8 encoding
Taken from the Intel Software Development Manual (of course, in the line below it's ADC DST, SRC; The opposite of the commit subject). 12 /r ADC r8, r/m8 We need 0x12 for the corresponding ytab line, not 0x10. {Ymb, Ynone, Yrb, Zm_r, 1}, Updates #14069 Change-Id: Id37cbd0c581c9988c2de355efa908956278e2189 Reviewed-on: https://go-review.googlesource.com/41857 Reviewed-by: Keith Randall <[email protected]>
1 parent 92607fd commit 92d918d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/cmd/asm/internal/asm/testdata/amd64enc.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0
8080
ADCQ (R11), DX // 491313
8181
ADCQ (BX), R11 // 4c131b
8282
ADCQ (R11), R11 // 4d131b
83-
//TODO: ADCB (BX), DL // 1213
84-
//TODO: ADCB (R11), DL // 411213
85-
//TODO: ADCB (BX), R11 // 44121b
86-
//TODO: ADCB (R11), R11 // 45121b
83+
ADCB (BX), DL // 1213
84+
ADCB (R11), DL // 411213
85+
ADCB (BX), R11 // 44121b
86+
ADCB (R11), R11 // 45121b
8787
//TODO: ADCXL (BX), DX // 660f38f613
8888
//TODO: ADCXL (R11), DX // 66410f38f613
8989
//TODO: ADCXL DX, DX // 660f38f6d2

src/cmd/internal/obj/x86/asm6.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ var optab =
945945
{AAAD, ynone, P32, [23]uint8{0xd5, 0x0a}},
946946
{AAAM, ynone, P32, [23]uint8{0xd4, 0x0a}},
947947
{AAAS, ynone, P32, [23]uint8{0x3f}},
948-
{AADCB, yxorb, Pb, [23]uint8{0x14, 0x80, 02, 0x10, 0x10}},
948+
{AADCB, yxorb, Pb, [23]uint8{0x14, 0x80, 02, 0x10, 0x12}},
949949
{AADCL, yaddl, Px, [23]uint8{0x83, 02, 0x15, 0x81, 02, 0x11, 0x13}},
950950
{AADCQ, yaddl, Pw, [23]uint8{0x83, 02, 0x15, 0x81, 02, 0x11, 0x13}},
951951
{AADCW, yaddl, Pe, [23]uint8{0x83, 02, 0x15, 0x81, 02, 0x11, 0x13}},

0 commit comments

Comments
 (0)