Skip to content

Commit

Permalink
cmd/internal/obj: rename MOVBE{LL,QQ,WW} to just MOVBE{L,Q,W}
Browse files Browse the repository at this point in the history
The double suffix doesn't seem to serve any purpose, and we can keep
the old spelling as a backwards compatible alias in cmd/asm.

Change-Id: I3f01fc7249fb093ac1b25bd75c1cb9f39b8f62a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/354700
Run-TryBot: Matthew Dempsky <[email protected]>
TryBot-Result: Go Bot <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Trust: Matthew Dempsky <[email protected]>
  • Loading branch information
mdempsky committed Oct 8, 2021
1 parent 7fcf9a1 commit 74abcab
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 33 deletions.
4 changes: 4 additions & 0 deletions src/cmd/asm/internal/arch/arch.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ func archX86(linkArch *obj.LinkArch) *Arch {
instructions["PSLLDQ"] = x86.APSLLO
instructions["PSRLDQ"] = x86.APSRLO
instructions["PADDD"] = x86.APADDL
// Spellings originally used in CL 97235.
instructions["MOVBELL"] = x86.AMOVBEL
instructions["MOVBEQQ"] = x86.AMOVBEQ
instructions["MOVBEWW"] = x86.AMOVBEW

return &Arch{
LinkArch: linkArch,
Expand Down
48 changes: 24 additions & 24 deletions src/cmd/asm/internal/asm/testdata/amd64enc.s
Original file line number Diff line number Diff line change
Expand Up @@ -2495,30 +2495,30 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0
MOVAPS X11, (BX) // 440f291b
MOVAPS X2, (R11) // 410f2913
MOVAPS X11, (R11) // 450f291b
MOVBEWW DX, (BX) // 660f38f113
MOVBEWW R11, (BX) // 66440f38f11b
MOVBEWW DX, (R11) // 66410f38f113
MOVBEWW R11, (R11) // 66450f38f11b
MOVBEWW (BX), DX // 660f38f013
MOVBEWW (R11), DX // 66410f38f013
MOVBEWW (BX), R11 // 66440f38f01b
MOVBEWW (R11), R11 // 66450f38f01b
MOVBELL DX, (BX) // 0f38f113
MOVBELL R11, (BX) // 440f38f11b
MOVBELL DX, (R11) // 410f38f113
MOVBELL R11, (R11) // 450f38f11b
MOVBELL (BX), DX // 0f38f013
MOVBELL (R11), DX // 410f38f013
MOVBELL (BX), R11 // 440f38f01b
MOVBELL (R11), R11 // 450f38f01b
MOVBEQQ DX, (BX) // 480f38f113
MOVBEQQ R11, (BX) // 4c0f38f11b
MOVBEQQ DX, (R11) // 490f38f113
MOVBEQQ R11, (R11) // 4d0f38f11b
MOVBEQQ (BX), DX // 480f38f013
MOVBEQQ (R11), DX // 490f38f013
MOVBEQQ (BX), R11 // 4c0f38f01b
MOVBEQQ (R11), R11 // 4d0f38f01b
MOVBEW DX, (BX) // 660f38f113
MOVBEW R11, (BX) // 66440f38f11b
MOVBEW DX, (R11) // 66410f38f113
MOVBEW R11, (R11) // 66450f38f11b
MOVBEW (BX), DX // 660f38f013
MOVBEW (R11), DX // 66410f38f013
MOVBEW (BX), R11 // 66440f38f01b
MOVBEW (R11), R11 // 66450f38f01b
MOVBEL DX, (BX) // 0f38f113
MOVBEL R11, (BX) // 440f38f11b
MOVBEL DX, (R11) // 410f38f113
MOVBEL R11, (R11) // 450f38f11b
MOVBEL (BX), DX // 0f38f013
MOVBEL (R11), DX // 410f38f013
MOVBEL (BX), R11 // 440f38f01b
MOVBEL (R11), R11 // 450f38f01b
MOVBEQ DX, (BX) // 480f38f113
MOVBEQ R11, (BX) // 4c0f38f11b
MOVBEQ DX, (R11) // 490f38f113
MOVBEQ R11, (R11) // 4d0f38f11b
MOVBEQ (BX), DX // 480f38f013
MOVBEQ (R11), DX // 490f38f013
MOVBEQ (BX), R11 // 4c0f38f01b
MOVBEQ (R11), R11 // 4d0f38f01b
MOVQ (BX), M2 // 0f6e13 or 0f6f13 or 480f6e13
MOVQ (R11), M2 // 410f6e13 or 410f6f13 or 490f6e13
MOVQ DX, M2 // 0f6ed2 or 480f6ed2
Expand Down
6 changes: 3 additions & 3 deletions src/cmd/internal/obj/x86/aenum.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/cmd/internal/obj/x86/anames.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/cmd/internal/obj/x86/asm6.go
Original file line number Diff line number Diff line change
Expand Up @@ -1735,9 +1735,9 @@ var optab =
{ASTRL, yincq, Px, opBytes{0x0f, 0x00, 01}},
{ASTRQ, yincq, Pw, opBytes{0x0f, 0x00, 01}},
{AXSETBV, ynone, Pm, opBytes{0x01, 0xd1, 0}},
{AMOVBEWW, ymovbe, Pq, opBytes{0x38, 0xf0, 0, 0x38, 0xf1, 0}},
{AMOVBELL, ymovbe, Pm, opBytes{0x38, 0xf0, 0, 0x38, 0xf1, 0}},
{AMOVBEQQ, ymovbe, Pw, opBytes{0x0f, 0x38, 0xf0, 0, 0x0f, 0x38, 0xf1, 0}},
{AMOVBEW, ymovbe, Pq, opBytes{0x38, 0xf0, 0, 0x38, 0xf1, 0}},
{AMOVBEL, ymovbe, Pm, opBytes{0x38, 0xf0, 0, 0x38, 0xf1, 0}},
{AMOVBEQ, ymovbe, Pw, opBytes{0x0f, 0x38, 0xf0, 0, 0x0f, 0x38, 0xf1, 0}},
{ANOPW, ydivl, Pe, opBytes{0x0f, 0x1f, 00}},
{ANOPL, ydivl, Px, opBytes{0x0f, 0x1f, 00}},
{ASLDTW, yincq, Pe, opBytes{0x0f, 0x00, 00}},
Expand Down

0 comments on commit 74abcab

Please sign in to comment.