Commit 3394633d authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

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 #15756

Change-Id: Ic57b257cfe580f29dad81d97e4193bf3c330c598
Reviewed-on: https://go-review.googlesource.com/38445
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarDave Cheney <dave@cheney.net>
Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
parent 88d4ab82
...@@ -746,7 +746,6 @@ const ( ...@@ -746,7 +746,6 @@ const (
ARETFQ ARETFQ
ASWAPGS ASWAPGS
AMODE
ACRC32B ACRC32B
ACRC32Q ACRC32Q
AIMUL3Q AIMUL3Q
......
...@@ -687,7 +687,6 @@ var Anames = []string{ ...@@ -687,7 +687,6 @@ var Anames = []string{
"RETFL", "RETFL",
"RETFQ", "RETFQ",
"SWAPGS", "SWAPGS",
"MODE",
"CRC32B", "CRC32B",
"CRC32Q", "CRC32Q",
"IMUL3Q", "IMUL3Q",
......
...@@ -79,17 +79,6 @@ func progedit(ctxt *obj.Link, p *obj.Prog) { ...@@ -79,17 +79,6 @@ func progedit(ctxt *obj.Link, p *obj.Prog) {
} }
p.Mode = int8(ctxt.Mode) p.Mode = int8(ctxt.Mode)
switch p.As {
case AMODE:
if p.From.Type == obj.TYPE_CONST || (p.From.Type == obj.TYPE_MEM && p.From.Reg == REG_NONE) {
switch int(p.From.Offset) {
case 16, 32, 64:
ctxt.Mode = int(p.From.Offset)
}
}
obj.Nopout(p)
}
// Thread-local storage references use the TLS pseudo-register. // Thread-local storage references use the TLS pseudo-register.
// As a register, TLS refers to the thread-local storage base, and it // As a register, TLS refers to the thread-local storage base, and it
// can only be loaded into another register: // can only be loaded into another register:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment