Skip to content

Commit 3394633

Browse files
committed
cmd/internal/obj: eliminate AMODE
AMODE appears to have been intended to allow a Prog to switch between 16 (!), 32, or 64 bit x86. It is unused anywhere in the tree. Passes toolstash-check -all. Updates golang#15756 Change-Id: Ic57b257cfe580f29dad81d97e4193bf3c330c598 Reviewed-on: https://go-review.googlesource.com/38445 Run-TryBot: Josh Bleecher Snyder <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Dave Cheney <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
1 parent 88d4ab8 commit 3394633

3 files changed

Lines changed: 0 additions & 13 deletions

File tree

src/cmd/internal/obj/x86/a.out.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,6 @@ const (
746746
ARETFQ
747747
ASWAPGS
748748

749-
AMODE
750749
ACRC32B
751750
ACRC32Q
752751
AIMUL3Q

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,6 @@ var Anames = []string{
687687
"RETFL",
688688
"RETFQ",
689689
"SWAPGS",
690-
"MODE",
691690
"CRC32B",
692691
"CRC32Q",
693692
"IMUL3Q",

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,6 @@ func progedit(ctxt *obj.Link, p *obj.Prog) {
7979
}
8080
p.Mode = int8(ctxt.Mode)
8181

82-
switch p.As {
83-
case AMODE:
84-
if p.From.Type == obj.TYPE_CONST || (p.From.Type == obj.TYPE_MEM && p.From.Reg == REG_NONE) {
85-
switch int(p.From.Offset) {
86-
case 16, 32, 64:
87-
ctxt.Mode = int(p.From.Offset)
88-
}
89-
}
90-
obj.Nopout(p)
91-
}
92-
9382
// Thread-local storage references use the TLS pseudo-register.
9483
// As a register, TLS refers to the thread-local storage base, and it
9584
// can only be loaded into another register:

0 commit comments

Comments
 (0)