Commit 8afb3967 authored by Russ Cox's avatar Russ Cox

cmd/8g, cmd/old8a: stop renaming x86 import to i386

Change-Id: If2872e73da4daa4ff1912883d30c8fc9754ef552
Reviewed-on: https://go-review.googlesource.com/6894Reviewed-by: default avatarRob Pike <r@golang.org>
parent 818eff03
...@@ -7,7 +7,7 @@ package main ...@@ -7,7 +7,7 @@ package main
import ( import (
"cmd/internal/gc" "cmd/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
i386 "cmd/internal/obj/x86" "cmd/internal/obj/x86"
"fmt" "fmt"
) )
...@@ -272,7 +272,7 @@ func cgen(n *gc.Node, res *gc.Node) { ...@@ -272,7 +272,7 @@ func cgen(n *gc.Node, res *gc.Node) {
gc.OMUL: gc.OMUL:
a = optoas(int(n.Op), nl.Type) a = optoas(int(n.Op), nl.Type)
if a == i386.AIMULB { if a == x86.AIMULB {
cgen_bmul(int(n.Op), nl, nr, res) cgen_bmul(int(n.Op), nl, nr, res)
break break
} }
...@@ -331,7 +331,7 @@ func cgen(n *gc.Node, res *gc.Node) { ...@@ -331,7 +331,7 @@ func cgen(n *gc.Node, res *gc.Node) {
if gc.Isconst(nl, gc.CTSTR) { if gc.Isconst(nl, gc.CTSTR) {
var n1 gc.Node var n1 gc.Node
regalloc(&n1, gc.Types[gc.Tptr], res) regalloc(&n1, gc.Types[gc.Tptr], res)
p1 := gins(i386.ALEAL, nil, &n1) p1 := gins(x86.ALEAL, nil, &n1)
gc.Datastring(nl.Val.U.Sval, &p1.From) gc.Datastring(nl.Val.U.Sval, &p1.From)
gmove(&n1, res) gmove(&n1, res)
regfree(&n1) regfree(&n1)
...@@ -529,9 +529,9 @@ func igenindex(n *gc.Node, res *gc.Node, bounded int) *obj.Prog { ...@@ -529,9 +529,9 @@ func igenindex(n *gc.Node, res *gc.Node, bounded int) *obj.Prog {
var zero gc.Node var zero gc.Node
gc.Nodconst(&zero, gc.Types[gc.TINT32], 0) gc.Nodconst(&zero, gc.Types[gc.TINT32], 0)
gins(i386.ACMPL, &hi, &zero) gins(x86.ACMPL, &hi, &zero)
splitclean() splitclean()
return gc.Gbranch(i386.AJNE, nil, +1) return gc.Gbranch(x86.AJNE, nil, +1)
} }
/* /*
...@@ -565,7 +565,7 @@ func agen(n *gc.Node, res *gc.Node) { ...@@ -565,7 +565,7 @@ func agen(n *gc.Node, res *gc.Node) {
clearfat(&n1) clearfat(&n1)
var n2 gc.Node var n2 gc.Node
regalloc(&n2, gc.Types[gc.Tptr], res) regalloc(&n2, gc.Types[gc.Tptr], res)
gins(i386.ALEAL, &n1, &n2) gins(x86.ALEAL, &n1, &n2)
gmove(&n2, res) gmove(&n2, res)
regfree(&n2) regfree(&n2)
return return
...@@ -578,7 +578,7 @@ func agen(n *gc.Node, res *gc.Node) { ...@@ -578,7 +578,7 @@ func agen(n *gc.Node, res *gc.Node) {
} }
var n1 gc.Node var n1 gc.Node
regalloc(&n1, gc.Types[gc.Tptr], res) regalloc(&n1, gc.Types[gc.Tptr], res)
gins(i386.ALEAL, n, &n1) gins(x86.ALEAL, n, &n1)
gmove(&n1, res) gmove(&n1, res)
regfree(&n1) regfree(&n1)
return return
...@@ -746,7 +746,7 @@ func agen(n *gc.Node, res *gc.Node) { ...@@ -746,7 +746,7 @@ func agen(n *gc.Node, res *gc.Node) {
if gc.Isconst(nl, gc.CTSTR) { if gc.Isconst(nl, gc.CTSTR) {
regalloc(&n3, gc.Types[gc.Tptr], res) regalloc(&n3, gc.Types[gc.Tptr], res)
p1 := gins(i386.ALEAL, nil, &n3) p1 := gins(x86.ALEAL, nil, &n3)
gc.Datastring(nl.Val.U.Sval, &p1.From) gc.Datastring(nl.Val.U.Sval, &p1.From)
p1.From.Scale = 1 p1.From.Scale = 1
p1.From.Index = n2.Val.U.Reg p1.From.Index = n2.Val.U.Reg
...@@ -769,7 +769,7 @@ func agen(n *gc.Node, res *gc.Node) { ...@@ -769,7 +769,7 @@ func agen(n *gc.Node, res *gc.Node) {
} else // nothing to do } else // nothing to do
if w == 1 || w == 2 || w == 4 || w == 8 { if w == 1 || w == 2 || w == 4 || w == 8 {
// LEAL (n3)(n2*w), n3 // LEAL (n3)(n2*w), n3
p1 := gins(i386.ALEAL, &n2, &n3) p1 := gins(x86.ALEAL, &n2, &n3)
p1.From.Scale = int16(w) p1.From.Scale = int16(w)
p1.From.Type = obj.TYPE_MEM p1.From.Type = obj.TYPE_MEM
...@@ -858,7 +858,7 @@ func igen(n *gc.Node, a *gc.Node, res *gc.Node) { ...@@ -858,7 +858,7 @@ func igen(n *gc.Node, a *gc.Node, res *gc.Node) {
// Increase the refcount of the register so that igen's caller // Increase the refcount of the register so that igen's caller
// has to call regfree. // has to call regfree.
case gc.OINDREG: case gc.OINDREG:
if n.Val.U.Reg != i386.REG_SP { if n.Val.U.Reg != x86.REG_SP {
reg[n.Val.U.Reg]++ reg[n.Val.U.Reg]++
} }
*a = *n *a = *n
...@@ -914,7 +914,7 @@ func igen(n *gc.Node, a *gc.Node, res *gc.Node) { ...@@ -914,7 +914,7 @@ func igen(n *gc.Node, a *gc.Node, res *gc.Node) {
fp := gc.Structfirst(&flist, gc.Getoutarg(n.Left.Type)) fp := gc.Structfirst(&flist, gc.Getoutarg(n.Left.Type))
*a = gc.Node{} *a = gc.Node{}
a.Op = gc.OINDREG a.Op = gc.OINDREG
a.Val.U.Reg = i386.REG_SP a.Val.U.Reg = x86.REG_SP
a.Addable = 1 a.Addable = 1
a.Xoffset = fp.Width a.Xoffset = fp.Width
a.Type = n.Type a.Type = n.Type
...@@ -1030,9 +1030,9 @@ func bgen(n *gc.Node, true_ bool, likely int, to *obj.Prog) { ...@@ -1030,9 +1030,9 @@ func bgen(n *gc.Node, true_ bool, likely int, to *obj.Prog) {
var n1 gc.Node var n1 gc.Node
gc.Nodconst(&n1, n.Type, 0) gc.Nodconst(&n1, n.Type, 0)
gins(optoas(gc.OCMP, n.Type), n, &n1) gins(optoas(gc.OCMP, n.Type), n, &n1)
a := i386.AJNE a := x86.AJNE
if !true_ { if !true_ {
a = i386.AJEQ a = x86.AJEQ
} }
gc.Patch(gc.Gbranch(a, n.Type, likely), to) gc.Patch(gc.Gbranch(a, n.Type, likely), to)
return return
...@@ -1228,9 +1228,9 @@ def: ...@@ -1228,9 +1228,9 @@ def:
var n2 gc.Node var n2 gc.Node
gc.Nodconst(&n2, n.Type, 0) gc.Nodconst(&n2, n.Type, 0)
gins(optoas(gc.OCMP, n.Type), &n1, &n2) gins(optoas(gc.OCMP, n.Type), &n1, &n2)
a := i386.AJNE a := x86.AJNE
if !true_ { if !true_ {
a = i386.AJEQ a = x86.AJEQ
} }
gc.Patch(gc.Gbranch(a, n.Type, likely), to) gc.Patch(gc.Gbranch(a, n.Type, likely), to)
regfree(&n1) regfree(&n1)
...@@ -1355,9 +1355,9 @@ func sgen(n *gc.Node, res *gc.Node, w int64) { ...@@ -1355,9 +1355,9 @@ func sgen(n *gc.Node, res *gc.Node, w int64) {
} }
var dst gc.Node var dst gc.Node
gc.Nodreg(&dst, gc.Types[gc.Tptr], i386.REG_DI) gc.Nodreg(&dst, gc.Types[gc.Tptr], x86.REG_DI)
var src gc.Node var src gc.Node
gc.Nodreg(&src, gc.Types[gc.Tptr], i386.REG_SI) gc.Nodreg(&src, gc.Types[gc.Tptr], x86.REG_SI)
var tsrc gc.Node var tsrc gc.Node
gc.Tempname(&tsrc, gc.Types[gc.Tptr]) gc.Tempname(&tsrc, gc.Types[gc.Tptr])
...@@ -1392,40 +1392,40 @@ func sgen(n *gc.Node, res *gc.Node, w int64) { ...@@ -1392,40 +1392,40 @@ func sgen(n *gc.Node, res *gc.Node, w int64) {
// the src and dst overlap, then reverse direction // the src and dst overlap, then reverse direction
if osrc < odst && int64(odst) < int64(osrc)+w { if osrc < odst && int64(odst) < int64(osrc)+w {
// reverse direction // reverse direction
gins(i386.ASTD, nil, nil) // set direction flag gins(x86.ASTD, nil, nil) // set direction flag
if c > 0 { if c > 0 {
gconreg(i386.AADDL, w-1, i386.REG_SI) gconreg(x86.AADDL, w-1, x86.REG_SI)
gconreg(i386.AADDL, w-1, i386.REG_DI) gconreg(x86.AADDL, w-1, x86.REG_DI)
gconreg(i386.AMOVL, int64(c), i386.REG_CX) gconreg(x86.AMOVL, int64(c), x86.REG_CX)
gins(i386.AREP, nil, nil) // repeat gins(x86.AREP, nil, nil) // repeat
gins(i386.AMOVSB, nil, nil) // MOVB *(SI)-,*(DI)- gins(x86.AMOVSB, nil, nil) // MOVB *(SI)-,*(DI)-
} }
if q > 0 { if q > 0 {
if c > 0 { if c > 0 {
gconreg(i386.AADDL, -3, i386.REG_SI) gconreg(x86.AADDL, -3, x86.REG_SI)
gconreg(i386.AADDL, -3, i386.REG_DI) gconreg(x86.AADDL, -3, x86.REG_DI)
} else { } else {
gconreg(i386.AADDL, w-4, i386.REG_SI) gconreg(x86.AADDL, w-4, x86.REG_SI)
gconreg(i386.AADDL, w-4, i386.REG_DI) gconreg(x86.AADDL, w-4, x86.REG_DI)
} }
gconreg(i386.AMOVL, int64(q), i386.REG_CX) gconreg(x86.AMOVL, int64(q), x86.REG_CX)
gins(i386.AREP, nil, nil) // repeat gins(x86.AREP, nil, nil) // repeat
gins(i386.AMOVSL, nil, nil) // MOVL *(SI)-,*(DI)- gins(x86.AMOVSL, nil, nil) // MOVL *(SI)-,*(DI)-
} }
// we leave with the flag clear // we leave with the flag clear
gins(i386.ACLD, nil, nil) gins(x86.ACLD, nil, nil)
} else { } else {
gins(i386.ACLD, nil, nil) // paranoia. TODO(rsc): remove? gins(x86.ACLD, nil, nil) // paranoia. TODO(rsc): remove?
// normal direction // normal direction
if q > 128 || (q >= 4 && gc.Nacl) { if q > 128 || (q >= 4 && gc.Nacl) {
gconreg(i386.AMOVL, int64(q), i386.REG_CX) gconreg(x86.AMOVL, int64(q), x86.REG_CX)
gins(i386.AREP, nil, nil) // repeat gins(x86.AREP, nil, nil) // repeat
gins(i386.AMOVSL, nil, nil) // MOVL *(SI)+,*(DI)+ gins(x86.AMOVSL, nil, nil) // MOVL *(SI)+,*(DI)+
} else if q >= 4 { } else if q >= 4 {
p := gins(obj.ADUFFCOPY, nil, nil) p := gins(obj.ADUFFCOPY, nil, nil)
p.To.Type = obj.TYPE_ADDR p.To.Type = obj.TYPE_ADDR
...@@ -1435,7 +1435,7 @@ func sgen(n *gc.Node, res *gc.Node, w int64) { ...@@ -1435,7 +1435,7 @@ func sgen(n *gc.Node, res *gc.Node, w int64) {
p.To.Offset = 10 * (128 - int64(q)) p.To.Offset = 10 * (128 - int64(q))
} else if !gc.Nacl && c == 0 { } else if !gc.Nacl && c == 0 {
var cx gc.Node var cx gc.Node
gc.Nodreg(&cx, gc.Types[gc.TINT32], i386.REG_CX) gc.Nodreg(&cx, gc.Types[gc.TINT32], x86.REG_CX)
// We don't need the MOVSL side-effect of updating SI and DI, // We don't need the MOVSL side-effect of updating SI and DI,
// and issuing a sequence of MOVLs directly is faster. // and issuing a sequence of MOVLs directly is faster.
...@@ -1451,13 +1451,13 @@ func sgen(n *gc.Node, res *gc.Node, w int64) { ...@@ -1451,13 +1451,13 @@ func sgen(n *gc.Node, res *gc.Node, w int64) {
} }
} else { } else {
for q > 0 { for q > 0 {
gins(i386.AMOVSL, nil, nil) // MOVL *(SI)+,*(DI)+ gins(x86.AMOVSL, nil, nil) // MOVL *(SI)+,*(DI)+
q-- q--
} }
} }
for c > 0 { for c > 0 {
gins(i386.AMOVSB, nil, nil) // MOVB *(SI)+,*(DI)+ gins(x86.AMOVSB, nil, nil) // MOVB *(SI)+,*(DI)+
c-- c--
} }
} }
......
...@@ -7,7 +7,7 @@ package main ...@@ -7,7 +7,7 @@ package main
import ( import (
"cmd/internal/gc" "cmd/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
i386 "cmd/internal/obj/x86" "cmd/internal/obj/x86"
) )
/* /*
...@@ -31,9 +31,9 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -31,9 +31,9 @@ func cgen64(n *gc.Node, res *gc.Node) {
var hi1 gc.Node var hi1 gc.Node
var lo1 gc.Node var lo1 gc.Node
split64(res, &lo1, &hi1) split64(res, &lo1, &hi1)
gins(i386.ANEGL, nil, &lo1) gins(x86.ANEGL, nil, &lo1)
gins(i386.AADCL, ncon(0), &hi1) gins(x86.AADCL, ncon(0), &hi1)
gins(i386.ANEGL, nil, &hi1) gins(x86.ANEGL, nil, &hi1)
splitclean() splitclean()
return return
...@@ -42,8 +42,8 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -42,8 +42,8 @@ func cgen64(n *gc.Node, res *gc.Node) {
var lo1 gc.Node var lo1 gc.Node
var hi1 gc.Node var hi1 gc.Node
split64(res, &lo1, &hi1) split64(res, &lo1, &hi1)
gins(i386.ANOTL, nil, &lo1) gins(x86.ANOTL, nil, &lo1)
gins(i386.ANOTL, nil, &hi1) gins(x86.ANOTL, nil, &hi1)
splitclean() splitclean()
return return
...@@ -78,11 +78,11 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -78,11 +78,11 @@ func cgen64(n *gc.Node, res *gc.Node) {
} }
var ax gc.Node var ax gc.Node
gc.Nodreg(&ax, gc.Types[gc.TINT32], i386.REG_AX) gc.Nodreg(&ax, gc.Types[gc.TINT32], x86.REG_AX)
var cx gc.Node var cx gc.Node
gc.Nodreg(&cx, gc.Types[gc.TINT32], i386.REG_CX) gc.Nodreg(&cx, gc.Types[gc.TINT32], x86.REG_CX)
var dx gc.Node var dx gc.Node
gc.Nodreg(&dx, gc.Types[gc.TINT32], i386.REG_DX) gc.Nodreg(&dx, gc.Types[gc.TINT32], x86.REG_DX)
// Setup for binary operation. // Setup for binary operation.
var hi1 gc.Node var hi1 gc.Node
...@@ -99,19 +99,19 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -99,19 +99,19 @@ func cgen64(n *gc.Node, res *gc.Node) {
switch n.Op { switch n.Op {
// TODO: Constants // TODO: Constants
case gc.OADD: case gc.OADD:
gins(i386.AMOVL, &lo1, &ax) gins(x86.AMOVL, &lo1, &ax)
gins(i386.AMOVL, &hi1, &dx) gins(x86.AMOVL, &hi1, &dx)
gins(i386.AADDL, &lo2, &ax) gins(x86.AADDL, &lo2, &ax)
gins(i386.AADCL, &hi2, &dx) gins(x86.AADCL, &hi2, &dx)
// TODO: Constants. // TODO: Constants.
case gc.OSUB: case gc.OSUB:
gins(i386.AMOVL, &lo1, &ax) gins(x86.AMOVL, &lo1, &ax)
gins(i386.AMOVL, &hi1, &dx) gins(x86.AMOVL, &hi1, &dx)
gins(i386.ASUBL, &lo2, &ax) gins(x86.ASUBL, &lo2, &ax)
gins(i386.ASBBL, &hi2, &dx) gins(x86.ASBBL, &hi2, &dx)
// let's call the next two EX and FX. // let's call the next two EX and FX.
case gc.OMUL: case gc.OMUL:
...@@ -122,30 +122,30 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -122,30 +122,30 @@ func cgen64(n *gc.Node, res *gc.Node) {
regalloc(&fx, gc.Types[gc.TPTR32], nil) regalloc(&fx, gc.Types[gc.TPTR32], nil)
// load args into DX:AX and EX:CX. // load args into DX:AX and EX:CX.
gins(i386.AMOVL, &lo1, &ax) gins(x86.AMOVL, &lo1, &ax)
gins(i386.AMOVL, &hi1, &dx) gins(x86.AMOVL, &hi1, &dx)
gins(i386.AMOVL, &lo2, &cx) gins(x86.AMOVL, &lo2, &cx)
gins(i386.AMOVL, &hi2, &ex) gins(x86.AMOVL, &hi2, &ex)
// if DX and EX are zero, use 32 x 32 -> 64 unsigned multiply. // if DX and EX are zero, use 32 x 32 -> 64 unsigned multiply.
gins(i386.AMOVL, &dx, &fx) gins(x86.AMOVL, &dx, &fx)
gins(i386.AORL, &ex, &fx) gins(x86.AORL, &ex, &fx)
p1 := gc.Gbranch(i386.AJNE, nil, 0) p1 := gc.Gbranch(x86.AJNE, nil, 0)
gins(i386.AMULL, &cx, nil) // implicit &ax gins(x86.AMULL, &cx, nil) // implicit &ax
p2 := gc.Gbranch(obj.AJMP, nil, 0) p2 := gc.Gbranch(obj.AJMP, nil, 0)
gc.Patch(p1, gc.Pc) gc.Patch(p1, gc.Pc)
// full 64x64 -> 64, from 32x32 -> 64. // full 64x64 -> 64, from 32x32 -> 64.
gins(i386.AIMULL, &cx, &dx) gins(x86.AIMULL, &cx, &dx)
gins(i386.AMOVL, &ax, &fx) gins(x86.AMOVL, &ax, &fx)
gins(i386.AIMULL, &ex, &fx) gins(x86.AIMULL, &ex, &fx)
gins(i386.AADDL, &dx, &fx) gins(x86.AADDL, &dx, &fx)
gins(i386.AMOVL, &cx, &dx) gins(x86.AMOVL, &cx, &dx)
gins(i386.AMULL, &dx, nil) // implicit &ax gins(x86.AMULL, &dx, nil) // implicit &ax
gins(i386.AADDL, &fx, &dx) gins(x86.AADDL, &fx, &dx)
gc.Patch(p2, gc.Pc) gc.Patch(p2, gc.Pc)
regfree(&ex) regfree(&ex)
...@@ -168,22 +168,22 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -168,22 +168,22 @@ func cgen64(n *gc.Node, res *gc.Node) {
// reverse during load to do the first 32 bits of rotate // reverse during load to do the first 32 bits of rotate
v -= 32 v -= 32
gins(i386.AMOVL, &lo1, &dx) gins(x86.AMOVL, &lo1, &dx)
gins(i386.AMOVL, &hi1, &ax) gins(x86.AMOVL, &hi1, &ax)
} else { } else {
gins(i386.AMOVL, &lo1, &ax) gins(x86.AMOVL, &lo1, &ax)
gins(i386.AMOVL, &hi1, &dx) gins(x86.AMOVL, &hi1, &dx)
} }
if v == 0 { if v == 0 {
} else // done } else // done
{ {
gins(i386.AMOVL, &dx, &cx) gins(x86.AMOVL, &dx, &cx)
p1 := gins(i386.ASHLL, ncon(uint32(v)), &dx) p1 := gins(x86.ASHLL, ncon(uint32(v)), &dx)
p1.From.Index = i386.REG_AX // double-width shift p1.From.Index = x86.REG_AX // double-width shift
p1.From.Scale = 0 p1.From.Scale = 0
p1 = gins(i386.ASHLL, ncon(uint32(v)), &ax) p1 = gins(x86.ASHLL, ncon(uint32(v)), &ax)
p1.From.Index = i386.REG_CX // double-width shift p1.From.Index = x86.REG_CX // double-width shift
p1.From.Scale = 0 p1.From.Scale = 0
} }
...@@ -196,8 +196,8 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -196,8 +196,8 @@ func cgen64(n *gc.Node, res *gc.Node) {
} }
splitclean() splitclean()
split64(res, &lo2, &hi2) split64(res, &lo2, &hi2)
gins(i386.AMOVL, ncon(0), &lo2) gins(x86.AMOVL, ncon(0), &lo2)
gins(i386.AMOVL, ncon(0), &hi2) gins(x86.AMOVL, ncon(0), &hi2)
splitclean() splitclean()
return return
} }
...@@ -209,71 +209,71 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -209,71 +209,71 @@ func cgen64(n *gc.Node, res *gc.Node) {
split64(res, &lo2, &hi2) split64(res, &lo2, &hi2)
gmove(&lo1, &hi2) gmove(&lo1, &hi2)
if v > 32 { if v > 32 {
gins(i386.ASHLL, ncon(uint32(v-32)), &hi2) gins(x86.ASHLL, ncon(uint32(v-32)), &hi2)
} }
gins(i386.AMOVL, ncon(0), &lo2) gins(x86.AMOVL, ncon(0), &lo2)
splitclean() splitclean()
splitclean() splitclean()
return return
} }
// general shift // general shift
gins(i386.AMOVL, &lo1, &ax) gins(x86.AMOVL, &lo1, &ax)
gins(i386.AMOVL, &hi1, &dx) gins(x86.AMOVL, &hi1, &dx)
p1 := gins(i386.ASHLL, ncon(uint32(v)), &dx) p1 := gins(x86.ASHLL, ncon(uint32(v)), &dx)
p1.From.Index = i386.REG_AX // double-width shift p1.From.Index = x86.REG_AX // double-width shift
p1.From.Scale = 0 p1.From.Scale = 0
gins(i386.ASHLL, ncon(uint32(v)), &ax) gins(x86.ASHLL, ncon(uint32(v)), &ax)
break break
} }
// load value into DX:AX. // load value into DX:AX.
gins(i386.AMOVL, &lo1, &ax) gins(x86.AMOVL, &lo1, &ax)
gins(i386.AMOVL, &hi1, &dx) gins(x86.AMOVL, &hi1, &dx)
// load shift value into register. // load shift value into register.
// if high bits are set, zero value. // if high bits are set, zero value.
var p1 *obj.Prog var p1 *obj.Prog
if gc.Is64(r.Type) { if gc.Is64(r.Type) {
gins(i386.ACMPL, &hi2, ncon(0)) gins(x86.ACMPL, &hi2, ncon(0))
p1 = gc.Gbranch(i386.AJNE, nil, +1) p1 = gc.Gbranch(x86.AJNE, nil, +1)
gins(i386.AMOVL, &lo2, &cx) gins(x86.AMOVL, &lo2, &cx)
} else { } else {
cx.Type = gc.Types[gc.TUINT32] cx.Type = gc.Types[gc.TUINT32]
gmove(r, &cx) gmove(r, &cx)
} }
// if shift count is >=64, zero value // if shift count is >=64, zero value
gins(i386.ACMPL, &cx, ncon(64)) gins(x86.ACMPL, &cx, ncon(64))
p2 := gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT32]), nil, +1) p2 := gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT32]), nil, +1)
if p1 != nil { if p1 != nil {
gc.Patch(p1, gc.Pc) gc.Patch(p1, gc.Pc)
} }
gins(i386.AXORL, &dx, &dx) gins(x86.AXORL, &dx, &dx)
gins(i386.AXORL, &ax, &ax) gins(x86.AXORL, &ax, &ax)
gc.Patch(p2, gc.Pc) gc.Patch(p2, gc.Pc)
// if shift count is >= 32, zero low. // if shift count is >= 32, zero low.
gins(i386.ACMPL, &cx, ncon(32)) gins(x86.ACMPL, &cx, ncon(32))
p1 = gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT32]), nil, +1) p1 = gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT32]), nil, +1)
gins(i386.AMOVL, &ax, &dx) gins(x86.AMOVL, &ax, &dx)
gins(i386.ASHLL, &cx, &dx) // SHLL only uses bottom 5 bits of count gins(x86.ASHLL, &cx, &dx) // SHLL only uses bottom 5 bits of count
gins(i386.AXORL, &ax, &ax) gins(x86.AXORL, &ax, &ax)
p2 = gc.Gbranch(obj.AJMP, nil, 0) p2 = gc.Gbranch(obj.AJMP, nil, 0)
gc.Patch(p1, gc.Pc) gc.Patch(p1, gc.Pc)
// general shift // general shift
p1 = gins(i386.ASHLL, &cx, &dx) p1 = gins(x86.ASHLL, &cx, &dx)
p1.From.Index = i386.REG_AX // double-width shift p1.From.Index = x86.REG_AX // double-width shift
p1.From.Scale = 0 p1.From.Scale = 0
gins(i386.ASHLL, &cx, &ax) gins(x86.ASHLL, &cx, &ax)
gc.Patch(p2, gc.Pc) gc.Patch(p2, gc.Pc)
case gc.ORSH: case gc.ORSH:
...@@ -287,12 +287,12 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -287,12 +287,12 @@ func cgen64(n *gc.Node, res *gc.Node) {
split64(res, &lo2, &hi2) split64(res, &lo2, &hi2)
if hi1.Type.Etype == gc.TINT32 { if hi1.Type.Etype == gc.TINT32 {
gmove(&hi1, &lo2) gmove(&hi1, &lo2)
gins(i386.ASARL, ncon(31), &lo2) gins(x86.ASARL, ncon(31), &lo2)
gmove(&hi1, &hi2) gmove(&hi1, &hi2)
gins(i386.ASARL, ncon(31), &hi2) gins(x86.ASARL, ncon(31), &hi2)
} else { } else {
gins(i386.AMOVL, ncon(0), &lo2) gins(x86.AMOVL, ncon(0), &lo2)
gins(i386.AMOVL, ncon(0), &hi2) gins(x86.AMOVL, ncon(0), &hi2)
} }
splitclean() splitclean()
...@@ -310,9 +310,9 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -310,9 +310,9 @@ func cgen64(n *gc.Node, res *gc.Node) {
} }
if hi1.Type.Etype == gc.TINT32 { if hi1.Type.Etype == gc.TINT32 {
gmove(&hi1, &hi2) gmove(&hi1, &hi2)
gins(i386.ASARL, ncon(31), &hi2) gins(x86.ASARL, ncon(31), &hi2)
} else { } else {
gins(i386.AMOVL, ncon(0), &hi2) gins(x86.AMOVL, ncon(0), &hi2)
} }
splitclean() splitclean()
splitclean() splitclean()
...@@ -320,71 +320,71 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -320,71 +320,71 @@ func cgen64(n *gc.Node, res *gc.Node) {
} }
// general shift // general shift
gins(i386.AMOVL, &lo1, &ax) gins(x86.AMOVL, &lo1, &ax)
gins(i386.AMOVL, &hi1, &dx) gins(x86.AMOVL, &hi1, &dx)
p1 := gins(i386.ASHRL, ncon(uint32(v)), &ax) p1 := gins(x86.ASHRL, ncon(uint32(v)), &ax)
p1.From.Index = i386.REG_DX // double-width shift p1.From.Index = x86.REG_DX // double-width shift
p1.From.Scale = 0 p1.From.Scale = 0
gins(optoas(gc.ORSH, hi1.Type), ncon(uint32(v)), &dx) gins(optoas(gc.ORSH, hi1.Type), ncon(uint32(v)), &dx)
break break
} }
// load value into DX:AX. // load value into DX:AX.
gins(i386.AMOVL, &lo1, &ax) gins(x86.AMOVL, &lo1, &ax)
gins(i386.AMOVL, &hi1, &dx) gins(x86.AMOVL, &hi1, &dx)
// load shift value into register. // load shift value into register.
// if high bits are set, zero value. // if high bits are set, zero value.
var p1 *obj.Prog var p1 *obj.Prog
if gc.Is64(r.Type) { if gc.Is64(r.Type) {
gins(i386.ACMPL, &hi2, ncon(0)) gins(x86.ACMPL, &hi2, ncon(0))
p1 = gc.Gbranch(i386.AJNE, nil, +1) p1 = gc.Gbranch(x86.AJNE, nil, +1)
gins(i386.AMOVL, &lo2, &cx) gins(x86.AMOVL, &lo2, &cx)
} else { } else {
cx.Type = gc.Types[gc.TUINT32] cx.Type = gc.Types[gc.TUINT32]
gmove(r, &cx) gmove(r, &cx)
} }
// if shift count is >=64, zero or sign-extend value // if shift count is >=64, zero or sign-extend value
gins(i386.ACMPL, &cx, ncon(64)) gins(x86.ACMPL, &cx, ncon(64))
p2 := gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT32]), nil, +1) p2 := gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT32]), nil, +1)
if p1 != nil { if p1 != nil {
gc.Patch(p1, gc.Pc) gc.Patch(p1, gc.Pc)
} }
if hi1.Type.Etype == gc.TINT32 { if hi1.Type.Etype == gc.TINT32 {
gins(i386.ASARL, ncon(31), &dx) gins(x86.ASARL, ncon(31), &dx)
gins(i386.AMOVL, &dx, &ax) gins(x86.AMOVL, &dx, &ax)
} else { } else {
gins(i386.AXORL, &dx, &dx) gins(x86.AXORL, &dx, &dx)
gins(i386.AXORL, &ax, &ax) gins(x86.AXORL, &ax, &ax)
} }
gc.Patch(p2, gc.Pc) gc.Patch(p2, gc.Pc)
// if shift count is >= 32, sign-extend hi. // if shift count is >= 32, sign-extend hi.
gins(i386.ACMPL, &cx, ncon(32)) gins(x86.ACMPL, &cx, ncon(32))
p1 = gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT32]), nil, +1) p1 = gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT32]), nil, +1)
gins(i386.AMOVL, &dx, &ax) gins(x86.AMOVL, &dx, &ax)
if hi1.Type.Etype == gc.TINT32 { if hi1.Type.Etype == gc.TINT32 {
gins(i386.ASARL, &cx, &ax) // SARL only uses bottom 5 bits of count gins(x86.ASARL, &cx, &ax) // SARL only uses bottom 5 bits of count
gins(i386.ASARL, ncon(31), &dx) gins(x86.ASARL, ncon(31), &dx)
} else { } else {
gins(i386.ASHRL, &cx, &ax) gins(x86.ASHRL, &cx, &ax)
gins(i386.AXORL, &dx, &dx) gins(x86.AXORL, &dx, &dx)
} }
p2 = gc.Gbranch(obj.AJMP, nil, 0) p2 = gc.Gbranch(obj.AJMP, nil, 0)
gc.Patch(p1, gc.Pc) gc.Patch(p1, gc.Pc)
// general shift // general shift
p1 = gins(i386.ASHRL, &cx, &ax) p1 = gins(x86.ASHRL, &cx, &ax)
p1.From.Index = i386.REG_DX // double-width shift p1.From.Index = x86.REG_DX // double-width shift
p1.From.Scale = 0 p1.From.Scale = 0
gins(optoas(gc.ORSH, hi1.Type), &cx, &dx) gins(optoas(gc.ORSH, hi1.Type), &cx, &dx)
gc.Patch(p2, gc.Pc) gc.Patch(p2, gc.Pc)
...@@ -414,10 +414,10 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -414,10 +414,10 @@ func cgen64(n *gc.Node, res *gc.Node) {
break break
case 0xffffffff: case 0xffffffff:
gins(i386.ANOTL, nil, &lo2) gins(x86.ANOTL, nil, &lo2)
default: default:
gins(i386.AXORL, ncon(lv), &lo2) gins(x86.AXORL, ncon(lv), &lo2)
} }
switch hv { switch hv {
...@@ -425,32 +425,32 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -425,32 +425,32 @@ func cgen64(n *gc.Node, res *gc.Node) {
break break
case 0xffffffff: case 0xffffffff:
gins(i386.ANOTL, nil, &hi2) gins(x86.ANOTL, nil, &hi2)
default: default:
gins(i386.AXORL, ncon(hv), &hi2) gins(x86.AXORL, ncon(hv), &hi2)
} }
case gc.OAND: case gc.OAND:
switch lv { switch lv {
case 0: case 0:
gins(i386.AMOVL, ncon(0), &lo2) gins(x86.AMOVL, ncon(0), &lo2)
default: default:
gmove(&lo1, &lo2) gmove(&lo1, &lo2)
if lv != 0xffffffff { if lv != 0xffffffff {
gins(i386.AANDL, ncon(lv), &lo2) gins(x86.AANDL, ncon(lv), &lo2)
} }
} }
switch hv { switch hv {
case 0: case 0:
gins(i386.AMOVL, ncon(0), &hi2) gins(x86.AMOVL, ncon(0), &hi2)
default: default:
gmove(&hi1, &hi2) gmove(&hi1, &hi2)
if hv != 0xffffffff { if hv != 0xffffffff {
gins(i386.AANDL, ncon(hv), &hi2) gins(x86.AANDL, ncon(hv), &hi2)
} }
} }
...@@ -460,11 +460,11 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -460,11 +460,11 @@ func cgen64(n *gc.Node, res *gc.Node) {
gmove(&lo1, &lo2) gmove(&lo1, &lo2)
case 0xffffffff: case 0xffffffff:
gins(i386.AMOVL, ncon(0xffffffff), &lo2) gins(x86.AMOVL, ncon(0xffffffff), &lo2)
default: default:
gmove(&lo1, &lo2) gmove(&lo1, &lo2)
gins(i386.AORL, ncon(lv), &lo2) gins(x86.AORL, ncon(lv), &lo2)
} }
switch hv { switch hv {
...@@ -472,11 +472,11 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -472,11 +472,11 @@ func cgen64(n *gc.Node, res *gc.Node) {
gmove(&hi1, &hi2) gmove(&hi1, &hi2)
case 0xffffffff: case 0xffffffff:
gins(i386.AMOVL, ncon(0xffffffff), &hi2) gins(x86.AMOVL, ncon(0xffffffff), &hi2)
default: default:
gmove(&hi1, &hi2) gmove(&hi1, &hi2)
gins(i386.AORL, ncon(hv), &hi2) gins(x86.AORL, ncon(hv), &hi2)
} }
} }
...@@ -485,8 +485,8 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -485,8 +485,8 @@ func cgen64(n *gc.Node, res *gc.Node) {
return return
} }
gins(i386.AMOVL, &lo1, &ax) gins(x86.AMOVL, &lo1, &ax)
gins(i386.AMOVL, &hi1, &dx) gins(x86.AMOVL, &hi1, &dx)
gins(optoas(int(n.Op), lo1.Type), &lo2, &ax) gins(optoas(int(n.Op), lo1.Type), &lo2, &ax)
gins(optoas(int(n.Op), lo1.Type), &hi2, &dx) gins(optoas(int(n.Op), lo1.Type), &hi2, &dx)
} }
...@@ -497,8 +497,8 @@ func cgen64(n *gc.Node, res *gc.Node) { ...@@ -497,8 +497,8 @@ func cgen64(n *gc.Node, res *gc.Node) {
splitclean() splitclean()
split64(res, &lo1, &hi1) split64(res, &lo1, &hi1)
gins(i386.AMOVL, &ax, &lo1) gins(x86.AMOVL, &ax, &lo1)
gins(i386.AMOVL, &dx, &hi1) gins(x86.AMOVL, &dx, &hi1)
splitclean() splitclean()
} }
...@@ -521,11 +521,11 @@ func cmp64(nl *gc.Node, nr *gc.Node, op int, likely int, to *obj.Prog) { ...@@ -521,11 +521,11 @@ func cmp64(nl *gc.Node, nr *gc.Node, op int, likely int, to *obj.Prog) {
t := hi1.Type t := hi1.Type
if nl.Op == gc.OLITERAL || nr.Op == gc.OLITERAL { if nl.Op == gc.OLITERAL || nr.Op == gc.OLITERAL {
gins(i386.ACMPL, &hi1, &hi2) gins(x86.ACMPL, &hi1, &hi2)
} else { } else {
regalloc(&rr, gc.Types[gc.TINT32], nil) regalloc(&rr, gc.Types[gc.TINT32], nil)
gins(i386.AMOVL, &hi1, &rr) gins(x86.AMOVL, &hi1, &rr)
gins(i386.ACMPL, &rr, &hi2) gins(x86.ACMPL, &rr, &hi2)
regfree(&rr) regfree(&rr)
} }
...@@ -540,14 +540,14 @@ func cmp64(nl *gc.Node, nr *gc.Node, op int, likely int, to *obj.Prog) { ...@@ -540,14 +540,14 @@ func cmp64(nl *gc.Node, nr *gc.Node, op int, likely int, to *obj.Prog) {
// jeq to // jeq to
// L: // L:
case gc.OEQ: case gc.OEQ:
br = gc.Gbranch(i386.AJNE, nil, -likely) br = gc.Gbranch(x86.AJNE, nil, -likely)
// cmp hi // cmp hi
// jne to // jne to
// cmp lo // cmp lo
// jne to // jne to
case gc.ONE: case gc.ONE:
gc.Patch(gc.Gbranch(i386.AJNE, nil, likely), to) gc.Patch(gc.Gbranch(x86.AJNE, nil, likely), to)
// cmp hi // cmp hi
// jgt to // jgt to
...@@ -578,11 +578,11 @@ func cmp64(nl *gc.Node, nr *gc.Node, op int, likely int, to *obj.Prog) { ...@@ -578,11 +578,11 @@ func cmp64(nl *gc.Node, nr *gc.Node, op int, likely int, to *obj.Prog) {
t = lo1.Type t = lo1.Type
if nl.Op == gc.OLITERAL || nr.Op == gc.OLITERAL { if nl.Op == gc.OLITERAL || nr.Op == gc.OLITERAL {
gins(i386.ACMPL, &lo1, &lo2) gins(x86.ACMPL, &lo1, &lo2)
} else { } else {
regalloc(&rr, gc.Types[gc.TINT32], nil) regalloc(&rr, gc.Types[gc.TINT32], nil)
gins(i386.AMOVL, &lo1, &rr) gins(x86.AMOVL, &lo1, &rr)
gins(i386.ACMPL, &rr, &lo2) gins(x86.ACMPL, &rr, &lo2)
regfree(&rr) regfree(&rr)
} }
......
...@@ -7,14 +7,14 @@ package main ...@@ -7,14 +7,14 @@ package main
import ( import (
"cmd/internal/gc" "cmd/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
i386 "cmd/internal/obj/x86" "cmd/internal/obj/x86"
) )
var thechar int = '8' var thechar int = '8'
var thestring string = "386" var thestring string = "386"
var thelinkarch *obj.LinkArch = &i386.Link386 var thelinkarch *obj.LinkArch = &x86.Link386
func linkarchinit() { func linkarchinit() {
} }
...@@ -43,8 +43,8 @@ func main() { ...@@ -43,8 +43,8 @@ func main() {
gc.Thearch.Thestring = thestring gc.Thearch.Thestring = thestring
gc.Thearch.Thelinkarch = thelinkarch gc.Thearch.Thelinkarch = thelinkarch
gc.Thearch.Typedefs = typedefs gc.Thearch.Typedefs = typedefs
gc.Thearch.REGSP = i386.REGSP gc.Thearch.REGSP = x86.REGSP
gc.Thearch.REGCTXT = i386.REGCTXT gc.Thearch.REGCTXT = x86.REGCTXT
gc.Thearch.MAXWIDTH = MAXWIDTH gc.Thearch.MAXWIDTH = MAXWIDTH
gc.Thearch.Anyregalloc = anyregalloc gc.Thearch.Anyregalloc = anyregalloc
gc.Thearch.Betypeinit = betypeinit gc.Thearch.Betypeinit = betypeinit
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
package main package main
import i386 "cmd/internal/obj/x86" import "cmd/internal/obj/x86"
import "cmd/internal/gc" import "cmd/internal/gc"
// TODO(rsc): // TODO(rsc):
...@@ -21,7 +21,7 @@ const ( ...@@ -21,7 +21,7 @@ const (
Fpop2 = 1 << 2 Fpop2 = 1 << 2
) )
var reg [i386.MAXREG]uint8 var reg [x86.MAXREG]uint8
var panicdiv *gc.Node var panicdiv *gc.Node
......
...@@ -7,7 +7,7 @@ package main ...@@ -7,7 +7,7 @@ package main
import ( import (
"cmd/internal/gc" "cmd/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
i386 "cmd/internal/obj/x86" "cmd/internal/obj/x86"
) )
func defframe(ptxt *obj.Prog) { func defframe(ptxt *obj.Prog) {
...@@ -65,23 +65,23 @@ func zerorange(p *obj.Prog, frame int64, lo int64, hi int64, ax *uint32) *obj.Pr ...@@ -65,23 +65,23 @@ func zerorange(p *obj.Prog, frame int64, lo int64, hi int64, ax *uint32) *obj.Pr
return p return p
} }
if *ax == 0 { if *ax == 0 {
p = appendpp(p, i386.AMOVL, obj.TYPE_CONST, 0, 0, obj.TYPE_REG, i386.REG_AX, 0) p = appendpp(p, x86.AMOVL, obj.TYPE_CONST, 0, 0, obj.TYPE_REG, x86.REG_AX, 0)
*ax = 1 *ax = 1
} }
if cnt <= int64(4*gc.Widthreg) { if cnt <= int64(4*gc.Widthreg) {
for i := int64(0); i < cnt; i += int64(gc.Widthreg) { for i := int64(0); i < cnt; i += int64(gc.Widthreg) {
p = appendpp(p, i386.AMOVL, obj.TYPE_REG, i386.REG_AX, 0, obj.TYPE_MEM, i386.REG_SP, frame+lo+i) p = appendpp(p, x86.AMOVL, obj.TYPE_REG, x86.REG_AX, 0, obj.TYPE_MEM, x86.REG_SP, frame+lo+i)
} }
} else if !gc.Nacl && cnt <= int64(128*gc.Widthreg) { } else if !gc.Nacl && cnt <= int64(128*gc.Widthreg) {
p = appendpp(p, i386.ALEAL, obj.TYPE_MEM, i386.REG_SP, frame+lo, obj.TYPE_REG, i386.REG_DI, 0) p = appendpp(p, x86.ALEAL, obj.TYPE_MEM, x86.REG_SP, frame+lo, obj.TYPE_REG, x86.REG_DI, 0)
p = appendpp(p, obj.ADUFFZERO, obj.TYPE_NONE, 0, 0, obj.TYPE_ADDR, 0, 1*(128-cnt/int64(gc.Widthreg))) p = appendpp(p, obj.ADUFFZERO, obj.TYPE_NONE, 0, 0, obj.TYPE_ADDR, 0, 1*(128-cnt/int64(gc.Widthreg)))
p.To.Sym = gc.Linksym(gc.Pkglookup("duffzero", gc.Runtimepkg)) p.To.Sym = gc.Linksym(gc.Pkglookup("duffzero", gc.Runtimepkg))
} else { } else {
p = appendpp(p, i386.AMOVL, obj.TYPE_CONST, 0, cnt/int64(gc.Widthreg), obj.TYPE_REG, i386.REG_CX, 0) p = appendpp(p, x86.AMOVL, obj.TYPE_CONST, 0, cnt/int64(gc.Widthreg), obj.TYPE_REG, x86.REG_CX, 0)
p = appendpp(p, i386.ALEAL, obj.TYPE_MEM, i386.REG_SP, frame+lo, obj.TYPE_REG, i386.REG_DI, 0) p = appendpp(p, x86.ALEAL, obj.TYPE_MEM, x86.REG_SP, frame+lo, obj.TYPE_REG, x86.REG_DI, 0)
p = appendpp(p, i386.AREP, obj.TYPE_NONE, 0, 0, obj.TYPE_NONE, 0, 0) p = appendpp(p, x86.AREP, obj.TYPE_NONE, 0, 0, obj.TYPE_NONE, 0, 0)
p = appendpp(p, i386.ASTOSL, obj.TYPE_NONE, 0, 0, obj.TYPE_NONE, 0, 0) p = appendpp(p, x86.ASTOSL, obj.TYPE_NONE, 0, 0, obj.TYPE_NONE, 0, 0)
} }
return p return p
...@@ -140,7 +140,7 @@ func clearfat(nl *gc.Node) { ...@@ -140,7 +140,7 @@ func clearfat(nl *gc.Node) {
break break
} }
n1.Type = z.Type n1.Type = z.Type
gins(i386.AMOVL, &z, &n1) gins(x86.AMOVL, &z, &n1)
n1.Xoffset += 4 n1.Xoffset += 4
} }
...@@ -152,7 +152,7 @@ func clearfat(nl *gc.Node) { ...@@ -152,7 +152,7 @@ func clearfat(nl *gc.Node) {
break break
} }
n1.Type = z.Type n1.Type = z.Type
gins(i386.AMOVB, &z, &n1) gins(x86.AMOVB, &z, &n1)
n1.Xoffset++ n1.Xoffset++
} }
...@@ -161,14 +161,14 @@ func clearfat(nl *gc.Node) { ...@@ -161,14 +161,14 @@ func clearfat(nl *gc.Node) {
} }
var n1 gc.Node var n1 gc.Node
gc.Nodreg(&n1, gc.Types[gc.Tptr], i386.REG_DI) gc.Nodreg(&n1, gc.Types[gc.Tptr], x86.REG_DI)
agen(nl, &n1) agen(nl, &n1)
gconreg(i386.AMOVL, 0, i386.REG_AX) gconreg(x86.AMOVL, 0, x86.REG_AX)
if q > 128 || (q >= 4 && gc.Nacl) { if q > 128 || (q >= 4 && gc.Nacl) {
gconreg(i386.AMOVL, int64(q), i386.REG_CX) gconreg(x86.AMOVL, int64(q), x86.REG_CX)
gins(i386.AREP, nil, nil) // repeat gins(x86.AREP, nil, nil) // repeat
gins(i386.ASTOSL, nil, nil) // STOL AL,*(DI)+ gins(x86.ASTOSL, nil, nil) // STOL AL,*(DI)+
} else if q >= 4 { } else if q >= 4 {
p := gins(obj.ADUFFZERO, nil, nil) p := gins(obj.ADUFFZERO, nil, nil)
p.To.Type = obj.TYPE_ADDR p.To.Type = obj.TYPE_ADDR
...@@ -178,13 +178,13 @@ func clearfat(nl *gc.Node) { ...@@ -178,13 +178,13 @@ func clearfat(nl *gc.Node) {
p.To.Offset = 1 * (128 - int64(q)) p.To.Offset = 1 * (128 - int64(q))
} else { } else {
for q > 0 { for q > 0 {
gins(i386.ASTOSL, nil, nil) // STOL AL,*(DI)+ gins(x86.ASTOSL, nil, nil) // STOL AL,*(DI)+
q-- q--
} }
} }
for c > 0 { for c > 0 {
gins(i386.ASTOSB, nil, nil) // STOB AL,*(DI)+ gins(x86.ASTOSB, nil, nil) // STOB AL,*(DI)+
c-- c--
} }
} }
...@@ -225,9 +225,9 @@ func ginscall(f *gc.Node, proc int) { ...@@ -225,9 +225,9 @@ func ginscall(f *gc.Node, proc int) {
// because the NOP pseudo-instruction will be removed by // because the NOP pseudo-instruction will be removed by
// the linker. // the linker.
var reg gc.Node var reg gc.Node
gc.Nodreg(&reg, gc.Types[gc.TINT], i386.REG_AX) gc.Nodreg(&reg, gc.Types[gc.TINT], x86.REG_AX)
gins(i386.AXCHGL, &reg, &reg) gins(x86.AXCHGL, &reg, &reg)
} }
p := gins(obj.ACALL, nil, f) p := gins(obj.ACALL, nil, f)
...@@ -239,9 +239,9 @@ func ginscall(f *gc.Node, proc int) { ...@@ -239,9 +239,9 @@ func ginscall(f *gc.Node, proc int) {
} }
var reg gc.Node var reg gc.Node
gc.Nodreg(&reg, gc.Types[gc.Tptr], i386.REG_DX) gc.Nodreg(&reg, gc.Types[gc.Tptr], x86.REG_DX)
var r1 gc.Node var r1 gc.Node
gc.Nodreg(&r1, gc.Types[gc.Tptr], i386.REG_BX) gc.Nodreg(&r1, gc.Types[gc.Tptr], x86.REG_BX)
gmove(f, &reg) gmove(f, &reg)
reg.Op = gc.OINDREG reg.Op = gc.OINDREG
gmove(&reg, &r1) gmove(&reg, &r1)
...@@ -256,19 +256,19 @@ func ginscall(f *gc.Node, proc int) { ...@@ -256,19 +256,19 @@ func ginscall(f *gc.Node, proc int) {
var stk gc.Node var stk gc.Node
stk.Op = gc.OINDREG stk.Op = gc.OINDREG
stk.Val.U.Reg = i386.REG_SP stk.Val.U.Reg = x86.REG_SP
stk.Xoffset = 0 stk.Xoffset = 0
// size of arguments at 0(SP) // size of arguments at 0(SP)
var con gc.Node var con gc.Node
gc.Nodconst(&con, gc.Types[gc.TINT32], int64(gc.Argsize(f.Type))) gc.Nodconst(&con, gc.Types[gc.TINT32], int64(gc.Argsize(f.Type)))
gins(i386.AMOVL, &con, &stk) gins(x86.AMOVL, &con, &stk)
// FuncVal* at 4(SP) // FuncVal* at 4(SP)
stk.Xoffset = int64(gc.Widthptr) stk.Xoffset = int64(gc.Widthptr)
gins(i386.AMOVL, f, &stk) gins(x86.AMOVL, f, &stk)
if proc == 1 { if proc == 1 {
ginscall(gc.Newproc, 0) ginscall(gc.Newproc, 0)
...@@ -277,9 +277,9 @@ func ginscall(f *gc.Node, proc int) { ...@@ -277,9 +277,9 @@ func ginscall(f *gc.Node, proc int) {
} }
if proc == 2 { if proc == 2 {
var reg gc.Node var reg gc.Node
gc.Nodreg(&reg, gc.Types[gc.TINT32], i386.REG_AX) gc.Nodreg(&reg, gc.Types[gc.TINT32], x86.REG_AX)
gins(i386.ATESTL, &reg, &reg) gins(x86.ATESTL, &reg, &reg)
p := gc.Gbranch(i386.AJEQ, nil, +1) p := gc.Gbranch(x86.AJEQ, nil, +1)
cgen_ret(nil) cgen_ret(nil)
gc.Patch(p, gc.Pc) gc.Patch(p, gc.Pc)
} }
...@@ -318,7 +318,7 @@ func cgen_callinter(n *gc.Node, res *gc.Node, proc int) { ...@@ -318,7 +318,7 @@ func cgen_callinter(n *gc.Node, res *gc.Node, proc int) {
igen(i, &nodi, res) // REG = &inter igen(i, &nodi, res) // REG = &inter
var nodsp gc.Node var nodsp gc.Node
gc.Nodindreg(&nodsp, gc.Types[gc.Tptr], i386.REG_SP) gc.Nodindreg(&nodsp, gc.Types[gc.Tptr], x86.REG_SP)
nodsp.Xoffset = 0 nodsp.Xoffset = 0
if proc != 0 { if proc != 0 {
...@@ -351,7 +351,7 @@ func cgen_callinter(n *gc.Node, res *gc.Node, proc int) { ...@@ -351,7 +351,7 @@ func cgen_callinter(n *gc.Node, res *gc.Node, proc int) {
proc = 3 proc = 3
} else { } else {
// go/defer. generate go func value. // go/defer. generate go func value.
gins(i386.ALEAL, &nodo, &nodr) // REG = &(20+offset(REG)) -- i.tab->fun[f] gins(x86.ALEAL, &nodo, &nodr) // REG = &(20+offset(REG)) -- i.tab->fun[f]
} }
nodr.Type = n.Left.Type nodr.Type = n.Left.Type
...@@ -431,7 +431,7 @@ func cgen_callret(n *gc.Node, res *gc.Node) { ...@@ -431,7 +431,7 @@ func cgen_callret(n *gc.Node, res *gc.Node) {
var nod gc.Node var nod gc.Node
nod.Op = gc.OINDREG nod.Op = gc.OINDREG
nod.Val.U.Reg = i386.REG_SP nod.Val.U.Reg = x86.REG_SP
nod.Addable = 1 nod.Addable = 1
nod.Xoffset = fp.Width nod.Xoffset = fp.Width
...@@ -458,7 +458,7 @@ func cgen_aret(n *gc.Node, res *gc.Node) { ...@@ -458,7 +458,7 @@ func cgen_aret(n *gc.Node, res *gc.Node) {
var nod1 gc.Node var nod1 gc.Node
nod1.Op = gc.OINDREG nod1.Op = gc.OINDREG
nod1.Val.U.Reg = i386.REG_SP nod1.Val.U.Reg = x86.REG_SP
nod1.Addable = 1 nod1.Addable = 1
nod1.Xoffset = fp.Width nod1.Xoffset = fp.Width
...@@ -467,11 +467,11 @@ func cgen_aret(n *gc.Node, res *gc.Node) { ...@@ -467,11 +467,11 @@ func cgen_aret(n *gc.Node, res *gc.Node) {
if res.Op != gc.OREGISTER { if res.Op != gc.OREGISTER {
var nod2 gc.Node var nod2 gc.Node
regalloc(&nod2, gc.Types[gc.Tptr], res) regalloc(&nod2, gc.Types[gc.Tptr], res)
gins(i386.ALEAL, &nod1, &nod2) gins(x86.ALEAL, &nod1, &nod2)
gins(i386.AMOVL, &nod2, res) gins(x86.AMOVL, &nod2, res)
regfree(&nod2) regfree(&nod2)
} else { } else {
gins(i386.ALEAL, &nod1, res) gins(x86.ALEAL, &nod1, res)
} }
} }
...@@ -665,10 +665,10 @@ func cgen_div(op int, nl *gc.Node, nr *gc.Node, res *gc.Node) { ...@@ -665,10 +665,10 @@ func cgen_div(op int, nl *gc.Node, nr *gc.Node, res *gc.Node) {
} }
var ax gc.Node var ax gc.Node
var oldax gc.Node var oldax gc.Node
savex(i386.REG_AX, &ax, &oldax, res, t) savex(x86.REG_AX, &ax, &oldax, res, t)
var olddx gc.Node var olddx gc.Node
var dx gc.Node var dx gc.Node
savex(i386.REG_DX, &dx, &olddx, res, t) savex(x86.REG_DX, &dx, &olddx, res, t)
dodiv(op, nl, nr, res, &ax, &dx) dodiv(op, nl, nr, res, &ax, &dx)
restx(&dx, &olddx) restx(&dx, &olddx)
restx(&ax, &oldax) restx(&ax, &oldax)
...@@ -711,8 +711,8 @@ func cgen_shift(op int, bounded bool, nl *gc.Node, nr *gc.Node, res *gc.Node) { ...@@ -711,8 +711,8 @@ func cgen_shift(op int, bounded bool, nl *gc.Node, nr *gc.Node, res *gc.Node) {
var oldcx gc.Node var oldcx gc.Node
var cx gc.Node var cx gc.Node
gc.Nodreg(&cx, gc.Types[gc.TUINT32], i386.REG_CX) gc.Nodreg(&cx, gc.Types[gc.TUINT32], x86.REG_CX)
if reg[i386.REG_CX] > 1 && !gc.Samereg(&cx, res) { if reg[x86.REG_CX] > 1 && !gc.Samereg(&cx, res) {
gc.Tempname(&oldcx, gc.Types[gc.TUINT32]) gc.Tempname(&oldcx, gc.Types[gc.TUINT32])
gmove(&cx, &oldcx) gmove(&cx, &oldcx)
} }
...@@ -723,7 +723,7 @@ func cgen_shift(op int, bounded bool, nl *gc.Node, nr *gc.Node, res *gc.Node) { ...@@ -723,7 +723,7 @@ func cgen_shift(op int, bounded bool, nl *gc.Node, nr *gc.Node, res *gc.Node) {
gc.Tempname(&nt, nr.Type) gc.Tempname(&nt, nr.Type)
n1 = nt n1 = nt
} else { } else {
gc.Nodreg(&n1, gc.Types[gc.TUINT32], i386.REG_CX) gc.Nodreg(&n1, gc.Types[gc.TUINT32], x86.REG_CX)
regalloc(&n1, nr.Type, &n1) // to hold the shift type in CX regalloc(&n1, nr.Type, &n1) // to hold the shift type in CX
} }
...@@ -745,7 +745,7 @@ func cgen_shift(op int, bounded bool, nl *gc.Node, nr *gc.Node, res *gc.Node) { ...@@ -745,7 +745,7 @@ func cgen_shift(op int, bounded bool, nl *gc.Node, nr *gc.Node, res *gc.Node) {
if bounded { if bounded {
if nr.Type.Width > 4 { if nr.Type.Width > 4 {
// delayed reg alloc // delayed reg alloc
gc.Nodreg(&n1, gc.Types[gc.TUINT32], i386.REG_CX) gc.Nodreg(&n1, gc.Types[gc.TUINT32], x86.REG_CX)
regalloc(&n1, gc.Types[gc.TUINT32], &n1) // to hold the shift type in CX regalloc(&n1, gc.Types[gc.TUINT32], &n1) // to hold the shift type in CX
var lo gc.Node var lo gc.Node
...@@ -758,7 +758,7 @@ func cgen_shift(op int, bounded bool, nl *gc.Node, nr *gc.Node, res *gc.Node) { ...@@ -758,7 +758,7 @@ func cgen_shift(op int, bounded bool, nl *gc.Node, nr *gc.Node, res *gc.Node) {
var p1 *obj.Prog var p1 *obj.Prog
if nr.Type.Width > 4 { if nr.Type.Width > 4 {
// delayed reg alloc // delayed reg alloc
gc.Nodreg(&n1, gc.Types[gc.TUINT32], i386.REG_CX) gc.Nodreg(&n1, gc.Types[gc.TUINT32], x86.REG_CX)
regalloc(&n1, gc.Types[gc.TUINT32], &n1) // to hold the shift type in CX regalloc(&n1, gc.Types[gc.TUINT32], &n1) // to hold the shift type in CX
var lo gc.Node var lo gc.Node
...@@ -858,7 +858,7 @@ func cgen_hmul(nl *gc.Node, nr *gc.Node, res *gc.Node) { ...@@ -858,7 +858,7 @@ func cgen_hmul(nl *gc.Node, nr *gc.Node, res *gc.Node) {
cgen(nr, &n2) cgen(nr, &n2)
// multiply. // multiply.
gc.Nodreg(&ax, t, i386.REG_AX) gc.Nodreg(&ax, t, x86.REG_AX)
gmove(&n2, &ax) gmove(&n2, &ax)
gins(a, &n1, nil) gins(a, &n1, nil)
...@@ -866,13 +866,13 @@ func cgen_hmul(nl *gc.Node, nr *gc.Node, res *gc.Node) { ...@@ -866,13 +866,13 @@ func cgen_hmul(nl *gc.Node, nr *gc.Node, res *gc.Node) {
if t.Width == 1 { if t.Width == 1 {
// byte multiply behaves differently. // byte multiply behaves differently.
gc.Nodreg(&ax, t, i386.REG_AH) gc.Nodreg(&ax, t, x86.REG_AH)
gc.Nodreg(&dx, t, i386.REG_DX) gc.Nodreg(&dx, t, x86.REG_DX)
gmove(&ax, &dx) gmove(&ax, &dx)
} }
gc.Nodreg(&dx, t, i386.REG_DX) gc.Nodreg(&dx, t, x86.REG_DX)
gmove(&dx, res) gmove(&dx, res)
} }
...@@ -931,8 +931,8 @@ func cgen_float387(n *gc.Node, res *gc.Node) { ...@@ -931,8 +931,8 @@ func cgen_float387(n *gc.Node, res *gc.Node) {
nl := n.Left nl := n.Left
nr := n.Right nr := n.Right
gc.Nodreg(&f0, nl.Type, i386.REG_F0) gc.Nodreg(&f0, nl.Type, x86.REG_F0)
gc.Nodreg(&f1, n.Type, i386.REG_F0+1) gc.Nodreg(&f1, n.Type, x86.REG_F0+1)
if nr != nil { if nr != nil {
// binary // binary
if nl.Ullman >= nr.Ullman { if nl.Ullman >= nr.Ullman {
...@@ -1118,22 +1118,22 @@ x87: ...@@ -1118,22 +1118,22 @@ x87:
a = gc.Brrev(a) a = gc.Brrev(a)
} }
gc.Nodreg(&tmp, nr.Type, i386.REG_F0) gc.Nodreg(&tmp, nr.Type, x86.REG_F0)
gc.Nodreg(&n2, nr.Type, i386.REG_F0+1) gc.Nodreg(&n2, nr.Type, x86.REG_F0+1)
gc.Nodreg(&ax, gc.Types[gc.TUINT16], i386.REG_AX) gc.Nodreg(&ax, gc.Types[gc.TUINT16], x86.REG_AX)
et = gc.Simsimtype(nr.Type) et = gc.Simsimtype(nr.Type)
if et == gc.TFLOAT64 { if et == gc.TFLOAT64 {
if nl.Ullman > nr.Ullman { if nl.Ullman > nr.Ullman {
cgen(nl, &tmp) cgen(nl, &tmp)
cgen(nr, &tmp) cgen(nr, &tmp)
gins(i386.AFXCHD, &tmp, &n2) gins(x86.AFXCHD, &tmp, &n2)
} else { } else {
cgen(nr, &tmp) cgen(nr, &tmp)
cgen(nl, &tmp) cgen(nl, &tmp)
} }
gins(i386.AFUCOMIP, &tmp, &n2) gins(x86.AFUCOMIP, &tmp, &n2)
gins(i386.AFMOVDP, &tmp, &tmp) // annoying pop but still better than STSW+SAHF gins(x86.AFMOVDP, &tmp, &tmp) // annoying pop but still better than STSW+SAHF
} else { } else {
// TODO(rsc): The moves back and forth to memory // TODO(rsc): The moves back and forth to memory
// here are for truncating the value to 32 bits. // here are for truncating the value to 32 bits.
...@@ -1149,9 +1149,9 @@ x87: ...@@ -1149,9 +1149,9 @@ x87:
cgen(nr, &t1) cgen(nr, &t1)
cgen(nl, &t2) cgen(nl, &t2)
gmove(&t2, &tmp) gmove(&t2, &tmp)
gins(i386.AFCOMFP, &t1, &tmp) gins(x86.AFCOMFP, &t1, &tmp)
gins(i386.AFSTSW, nil, &ax) gins(x86.AFSTSW, nil, &ax)
gins(i386.ASAHF, nil, nil) gins(x86.ASAHF, nil, nil)
} }
goto ret goto ret
...@@ -1159,17 +1159,17 @@ x87: ...@@ -1159,17 +1159,17 @@ x87:
ret: ret:
if a == gc.OEQ { if a == gc.OEQ {
// neither NE nor P // neither NE nor P
p1 := gc.Gbranch(i386.AJNE, nil, -likely) p1 := gc.Gbranch(x86.AJNE, nil, -likely)
p2 := gc.Gbranch(i386.AJPS, nil, -likely) p2 := gc.Gbranch(x86.AJPS, nil, -likely)
gc.Patch(gc.Gbranch(obj.AJMP, nil, 0), to) gc.Patch(gc.Gbranch(obj.AJMP, nil, 0), to)
gc.Patch(p1, gc.Pc) gc.Patch(p1, gc.Pc)
gc.Patch(p2, gc.Pc) gc.Patch(p2, gc.Pc)
} else if a == gc.ONE { } else if a == gc.ONE {
// either NE or P // either NE or P
gc.Patch(gc.Gbranch(i386.AJNE, nil, likely), to) gc.Patch(gc.Gbranch(x86.AJNE, nil, likely), to)
gc.Patch(gc.Gbranch(i386.AJPS, nil, likely), to) gc.Patch(gc.Gbranch(x86.AJPS, nil, likely), to)
} else { } else {
gc.Patch(gc.Gbranch(optoas(a, nr.Type), nil, likely), to) gc.Patch(gc.Gbranch(optoas(a, nr.Type), nil, likely), to)
} }
...@@ -1205,10 +1205,10 @@ func expandchecks(firstp *obj.Prog) { ...@@ -1205,10 +1205,10 @@ func expandchecks(firstp *obj.Prog) {
p2.Lineno = p.Lineno p2.Lineno = p.Lineno
p1.Pc = 9999 p1.Pc = 9999
p2.Pc = 9999 p2.Pc = 9999
p.As = i386.ACMPL p.As = x86.ACMPL
p.To.Type = obj.TYPE_CONST p.To.Type = obj.TYPE_CONST
p.To.Offset = 0 p.To.Offset = 0
p1.As = i386.AJNE p1.As = x86.AJNE
p1.From.Type = obj.TYPE_CONST p1.From.Type = obj.TYPE_CONST
p1.From.Offset = 1 // likely p1.From.Offset = 1 // likely
p1.To.Type = obj.TYPE_BRANCH p1.To.Type = obj.TYPE_BRANCH
...@@ -1217,10 +1217,10 @@ func expandchecks(firstp *obj.Prog) { ...@@ -1217,10 +1217,10 @@ func expandchecks(firstp *obj.Prog) {
// crash by write to memory address 0. // crash by write to memory address 0.
// if possible, since we know arg is 0, use 0(arg), // if possible, since we know arg is 0, use 0(arg),
// which will be shorter to encode than plain 0. // which will be shorter to encode than plain 0.
p2.As = i386.AMOVL p2.As = x86.AMOVL
p2.From.Type = obj.TYPE_REG p2.From.Type = obj.TYPE_REG
p2.From.Reg = i386.REG_AX p2.From.Reg = x86.REG_AX
if regtyp(&p.From) { if regtyp(&p.From) {
p2.To.Type = obj.TYPE_MEM p2.To.Type = obj.TYPE_MEM
p2.To.Reg = p.From.Reg p2.To.Reg = p.From.Reg
......
...@@ -33,7 +33,7 @@ package main ...@@ -33,7 +33,7 @@ package main
import ( import (
"cmd/internal/gc" "cmd/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
i386 "cmd/internal/obj/x86" "cmd/internal/obj/x86"
"fmt" "fmt"
) )
...@@ -56,7 +56,7 @@ func optoas(op int, t *gc.Type) int { ...@@ -56,7 +56,7 @@ func optoas(op int, t *gc.Type) int {
gc.Fatal("optoas: no entry %v-%v", gc.Oconv(int(op), 0), gc.Tconv(t, 0)) gc.Fatal("optoas: no entry %v-%v", gc.Oconv(int(op), 0), gc.Tconv(t, 0))
case gc.OADDR<<16 | gc.TPTR32: case gc.OADDR<<16 | gc.TPTR32:
a = i386.ALEAL a = x86.ALEAL
case gc.OEQ<<16 | gc.TBOOL, case gc.OEQ<<16 | gc.TBOOL,
gc.OEQ<<16 | gc.TINT8, gc.OEQ<<16 | gc.TINT8,
...@@ -71,7 +71,7 @@ func optoas(op int, t *gc.Type) int { ...@@ -71,7 +71,7 @@ func optoas(op int, t *gc.Type) int {
gc.OEQ<<16 | gc.TPTR64, gc.OEQ<<16 | gc.TPTR64,
gc.OEQ<<16 | gc.TFLOAT32, gc.OEQ<<16 | gc.TFLOAT32,
gc.OEQ<<16 | gc.TFLOAT64: gc.OEQ<<16 | gc.TFLOAT64:
a = i386.AJEQ a = x86.AJEQ
case gc.ONE<<16 | gc.TBOOL, case gc.ONE<<16 | gc.TBOOL,
gc.ONE<<16 | gc.TINT8, gc.ONE<<16 | gc.TINT8,
...@@ -86,37 +86,37 @@ func optoas(op int, t *gc.Type) int { ...@@ -86,37 +86,37 @@ func optoas(op int, t *gc.Type) int {
gc.ONE<<16 | gc.TPTR64, gc.ONE<<16 | gc.TPTR64,
gc.ONE<<16 | gc.TFLOAT32, gc.ONE<<16 | gc.TFLOAT32,
gc.ONE<<16 | gc.TFLOAT64: gc.ONE<<16 | gc.TFLOAT64:
a = i386.AJNE a = x86.AJNE
case gc.OLT<<16 | gc.TINT8, case gc.OLT<<16 | gc.TINT8,
gc.OLT<<16 | gc.TINT16, gc.OLT<<16 | gc.TINT16,
gc.OLT<<16 | gc.TINT32, gc.OLT<<16 | gc.TINT32,
gc.OLT<<16 | gc.TINT64: gc.OLT<<16 | gc.TINT64:
a = i386.AJLT a = x86.AJLT
case gc.OLT<<16 | gc.TUINT8, case gc.OLT<<16 | gc.TUINT8,
gc.OLT<<16 | gc.TUINT16, gc.OLT<<16 | gc.TUINT16,
gc.OLT<<16 | gc.TUINT32, gc.OLT<<16 | gc.TUINT32,
gc.OLT<<16 | gc.TUINT64: gc.OLT<<16 | gc.TUINT64:
a = i386.AJCS a = x86.AJCS
case gc.OLE<<16 | gc.TINT8, case gc.OLE<<16 | gc.TINT8,
gc.OLE<<16 | gc.TINT16, gc.OLE<<16 | gc.TINT16,
gc.OLE<<16 | gc.TINT32, gc.OLE<<16 | gc.TINT32,
gc.OLE<<16 | gc.TINT64: gc.OLE<<16 | gc.TINT64:
a = i386.AJLE a = x86.AJLE
case gc.OLE<<16 | gc.TUINT8, case gc.OLE<<16 | gc.TUINT8,
gc.OLE<<16 | gc.TUINT16, gc.OLE<<16 | gc.TUINT16,
gc.OLE<<16 | gc.TUINT32, gc.OLE<<16 | gc.TUINT32,
gc.OLE<<16 | gc.TUINT64: gc.OLE<<16 | gc.TUINT64:
a = i386.AJLS a = x86.AJLS
case gc.OGT<<16 | gc.TINT8, case gc.OGT<<16 | gc.TINT8,
gc.OGT<<16 | gc.TINT16, gc.OGT<<16 | gc.TINT16,
gc.OGT<<16 | gc.TINT32, gc.OGT<<16 | gc.TINT32,
gc.OGT<<16 | gc.TINT64: gc.OGT<<16 | gc.TINT64:
a = i386.AJGT a = x86.AJGT
case gc.OGT<<16 | gc.TUINT8, case gc.OGT<<16 | gc.TUINT8,
gc.OGT<<16 | gc.TUINT16, gc.OGT<<16 | gc.TUINT16,
...@@ -124,13 +124,13 @@ func optoas(op int, t *gc.Type) int { ...@@ -124,13 +124,13 @@ func optoas(op int, t *gc.Type) int {
gc.OGT<<16 | gc.TUINT64, gc.OGT<<16 | gc.TUINT64,
gc.OLT<<16 | gc.TFLOAT32, gc.OLT<<16 | gc.TFLOAT32,
gc.OLT<<16 | gc.TFLOAT64: gc.OLT<<16 | gc.TFLOAT64:
a = i386.AJHI a = x86.AJHI
case gc.OGE<<16 | gc.TINT8, case gc.OGE<<16 | gc.TINT8,
gc.OGE<<16 | gc.TINT16, gc.OGE<<16 | gc.TINT16,
gc.OGE<<16 | gc.TINT32, gc.OGE<<16 | gc.TINT32,
gc.OGE<<16 | gc.TINT64: gc.OGE<<16 | gc.TINT64:
a = i386.AJGE a = x86.AJGE
case gc.OGE<<16 | gc.TUINT8, case gc.OGE<<16 | gc.TUINT8,
gc.OGE<<16 | gc.TUINT16, gc.OGE<<16 | gc.TUINT16,
...@@ -138,261 +138,261 @@ func optoas(op int, t *gc.Type) int { ...@@ -138,261 +138,261 @@ func optoas(op int, t *gc.Type) int {
gc.OGE<<16 | gc.TUINT64, gc.OGE<<16 | gc.TUINT64,
gc.OLE<<16 | gc.TFLOAT32, gc.OLE<<16 | gc.TFLOAT32,
gc.OLE<<16 | gc.TFLOAT64: gc.OLE<<16 | gc.TFLOAT64:
a = i386.AJCC a = x86.AJCC
case gc.OCMP<<16 | gc.TBOOL, case gc.OCMP<<16 | gc.TBOOL,
gc.OCMP<<16 | gc.TINT8, gc.OCMP<<16 | gc.TINT8,
gc.OCMP<<16 | gc.TUINT8: gc.OCMP<<16 | gc.TUINT8:
a = i386.ACMPB a = x86.ACMPB
case gc.OCMP<<16 | gc.TINT16, case gc.OCMP<<16 | gc.TINT16,
gc.OCMP<<16 | gc.TUINT16: gc.OCMP<<16 | gc.TUINT16:
a = i386.ACMPW a = x86.ACMPW
case gc.OCMP<<16 | gc.TINT32, case gc.OCMP<<16 | gc.TINT32,
gc.OCMP<<16 | gc.TUINT32, gc.OCMP<<16 | gc.TUINT32,
gc.OCMP<<16 | gc.TPTR32: gc.OCMP<<16 | gc.TPTR32:
a = i386.ACMPL a = x86.ACMPL
case gc.OAS<<16 | gc.TBOOL, case gc.OAS<<16 | gc.TBOOL,
gc.OAS<<16 | gc.TINT8, gc.OAS<<16 | gc.TINT8,
gc.OAS<<16 | gc.TUINT8: gc.OAS<<16 | gc.TUINT8:
a = i386.AMOVB a = x86.AMOVB
case gc.OAS<<16 | gc.TINT16, case gc.OAS<<16 | gc.TINT16,
gc.OAS<<16 | gc.TUINT16: gc.OAS<<16 | gc.TUINT16:
a = i386.AMOVW a = x86.AMOVW
case gc.OAS<<16 | gc.TINT32, case gc.OAS<<16 | gc.TINT32,
gc.OAS<<16 | gc.TUINT32, gc.OAS<<16 | gc.TUINT32,
gc.OAS<<16 | gc.TPTR32: gc.OAS<<16 | gc.TPTR32:
a = i386.AMOVL a = x86.AMOVL
case gc.OAS<<16 | gc.TFLOAT32: case gc.OAS<<16 | gc.TFLOAT32:
a = i386.AMOVSS a = x86.AMOVSS
case gc.OAS<<16 | gc.TFLOAT64: case gc.OAS<<16 | gc.TFLOAT64:
a = i386.AMOVSD a = x86.AMOVSD
case gc.OADD<<16 | gc.TINT8, case gc.OADD<<16 | gc.TINT8,
gc.OADD<<16 | gc.TUINT8: gc.OADD<<16 | gc.TUINT8:
a = i386.AADDB a = x86.AADDB
case gc.OADD<<16 | gc.TINT16, case gc.OADD<<16 | gc.TINT16,
gc.OADD<<16 | gc.TUINT16: gc.OADD<<16 | gc.TUINT16:
a = i386.AADDW a = x86.AADDW
case gc.OADD<<16 | gc.TINT32, case gc.OADD<<16 | gc.TINT32,
gc.OADD<<16 | gc.TUINT32, gc.OADD<<16 | gc.TUINT32,
gc.OADD<<16 | gc.TPTR32: gc.OADD<<16 | gc.TPTR32:
a = i386.AADDL a = x86.AADDL
case gc.OSUB<<16 | gc.TINT8, case gc.OSUB<<16 | gc.TINT8,
gc.OSUB<<16 | gc.TUINT8: gc.OSUB<<16 | gc.TUINT8:
a = i386.ASUBB a = x86.ASUBB
case gc.OSUB<<16 | gc.TINT16, case gc.OSUB<<16 | gc.TINT16,
gc.OSUB<<16 | gc.TUINT16: gc.OSUB<<16 | gc.TUINT16:
a = i386.ASUBW a = x86.ASUBW
case gc.OSUB<<16 | gc.TINT32, case gc.OSUB<<16 | gc.TINT32,
gc.OSUB<<16 | gc.TUINT32, gc.OSUB<<16 | gc.TUINT32,
gc.OSUB<<16 | gc.TPTR32: gc.OSUB<<16 | gc.TPTR32:
a = i386.ASUBL a = x86.ASUBL
case gc.OINC<<16 | gc.TINT8, case gc.OINC<<16 | gc.TINT8,
gc.OINC<<16 | gc.TUINT8: gc.OINC<<16 | gc.TUINT8:
a = i386.AINCB a = x86.AINCB
case gc.OINC<<16 | gc.TINT16, case gc.OINC<<16 | gc.TINT16,
gc.OINC<<16 | gc.TUINT16: gc.OINC<<16 | gc.TUINT16:
a = i386.AINCW a = x86.AINCW
case gc.OINC<<16 | gc.TINT32, case gc.OINC<<16 | gc.TINT32,
gc.OINC<<16 | gc.TUINT32, gc.OINC<<16 | gc.TUINT32,
gc.OINC<<16 | gc.TPTR32: gc.OINC<<16 | gc.TPTR32:
a = i386.AINCL a = x86.AINCL
case gc.ODEC<<16 | gc.TINT8, case gc.ODEC<<16 | gc.TINT8,
gc.ODEC<<16 | gc.TUINT8: gc.ODEC<<16 | gc.TUINT8:
a = i386.ADECB a = x86.ADECB
case gc.ODEC<<16 | gc.TINT16, case gc.ODEC<<16 | gc.TINT16,
gc.ODEC<<16 | gc.TUINT16: gc.ODEC<<16 | gc.TUINT16:
a = i386.ADECW a = x86.ADECW
case gc.ODEC<<16 | gc.TINT32, case gc.ODEC<<16 | gc.TINT32,
gc.ODEC<<16 | gc.TUINT32, gc.ODEC<<16 | gc.TUINT32,
gc.ODEC<<16 | gc.TPTR32: gc.ODEC<<16 | gc.TPTR32:
a = i386.ADECL a = x86.ADECL
case gc.OCOM<<16 | gc.TINT8, case gc.OCOM<<16 | gc.TINT8,
gc.OCOM<<16 | gc.TUINT8: gc.OCOM<<16 | gc.TUINT8:
a = i386.ANOTB a = x86.ANOTB
case gc.OCOM<<16 | gc.TINT16, case gc.OCOM<<16 | gc.TINT16,
gc.OCOM<<16 | gc.TUINT16: gc.OCOM<<16 | gc.TUINT16:
a = i386.ANOTW a = x86.ANOTW
case gc.OCOM<<16 | gc.TINT32, case gc.OCOM<<16 | gc.TINT32,
gc.OCOM<<16 | gc.TUINT32, gc.OCOM<<16 | gc.TUINT32,
gc.OCOM<<16 | gc.TPTR32: gc.OCOM<<16 | gc.TPTR32:
a = i386.ANOTL a = x86.ANOTL
case gc.OMINUS<<16 | gc.TINT8, case gc.OMINUS<<16 | gc.TINT8,
gc.OMINUS<<16 | gc.TUINT8: gc.OMINUS<<16 | gc.TUINT8:
a = i386.ANEGB a = x86.ANEGB
case gc.OMINUS<<16 | gc.TINT16, case gc.OMINUS<<16 | gc.TINT16,
gc.OMINUS<<16 | gc.TUINT16: gc.OMINUS<<16 | gc.TUINT16:
a = i386.ANEGW a = x86.ANEGW
case gc.OMINUS<<16 | gc.TINT32, case gc.OMINUS<<16 | gc.TINT32,
gc.OMINUS<<16 | gc.TUINT32, gc.OMINUS<<16 | gc.TUINT32,
gc.OMINUS<<16 | gc.TPTR32: gc.OMINUS<<16 | gc.TPTR32:
a = i386.ANEGL a = x86.ANEGL
case gc.OAND<<16 | gc.TINT8, case gc.OAND<<16 | gc.TINT8,
gc.OAND<<16 | gc.TUINT8: gc.OAND<<16 | gc.TUINT8:
a = i386.AANDB a = x86.AANDB
case gc.OAND<<16 | gc.TINT16, case gc.OAND<<16 | gc.TINT16,
gc.OAND<<16 | gc.TUINT16: gc.OAND<<16 | gc.TUINT16:
a = i386.AANDW a = x86.AANDW
case gc.OAND<<16 | gc.TINT32, case gc.OAND<<16 | gc.TINT32,
gc.OAND<<16 | gc.TUINT32, gc.OAND<<16 | gc.TUINT32,
gc.OAND<<16 | gc.TPTR32: gc.OAND<<16 | gc.TPTR32:
a = i386.AANDL a = x86.AANDL
case gc.OOR<<16 | gc.TINT8, case gc.OOR<<16 | gc.TINT8,
gc.OOR<<16 | gc.TUINT8: gc.OOR<<16 | gc.TUINT8:
a = i386.AORB a = x86.AORB
case gc.OOR<<16 | gc.TINT16, case gc.OOR<<16 | gc.TINT16,
gc.OOR<<16 | gc.TUINT16: gc.OOR<<16 | gc.TUINT16:
a = i386.AORW a = x86.AORW
case gc.OOR<<16 | gc.TINT32, case gc.OOR<<16 | gc.TINT32,
gc.OOR<<16 | gc.TUINT32, gc.OOR<<16 | gc.TUINT32,
gc.OOR<<16 | gc.TPTR32: gc.OOR<<16 | gc.TPTR32:
a = i386.AORL a = x86.AORL
case gc.OXOR<<16 | gc.TINT8, case gc.OXOR<<16 | gc.TINT8,
gc.OXOR<<16 | gc.TUINT8: gc.OXOR<<16 | gc.TUINT8:
a = i386.AXORB a = x86.AXORB
case gc.OXOR<<16 | gc.TINT16, case gc.OXOR<<16 | gc.TINT16,
gc.OXOR<<16 | gc.TUINT16: gc.OXOR<<16 | gc.TUINT16:
a = i386.AXORW a = x86.AXORW
case gc.OXOR<<16 | gc.TINT32, case gc.OXOR<<16 | gc.TINT32,
gc.OXOR<<16 | gc.TUINT32, gc.OXOR<<16 | gc.TUINT32,
gc.OXOR<<16 | gc.TPTR32: gc.OXOR<<16 | gc.TPTR32:
a = i386.AXORL a = x86.AXORL
case gc.OLROT<<16 | gc.TINT8, case gc.OLROT<<16 | gc.TINT8,
gc.OLROT<<16 | gc.TUINT8: gc.OLROT<<16 | gc.TUINT8:
a = i386.AROLB a = x86.AROLB
case gc.OLROT<<16 | gc.TINT16, case gc.OLROT<<16 | gc.TINT16,
gc.OLROT<<16 | gc.TUINT16: gc.OLROT<<16 | gc.TUINT16:
a = i386.AROLW a = x86.AROLW
case gc.OLROT<<16 | gc.TINT32, case gc.OLROT<<16 | gc.TINT32,
gc.OLROT<<16 | gc.TUINT32, gc.OLROT<<16 | gc.TUINT32,
gc.OLROT<<16 | gc.TPTR32: gc.OLROT<<16 | gc.TPTR32:
a = i386.AROLL a = x86.AROLL
case gc.OLSH<<16 | gc.TINT8, case gc.OLSH<<16 | gc.TINT8,
gc.OLSH<<16 | gc.TUINT8: gc.OLSH<<16 | gc.TUINT8:
a = i386.ASHLB a = x86.ASHLB
case gc.OLSH<<16 | gc.TINT16, case gc.OLSH<<16 | gc.TINT16,
gc.OLSH<<16 | gc.TUINT16: gc.OLSH<<16 | gc.TUINT16:
a = i386.ASHLW a = x86.ASHLW
case gc.OLSH<<16 | gc.TINT32, case gc.OLSH<<16 | gc.TINT32,
gc.OLSH<<16 | gc.TUINT32, gc.OLSH<<16 | gc.TUINT32,
gc.OLSH<<16 | gc.TPTR32: gc.OLSH<<16 | gc.TPTR32:
a = i386.ASHLL a = x86.ASHLL
case gc.ORSH<<16 | gc.TUINT8: case gc.ORSH<<16 | gc.TUINT8:
a = i386.ASHRB a = x86.ASHRB
case gc.ORSH<<16 | gc.TUINT16: case gc.ORSH<<16 | gc.TUINT16:
a = i386.ASHRW a = x86.ASHRW
case gc.ORSH<<16 | gc.TUINT32, case gc.ORSH<<16 | gc.TUINT32,
gc.ORSH<<16 | gc.TPTR32: gc.ORSH<<16 | gc.TPTR32:
a = i386.ASHRL a = x86.ASHRL
case gc.ORSH<<16 | gc.TINT8: case gc.ORSH<<16 | gc.TINT8:
a = i386.ASARB a = x86.ASARB
case gc.ORSH<<16 | gc.TINT16: case gc.ORSH<<16 | gc.TINT16:
a = i386.ASARW a = x86.ASARW
case gc.ORSH<<16 | gc.TINT32: case gc.ORSH<<16 | gc.TINT32:
a = i386.ASARL a = x86.ASARL
case gc.OHMUL<<16 | gc.TINT8, case gc.OHMUL<<16 | gc.TINT8,
gc.OMUL<<16 | gc.TINT8, gc.OMUL<<16 | gc.TINT8,
gc.OMUL<<16 | gc.TUINT8: gc.OMUL<<16 | gc.TUINT8:
a = i386.AIMULB a = x86.AIMULB
case gc.OHMUL<<16 | gc.TINT16, case gc.OHMUL<<16 | gc.TINT16,
gc.OMUL<<16 | gc.TINT16, gc.OMUL<<16 | gc.TINT16,
gc.OMUL<<16 | gc.TUINT16: gc.OMUL<<16 | gc.TUINT16:
a = i386.AIMULW a = x86.AIMULW
case gc.OHMUL<<16 | gc.TINT32, case gc.OHMUL<<16 | gc.TINT32,
gc.OMUL<<16 | gc.TINT32, gc.OMUL<<16 | gc.TINT32,
gc.OMUL<<16 | gc.TUINT32, gc.OMUL<<16 | gc.TUINT32,
gc.OMUL<<16 | gc.TPTR32: gc.OMUL<<16 | gc.TPTR32:
a = i386.AIMULL a = x86.AIMULL
case gc.OHMUL<<16 | gc.TUINT8: case gc.OHMUL<<16 | gc.TUINT8:
a = i386.AMULB a = x86.AMULB
case gc.OHMUL<<16 | gc.TUINT16: case gc.OHMUL<<16 | gc.TUINT16:
a = i386.AMULW a = x86.AMULW
case gc.OHMUL<<16 | gc.TUINT32, case gc.OHMUL<<16 | gc.TUINT32,
gc.OHMUL<<16 | gc.TPTR32: gc.OHMUL<<16 | gc.TPTR32:
a = i386.AMULL a = x86.AMULL
case gc.ODIV<<16 | gc.TINT8, case gc.ODIV<<16 | gc.TINT8,
gc.OMOD<<16 | gc.TINT8: gc.OMOD<<16 | gc.TINT8:
a = i386.AIDIVB a = x86.AIDIVB
case gc.ODIV<<16 | gc.TUINT8, case gc.ODIV<<16 | gc.TUINT8,
gc.OMOD<<16 | gc.TUINT8: gc.OMOD<<16 | gc.TUINT8:
a = i386.ADIVB a = x86.ADIVB
case gc.ODIV<<16 | gc.TINT16, case gc.ODIV<<16 | gc.TINT16,
gc.OMOD<<16 | gc.TINT16: gc.OMOD<<16 | gc.TINT16:
a = i386.AIDIVW a = x86.AIDIVW
case gc.ODIV<<16 | gc.TUINT16, case gc.ODIV<<16 | gc.TUINT16,
gc.OMOD<<16 | gc.TUINT16: gc.OMOD<<16 | gc.TUINT16:
a = i386.ADIVW a = x86.ADIVW
case gc.ODIV<<16 | gc.TINT32, case gc.ODIV<<16 | gc.TINT32,
gc.OMOD<<16 | gc.TINT32: gc.OMOD<<16 | gc.TINT32:
a = i386.AIDIVL a = x86.AIDIVL
case gc.ODIV<<16 | gc.TUINT32, case gc.ODIV<<16 | gc.TUINT32,
gc.ODIV<<16 | gc.TPTR32, gc.ODIV<<16 | gc.TPTR32,
gc.OMOD<<16 | gc.TUINT32, gc.OMOD<<16 | gc.TUINT32,
gc.OMOD<<16 | gc.TPTR32: gc.OMOD<<16 | gc.TPTR32:
a = i386.ADIVL a = x86.ADIVL
case gc.OEXTEND<<16 | gc.TINT16: case gc.OEXTEND<<16 | gc.TINT16:
a = i386.ACWD a = x86.ACWD
case gc.OEXTEND<<16 | gc.TINT32: case gc.OEXTEND<<16 | gc.TINT32:
a = i386.ACDQ a = x86.ACDQ
} }
return a return a
...@@ -408,40 +408,40 @@ func foptoas(op int, t *gc.Type, flg int) int { ...@@ -408,40 +408,40 @@ func foptoas(op int, t *gc.Type, flg int) int {
gc.Fatal("foptoas-sse: no entry %v-%v", gc.Oconv(int(op), 0), gc.Tconv(t, 0)) gc.Fatal("foptoas-sse: no entry %v-%v", gc.Oconv(int(op), 0), gc.Tconv(t, 0))
case gc.OCMP<<16 | gc.TFLOAT32: case gc.OCMP<<16 | gc.TFLOAT32:
a = i386.AUCOMISS a = x86.AUCOMISS
case gc.OCMP<<16 | gc.TFLOAT64: case gc.OCMP<<16 | gc.TFLOAT64:
a = i386.AUCOMISD a = x86.AUCOMISD
case gc.OAS<<16 | gc.TFLOAT32: case gc.OAS<<16 | gc.TFLOAT32:
a = i386.AMOVSS a = x86.AMOVSS
case gc.OAS<<16 | gc.TFLOAT64: case gc.OAS<<16 | gc.TFLOAT64:
a = i386.AMOVSD a = x86.AMOVSD
case gc.OADD<<16 | gc.TFLOAT32: case gc.OADD<<16 | gc.TFLOAT32:
a = i386.AADDSS a = x86.AADDSS
case gc.OADD<<16 | gc.TFLOAT64: case gc.OADD<<16 | gc.TFLOAT64:
a = i386.AADDSD a = x86.AADDSD
case gc.OSUB<<16 | gc.TFLOAT32: case gc.OSUB<<16 | gc.TFLOAT32:
a = i386.ASUBSS a = x86.ASUBSS
case gc.OSUB<<16 | gc.TFLOAT64: case gc.OSUB<<16 | gc.TFLOAT64:
a = i386.ASUBSD a = x86.ASUBSD
case gc.OMUL<<16 | gc.TFLOAT32: case gc.OMUL<<16 | gc.TFLOAT32:
a = i386.AMULSS a = x86.AMULSS
case gc.OMUL<<16 | gc.TFLOAT64: case gc.OMUL<<16 | gc.TFLOAT64:
a = i386.AMULSD a = x86.AMULSD
case gc.ODIV<<16 | gc.TFLOAT32: case gc.ODIV<<16 | gc.TFLOAT32:
a = i386.ADIVSS a = x86.ADIVSS
case gc.ODIV<<16 | gc.TFLOAT64: case gc.ODIV<<16 | gc.TFLOAT64:
a = i386.ADIVSD a = x86.ADIVSD
} }
return a return a
...@@ -463,79 +463,79 @@ func foptoas(op int, t *gc.Type, flg int) int { ...@@ -463,79 +463,79 @@ func foptoas(op int, t *gc.Type, flg int) int {
switch uint32(op)<<16 | (uint32(et)<<8 | uint32(flg)) { switch uint32(op)<<16 | (uint32(et)<<8 | uint32(flg)) {
case gc.OADD<<16 | (gc.TFLOAT32<<8 | 0): case gc.OADD<<16 | (gc.TFLOAT32<<8 | 0):
return i386.AFADDF return x86.AFADDF
case gc.OADD<<16 | (gc.TFLOAT64<<8 | 0): case gc.OADD<<16 | (gc.TFLOAT64<<8 | 0):
return i386.AFADDD return x86.AFADDD
case gc.OADD<<16 | (gc.TFLOAT64<<8 | Fpop): case gc.OADD<<16 | (gc.TFLOAT64<<8 | Fpop):
return i386.AFADDDP return x86.AFADDDP
case gc.OSUB<<16 | (gc.TFLOAT32<<8 | 0): case gc.OSUB<<16 | (gc.TFLOAT32<<8 | 0):
return i386.AFSUBF return x86.AFSUBF
case gc.OSUB<<16 | (gc.TFLOAT32<<8 | Frev): case gc.OSUB<<16 | (gc.TFLOAT32<<8 | Frev):
return i386.AFSUBRF return x86.AFSUBRF
case gc.OSUB<<16 | (gc.TFLOAT64<<8 | 0): case gc.OSUB<<16 | (gc.TFLOAT64<<8 | 0):
return i386.AFSUBD return x86.AFSUBD
case gc.OSUB<<16 | (gc.TFLOAT64<<8 | Frev): case gc.OSUB<<16 | (gc.TFLOAT64<<8 | Frev):
return i386.AFSUBRD return x86.AFSUBRD
case gc.OSUB<<16 | (gc.TFLOAT64<<8 | Fpop): case gc.OSUB<<16 | (gc.TFLOAT64<<8 | Fpop):
return i386.AFSUBDP return x86.AFSUBDP
case gc.OSUB<<16 | (gc.TFLOAT64<<8 | (Fpop | Frev)): case gc.OSUB<<16 | (gc.TFLOAT64<<8 | (Fpop | Frev)):
return i386.AFSUBRDP return x86.AFSUBRDP
case gc.OMUL<<16 | (gc.TFLOAT32<<8 | 0): case gc.OMUL<<16 | (gc.TFLOAT32<<8 | 0):
return i386.AFMULF return x86.AFMULF
case gc.OMUL<<16 | (gc.TFLOAT64<<8 | 0): case gc.OMUL<<16 | (gc.TFLOAT64<<8 | 0):
return i386.AFMULD return x86.AFMULD
case gc.OMUL<<16 | (gc.TFLOAT64<<8 | Fpop): case gc.OMUL<<16 | (gc.TFLOAT64<<8 | Fpop):
return i386.AFMULDP return x86.AFMULDP
case gc.ODIV<<16 | (gc.TFLOAT32<<8 | 0): case gc.ODIV<<16 | (gc.TFLOAT32<<8 | 0):
return i386.AFDIVF return x86.AFDIVF
case gc.ODIV<<16 | (gc.TFLOAT32<<8 | Frev): case gc.ODIV<<16 | (gc.TFLOAT32<<8 | Frev):
return i386.AFDIVRF return x86.AFDIVRF
case gc.ODIV<<16 | (gc.TFLOAT64<<8 | 0): case gc.ODIV<<16 | (gc.TFLOAT64<<8 | 0):
return i386.AFDIVD return x86.AFDIVD
case gc.ODIV<<16 | (gc.TFLOAT64<<8 | Frev): case gc.ODIV<<16 | (gc.TFLOAT64<<8 | Frev):
return i386.AFDIVRD return x86.AFDIVRD
case gc.ODIV<<16 | (gc.TFLOAT64<<8 | Fpop): case gc.ODIV<<16 | (gc.TFLOAT64<<8 | Fpop):
return i386.AFDIVDP return x86.AFDIVDP
case gc.ODIV<<16 | (gc.TFLOAT64<<8 | (Fpop | Frev)): case gc.ODIV<<16 | (gc.TFLOAT64<<8 | (Fpop | Frev)):
return i386.AFDIVRDP return x86.AFDIVRDP
case gc.OCMP<<16 | (gc.TFLOAT32<<8 | 0): case gc.OCMP<<16 | (gc.TFLOAT32<<8 | 0):
return i386.AFCOMF return x86.AFCOMF
case gc.OCMP<<16 | (gc.TFLOAT32<<8 | Fpop): case gc.OCMP<<16 | (gc.TFLOAT32<<8 | Fpop):
return i386.AFCOMFP return x86.AFCOMFP
case gc.OCMP<<16 | (gc.TFLOAT64<<8 | 0): case gc.OCMP<<16 | (gc.TFLOAT64<<8 | 0):
return i386.AFCOMD return x86.AFCOMD
case gc.OCMP<<16 | (gc.TFLOAT64<<8 | Fpop): case gc.OCMP<<16 | (gc.TFLOAT64<<8 | Fpop):
return i386.AFCOMDP return x86.AFCOMDP
case gc.OCMP<<16 | (gc.TFLOAT64<<8 | Fpop2): case gc.OCMP<<16 | (gc.TFLOAT64<<8 | Fpop2):
return i386.AFCOMDPP return x86.AFCOMDPP
case gc.OMINUS<<16 | (gc.TFLOAT32<<8 | 0): case gc.OMINUS<<16 | (gc.TFLOAT32<<8 | 0):
return i386.AFCHS return x86.AFCHS
case gc.OMINUS<<16 | (gc.TFLOAT64<<8 | 0): case gc.OMINUS<<16 | (gc.TFLOAT64<<8 | 0):
return i386.AFCHS return x86.AFCHS
} }
gc.Fatal("foptoas %v %v %#x", gc.Oconv(int(op), 0), gc.Tconv(t, 0), flg) gc.Fatal("foptoas %v %v %#x", gc.Oconv(int(op), 0), gc.Tconv(t, 0), flg)
...@@ -546,23 +546,23 @@ var resvd = []int{ ...@@ -546,23 +546,23 @@ var resvd = []int{
// REG_DI, // for movstring // REG_DI, // for movstring
// REG_SI, // for movstring // REG_SI, // for movstring
i386.REG_AX, // for divide x86.REG_AX, // for divide
i386.REG_CX, // for shift x86.REG_CX, // for shift
i386.REG_DX, // for divide x86.REG_DX, // for divide
i386.REG_SP, // for stack x86.REG_SP, // for stack
i386.REG_BL, // because REG_BX can be allocated x86.REG_BL, // because REG_BX can be allocated
i386.REG_BH, x86.REG_BH,
} }
func ginit() { func ginit() {
for i := 0; i < len(reg); i++ { for i := 0; i < len(reg); i++ {
reg[i] = 1 reg[i] = 1
} }
for i := i386.REG_AX; i <= i386.REG_DI; i++ { for i := x86.REG_AX; i <= x86.REG_DI; i++ {
reg[i] = 0 reg[i] = 0
} }
for i := i386.REG_X0; i <= i386.REG_X7; i++ { for i := x86.REG_X0; i <= x86.REG_X7; i++ {
reg[i] = 0 reg[i] = 0
} }
for i := 0; i < len(resvd); i++ { for i := 0; i < len(resvd); i++ {
...@@ -570,19 +570,19 @@ func ginit() { ...@@ -570,19 +570,19 @@ func ginit() {
} }
} }
var regpc [i386.MAXREG]uint32 var regpc [x86.MAXREG]uint32
func gclean() { func gclean() {
for i := 0; i < len(resvd); i++ { for i := 0; i < len(resvd); i++ {
reg[resvd[i]]-- reg[resvd[i]]--
} }
for i := i386.REG_AX; i <= i386.REG_DI; i++ { for i := x86.REG_AX; i <= x86.REG_DI; i++ {
if reg[i] != 0 { if reg[i] != 0 {
gc.Yyerror("reg %v left allocated at %x", obj.Rconv(i), regpc[i]) gc.Yyerror("reg %v left allocated at %x", obj.Rconv(i), regpc[i])
} }
} }
for i := i386.REG_X0; i <= i386.REG_X7; i++ { for i := x86.REG_X0; i <= x86.REG_X7; i++ {
if reg[i] != 0 { if reg[i] != 0 {
gc.Yyerror("reg %v left allocated\n", obj.Rconv(i)) gc.Yyerror("reg %v left allocated\n", obj.Rconv(i))
} }
...@@ -592,7 +592,7 @@ func gclean() { ...@@ -592,7 +592,7 @@ func gclean() {
func anyregalloc() bool { func anyregalloc() bool {
var j int var j int
for i := i386.REG_AX; i <= i386.REG_DI; i++ { for i := x86.REG_AX; i <= x86.REG_DI; i++ {
if reg[i] == 0 { if reg[i] == 0 {
goto ok goto ok
} }
...@@ -605,7 +605,7 @@ func anyregalloc() bool { ...@@ -605,7 +605,7 @@ func anyregalloc() bool {
ok: ok:
} }
for i := i386.REG_X0; i <= i386.REG_X7; i++ { for i := x86.REG_X0; i <= x86.REG_X7; i++ {
if reg[i] != 0 { if reg[i] != 0 {
return true return true
} }
...@@ -641,19 +641,19 @@ func regalloc(n *gc.Node, t *gc.Type, o *gc.Node) { ...@@ -641,19 +641,19 @@ func regalloc(n *gc.Node, t *gc.Type, o *gc.Node) {
gc.TBOOL: gc.TBOOL:
if o != nil && o.Op == gc.OREGISTER { if o != nil && o.Op == gc.OREGISTER {
i = int(o.Val.U.Reg) i = int(o.Val.U.Reg)
if i >= i386.REG_AX && i <= i386.REG_DI { if i >= x86.REG_AX && i <= x86.REG_DI {
goto out goto out
} }
} }
for i = i386.REG_AX; i <= i386.REG_DI; i++ { for i = x86.REG_AX; i <= x86.REG_DI; i++ {
if reg[i] == 0 { if reg[i] == 0 {
goto out goto out
} }
} }
fmt.Printf("registers allocated at\n") fmt.Printf("registers allocated at\n")
for i := i386.REG_AX; i <= i386.REG_DI; i++ { for i := x86.REG_AX; i <= x86.REG_DI; i++ {
fmt.Printf("\t%v\t%#x\n", obj.Rconv(i), regpc[i]) fmt.Printf("\t%v\t%#x\n", obj.Rconv(i), regpc[i])
} }
gc.Fatal("out of fixed registers") gc.Fatal("out of fixed registers")
...@@ -662,24 +662,24 @@ func regalloc(n *gc.Node, t *gc.Type, o *gc.Node) { ...@@ -662,24 +662,24 @@ func regalloc(n *gc.Node, t *gc.Type, o *gc.Node) {
case gc.TFLOAT32, case gc.TFLOAT32,
gc.TFLOAT64: gc.TFLOAT64:
if gc.Use_sse == 0 { if gc.Use_sse == 0 {
i = i386.REG_F0 i = x86.REG_F0
goto out goto out
} }
if o != nil && o.Op == gc.OREGISTER { if o != nil && o.Op == gc.OREGISTER {
i = int(o.Val.U.Reg) i = int(o.Val.U.Reg)
if i >= i386.REG_X0 && i <= i386.REG_X7 { if i >= x86.REG_X0 && i <= x86.REG_X7 {
goto out goto out
} }
} }
for i = i386.REG_X0; i <= i386.REG_X7; i++ { for i = x86.REG_X0; i <= x86.REG_X7; i++ {
if reg[i] == 0 { if reg[i] == 0 {
goto out goto out
} }
} }
fmt.Printf("registers allocated at\n") fmt.Printf("registers allocated at\n")
for i := i386.REG_X0; i <= i386.REG_X7; i++ { for i := x86.REG_X0; i <= x86.REG_X7; i++ {
fmt.Printf("\t%v\t%#x\n", obj.Rconv(i), regpc[i]) fmt.Printf("\t%v\t%#x\n", obj.Rconv(i), regpc[i])
} }
gc.Fatal("out of floating registers") gc.Fatal("out of floating registers")
...@@ -692,12 +692,12 @@ err: ...@@ -692,12 +692,12 @@ err:
return return
out: out:
if i == i386.REG_SP { if i == x86.REG_SP {
fmt.Printf("alloc SP\n") fmt.Printf("alloc SP\n")
} }
if reg[i] == 0 { if reg[i] == 0 {
regpc[i] = uint32(obj.Getcallerpc(&n)) regpc[i] = uint32(obj.Getcallerpc(&n))
if i == i386.REG_AX || i == i386.REG_CX || i == i386.REG_DX || i == i386.REG_SP { if i == x86.REG_AX || i == x86.REG_CX || i == x86.REG_DX || i == x86.REG_SP {
gc.Dump("regalloc-o", o) gc.Dump("regalloc-o", o)
gc.Fatal("regalloc %v", obj.Rconv(i)) gc.Fatal("regalloc %v", obj.Rconv(i))
} }
...@@ -715,7 +715,7 @@ func regfree(n *gc.Node) { ...@@ -715,7 +715,7 @@ func regfree(n *gc.Node) {
gc.Fatal("regfree: not a register") gc.Fatal("regfree: not a register")
} }
i := int(n.Val.U.Reg) i := int(n.Val.U.Reg)
if i == i386.REG_SP { if i == x86.REG_SP {
return return
} }
if i < 0 || i >= len(reg) { if i < 0 || i >= len(reg) {
...@@ -725,7 +725,7 @@ func regfree(n *gc.Node) { ...@@ -725,7 +725,7 @@ func regfree(n *gc.Node) {
gc.Fatal("regfree: reg not allocated") gc.Fatal("regfree: reg not allocated")
} }
reg[i]-- reg[i]--
if reg[i] == 0 && (i == i386.REG_AX || i == i386.REG_CX || i == i386.REG_DX || i == i386.REG_SP) { if reg[i] == 0 && (i == x86.REG_AX || i == x86.REG_CX || i == x86.REG_DX || i == x86.REG_SP) {
gc.Fatal("regfree %v", obj.Rconv(i)) gc.Fatal("regfree %v", obj.Rconv(i))
} }
} }
...@@ -936,7 +936,7 @@ func gmove(f *gc.Node, t *gc.Node) { ...@@ -936,7 +936,7 @@ func gmove(f *gc.Node, t *gc.Node) {
gc.TINT8<<16 | gc.TUINT8, gc.TINT8<<16 | gc.TUINT8,
gc.TUINT8<<16 | gc.TINT8, gc.TUINT8<<16 | gc.TINT8,
gc.TUINT8<<16 | gc.TUINT8: gc.TUINT8<<16 | gc.TUINT8:
a = i386.AMOVB a = x86.AMOVB
case gc.TINT16<<16 | gc.TINT8, // truncate case gc.TINT16<<16 | gc.TINT8, // truncate
gc.TUINT16<<16 | gc.TINT8, gc.TUINT16<<16 | gc.TINT8,
...@@ -946,7 +946,7 @@ func gmove(f *gc.Node, t *gc.Node) { ...@@ -946,7 +946,7 @@ func gmove(f *gc.Node, t *gc.Node) {
gc.TUINT16<<16 | gc.TUINT8, gc.TUINT16<<16 | gc.TUINT8,
gc.TINT32<<16 | gc.TUINT8, gc.TINT32<<16 | gc.TUINT8,
gc.TUINT32<<16 | gc.TUINT8: gc.TUINT32<<16 | gc.TUINT8:
a = i386.AMOVB a = x86.AMOVB
goto rsrc goto rsrc
...@@ -959,9 +959,9 @@ func gmove(f *gc.Node, t *gc.Node) { ...@@ -959,9 +959,9 @@ func gmove(f *gc.Node, t *gc.Node) {
split64(f, &flo, &fhi) split64(f, &flo, &fhi)
var r1 gc.Node var r1 gc.Node
gc.Nodreg(&r1, t.Type, i386.REG_AX) gc.Nodreg(&r1, t.Type, x86.REG_AX)
gmove(&flo, &r1) gmove(&flo, &r1)
gins(i386.AMOVB, &r1, t) gins(x86.AMOVB, &r1, t)
splitclean() splitclean()
return return
...@@ -969,13 +969,13 @@ func gmove(f *gc.Node, t *gc.Node) { ...@@ -969,13 +969,13 @@ func gmove(f *gc.Node, t *gc.Node) {
gc.TINT16<<16 | gc.TUINT16, gc.TINT16<<16 | gc.TUINT16,
gc.TUINT16<<16 | gc.TINT16, gc.TUINT16<<16 | gc.TINT16,
gc.TUINT16<<16 | gc.TUINT16: gc.TUINT16<<16 | gc.TUINT16:
a = i386.AMOVW a = x86.AMOVW
case gc.TINT32<<16 | gc.TINT16, // truncate case gc.TINT32<<16 | gc.TINT16, // truncate
gc.TUINT32<<16 | gc.TINT16, gc.TUINT32<<16 | gc.TINT16,
gc.TINT32<<16 | gc.TUINT16, gc.TINT32<<16 | gc.TUINT16,
gc.TUINT32<<16 | gc.TUINT16: gc.TUINT32<<16 | gc.TUINT16:
a = i386.AMOVW a = x86.AMOVW
goto rsrc goto rsrc
...@@ -988,9 +988,9 @@ func gmove(f *gc.Node, t *gc.Node) { ...@@ -988,9 +988,9 @@ func gmove(f *gc.Node, t *gc.Node) {
split64(f, &flo, &fhi) split64(f, &flo, &fhi)
var r1 gc.Node var r1 gc.Node
gc.Nodreg(&r1, t.Type, i386.REG_AX) gc.Nodreg(&r1, t.Type, x86.REG_AX)
gmove(&flo, &r1) gmove(&flo, &r1)
gins(i386.AMOVW, &r1, t) gins(x86.AMOVW, &r1, t)
splitclean() splitclean()
return return
...@@ -998,7 +998,7 @@ func gmove(f *gc.Node, t *gc.Node) { ...@@ -998,7 +998,7 @@ func gmove(f *gc.Node, t *gc.Node) {
gc.TINT32<<16 | gc.TUINT32, gc.TINT32<<16 | gc.TUINT32,
gc.TUINT32<<16 | gc.TINT32, gc.TUINT32<<16 | gc.TINT32,
gc.TUINT32<<16 | gc.TUINT32: gc.TUINT32<<16 | gc.TUINT32:
a = i386.AMOVL a = x86.AMOVL
case gc.TINT64<<16 | gc.TINT32, // truncate case gc.TINT64<<16 | gc.TINT32, // truncate
gc.TUINT64<<16 | gc.TINT32, gc.TUINT64<<16 | gc.TINT32,
...@@ -1009,9 +1009,9 @@ func gmove(f *gc.Node, t *gc.Node) { ...@@ -1009,9 +1009,9 @@ func gmove(f *gc.Node, t *gc.Node) {
split64(f, &flo, &fhi) split64(f, &flo, &fhi)
var r1 gc.Node var r1 gc.Node
gc.Nodreg(&r1, t.Type, i386.REG_AX) gc.Nodreg(&r1, t.Type, x86.REG_AX)
gmove(&flo, &r1) gmove(&flo, &r1)
gins(i386.AMOVL, &r1, t) gins(x86.AMOVL, &r1, t)
splitclean() splitclean()
return return
...@@ -1027,17 +1027,17 @@ func gmove(f *gc.Node, t *gc.Node) { ...@@ -1027,17 +1027,17 @@ func gmove(f *gc.Node, t *gc.Node) {
var thi gc.Node var thi gc.Node
split64(t, &tlo, &thi) split64(t, &tlo, &thi)
if f.Op == gc.OLITERAL { if f.Op == gc.OLITERAL {
gins(i386.AMOVL, &flo, &tlo) gins(x86.AMOVL, &flo, &tlo)
gins(i386.AMOVL, &fhi, &thi) gins(x86.AMOVL, &fhi, &thi)
} else { } else {
var r1 gc.Node var r1 gc.Node
gc.Nodreg(&r1, gc.Types[gc.TUINT32], i386.REG_AX) gc.Nodreg(&r1, gc.Types[gc.TUINT32], x86.REG_AX)
var r2 gc.Node var r2 gc.Node
gc.Nodreg(&r2, gc.Types[gc.TUINT32], i386.REG_DX) gc.Nodreg(&r2, gc.Types[gc.TUINT32], x86.REG_DX)
gins(i386.AMOVL, &flo, &r1) gins(x86.AMOVL, &flo, &r1)
gins(i386.AMOVL, &fhi, &r2) gins(x86.AMOVL, &fhi, &r2)
gins(i386.AMOVL, &r1, &tlo) gins(x86.AMOVL, &r1, &tlo)
gins(i386.AMOVL, &r2, &thi) gins(x86.AMOVL, &r2, &thi)
} }
splitclean() splitclean()
...@@ -1049,13 +1049,13 @@ func gmove(f *gc.Node, t *gc.Node) { ...@@ -1049,13 +1049,13 @@ func gmove(f *gc.Node, t *gc.Node) {
*/ */
case gc.TINT8<<16 | gc.TINT16, // sign extend int8 case gc.TINT8<<16 | gc.TINT16, // sign extend int8
gc.TINT8<<16 | gc.TUINT16: gc.TINT8<<16 | gc.TUINT16:
a = i386.AMOVBWSX a = x86.AMOVBWSX
goto rdst goto rdst
case gc.TINT8<<16 | gc.TINT32, case gc.TINT8<<16 | gc.TINT32,
gc.TINT8<<16 | gc.TUINT32: gc.TINT8<<16 | gc.TUINT32:
a = i386.AMOVBLSX a = x86.AMOVBLSX
goto rdst goto rdst
case gc.TINT8<<16 | gc.TINT64, // convert via int32 case gc.TINT8<<16 | gc.TINT64, // convert via int32
...@@ -1066,13 +1066,13 @@ func gmove(f *gc.Node, t *gc.Node) { ...@@ -1066,13 +1066,13 @@ func gmove(f *gc.Node, t *gc.Node) {
case gc.TUINT8<<16 | gc.TINT16, // zero extend uint8 case gc.TUINT8<<16 | gc.TINT16, // zero extend uint8
gc.TUINT8<<16 | gc.TUINT16: gc.TUINT8<<16 | gc.TUINT16:
a = i386.AMOVBWZX a = x86.AMOVBWZX
goto rdst goto rdst
case gc.TUINT8<<16 | gc.TINT32, case gc.TUINT8<<16 | gc.TINT32,
gc.TUINT8<<16 | gc.TUINT32: gc.TUINT8<<16 | gc.TUINT32:
a = i386.AMOVBLZX a = x86.AMOVBLZX
goto rdst goto rdst
case gc.TUINT8<<16 | gc.TINT64, // convert via uint32 case gc.TUINT8<<16 | gc.TINT64, // convert via uint32
...@@ -1083,7 +1083,7 @@ func gmove(f *gc.Node, t *gc.Node) { ...@@ -1083,7 +1083,7 @@ func gmove(f *gc.Node, t *gc.Node) {
case gc.TINT16<<16 | gc.TINT32, // sign extend int16 case gc.TINT16<<16 | gc.TINT32, // sign extend int16
gc.TINT16<<16 | gc.TUINT32: gc.TINT16<<16 | gc.TUINT32:
a = i386.AMOVWLSX a = x86.AMOVWLSX
goto rdst goto rdst
...@@ -1095,7 +1095,7 @@ func gmove(f *gc.Node, t *gc.Node) { ...@@ -1095,7 +1095,7 @@ func gmove(f *gc.Node, t *gc.Node) {
case gc.TUINT16<<16 | gc.TINT32, // zero extend uint16 case gc.TUINT16<<16 | gc.TINT32, // zero extend uint16
gc.TUINT16<<16 | gc.TUINT32: gc.TUINT16<<16 | gc.TUINT32:
a = i386.AMOVWLZX a = x86.AMOVWLZX
goto rdst goto rdst
...@@ -1112,13 +1112,13 @@ func gmove(f *gc.Node, t *gc.Node) { ...@@ -1112,13 +1112,13 @@ func gmove(f *gc.Node, t *gc.Node) {
split64(t, &tlo, &thi) split64(t, &tlo, &thi)
var flo gc.Node var flo gc.Node
gc.Nodreg(&flo, tlo.Type, i386.REG_AX) gc.Nodreg(&flo, tlo.Type, x86.REG_AX)
var fhi gc.Node var fhi gc.Node
gc.Nodreg(&fhi, thi.Type, i386.REG_DX) gc.Nodreg(&fhi, thi.Type, x86.REG_DX)
gmove(f, &flo) gmove(f, &flo)
gins(i386.ACDQ, nil, nil) gins(x86.ACDQ, nil, nil)
gins(i386.AMOVL, &flo, &tlo) gins(x86.AMOVL, &flo, &tlo)
gins(i386.AMOVL, &fhi, &thi) gins(x86.AMOVL, &fhi, &thi)
splitclean() splitclean()
return return
...@@ -1129,7 +1129,7 @@ func gmove(f *gc.Node, t *gc.Node) { ...@@ -1129,7 +1129,7 @@ func gmove(f *gc.Node, t *gc.Node) {
split64(t, &tlo, &thi) split64(t, &tlo, &thi)
gmove(f, &tlo) gmove(f, &tlo)
gins(i386.AMOVL, ncon(0), &thi) gins(x86.AMOVL, ncon(0), &thi)
splitclean() splitclean()
return return
} }
...@@ -1220,11 +1220,11 @@ func floatmove(f *gc.Node, t *gc.Node) { ...@@ -1220,11 +1220,11 @@ func floatmove(f *gc.Node, t *gc.Node) {
} }
var r1 gc.Node var r1 gc.Node
gc.Nodreg(&r1, gc.Types[ft], i386.REG_F0) gc.Nodreg(&r1, gc.Types[ft], x86.REG_F0)
if ft == gc.TFLOAT32 { if ft == gc.TFLOAT32 {
gins(i386.AFMOVF, f, &r1) gins(x86.AFMOVF, f, &r1)
} else { } else {
gins(i386.AFMOVD, f, &r1) gins(x86.AFMOVD, f, &r1)
} }
// set round to zero mode during conversion // set round to zero mode during conversion
...@@ -1233,17 +1233,17 @@ func floatmove(f *gc.Node, t *gc.Node) { ...@@ -1233,17 +1233,17 @@ func floatmove(f *gc.Node, t *gc.Node) {
var t2 gc.Node var t2 gc.Node
memname(&t2, gc.Types[gc.TUINT16]) memname(&t2, gc.Types[gc.TUINT16])
gins(i386.AFSTCW, nil, &t1) gins(x86.AFSTCW, nil, &t1)
gins(i386.AMOVW, ncon(0xf7f), &t2) gins(x86.AMOVW, ncon(0xf7f), &t2)
gins(i386.AFLDCW, &t2, nil) gins(x86.AFLDCW, &t2, nil)
if tt == gc.TINT16 { if tt == gc.TINT16 {
gins(i386.AFMOVWP, &r1, t) gins(x86.AFMOVWP, &r1, t)
} else if tt == gc.TINT32 { } else if tt == gc.TINT32 {
gins(i386.AFMOVLP, &r1, t) gins(x86.AFMOVLP, &r1, t)
} else { } else {
gins(i386.AFMOVVP, &r1, t) gins(x86.AFMOVVP, &r1, t)
} }
gins(i386.AFLDCW, &t1, nil) gins(x86.AFLDCW, &t1, nil)
return return
case gc.TFLOAT32<<16 | gc.TUINT64, case gc.TFLOAT32<<16 | gc.TUINT64,
...@@ -1255,36 +1255,36 @@ func floatmove(f *gc.Node, t *gc.Node) { ...@@ -1255,36 +1255,36 @@ func floatmove(f *gc.Node, t *gc.Node) {
bignodes() bignodes()
var f0 gc.Node var f0 gc.Node
gc.Nodreg(&f0, gc.Types[ft], i386.REG_F0) gc.Nodreg(&f0, gc.Types[ft], x86.REG_F0)
var f1 gc.Node var f1 gc.Node
gc.Nodreg(&f1, gc.Types[ft], i386.REG_F0+1) gc.Nodreg(&f1, gc.Types[ft], x86.REG_F0+1)
var ax gc.Node var ax gc.Node
gc.Nodreg(&ax, gc.Types[gc.TUINT16], i386.REG_AX) gc.Nodreg(&ax, gc.Types[gc.TUINT16], x86.REG_AX)
if ft == gc.TFLOAT32 { if ft == gc.TFLOAT32 {
gins(i386.AFMOVF, f, &f0) gins(x86.AFMOVF, f, &f0)
} else { } else {
gins(i386.AFMOVD, f, &f0) gins(x86.AFMOVD, f, &f0)
} }
// if 0 > v { answer = 0 } // if 0 > v { answer = 0 }
gins(i386.AFMOVD, &zerof, &f0) gins(x86.AFMOVD, &zerof, &f0)
gins(i386.AFUCOMIP, &f0, &f1) gins(x86.AFUCOMIP, &f0, &f1)
p1 := gc.Gbranch(optoas(gc.OGT, gc.Types[tt]), nil, 0) p1 := gc.Gbranch(optoas(gc.OGT, gc.Types[tt]), nil, 0)
// if 1<<64 <= v { answer = 0 too } // if 1<<64 <= v { answer = 0 too }
gins(i386.AFMOVD, &two64f, &f0) gins(x86.AFMOVD, &two64f, &f0)
gins(i386.AFUCOMIP, &f0, &f1) gins(x86.AFUCOMIP, &f0, &f1)
p2 := gc.Gbranch(optoas(gc.OGT, gc.Types[tt]), nil, 0) p2 := gc.Gbranch(optoas(gc.OGT, gc.Types[tt]), nil, 0)
gc.Patch(p1, gc.Pc) gc.Patch(p1, gc.Pc)
gins(i386.AFMOVVP, &f0, t) // don't care about t, but will pop the stack gins(x86.AFMOVVP, &f0, t) // don't care about t, but will pop the stack
var thi gc.Node var thi gc.Node
var tlo gc.Node var tlo gc.Node
split64(t, &tlo, &thi) split64(t, &tlo, &thi)
gins(i386.AMOVL, ncon(0), &tlo) gins(x86.AMOVL, ncon(0), &tlo)
gins(i386.AMOVL, ncon(0), &thi) gins(x86.AMOVL, ncon(0), &thi)
splitclean() splitclean()
p1 = gc.Gbranch(obj.AJMP, nil, 0) p1 = gc.Gbranch(obj.AJMP, nil, 0)
gc.Patch(p2, gc.Pc) gc.Patch(p2, gc.Pc)
...@@ -1299,28 +1299,28 @@ func floatmove(f *gc.Node, t *gc.Node) { ...@@ -1299,28 +1299,28 @@ func floatmove(f *gc.Node, t *gc.Node) {
var t2 gc.Node var t2 gc.Node
memname(&t2, gc.Types[gc.TUINT16]) memname(&t2, gc.Types[gc.TUINT16])
gins(i386.AFSTCW, nil, &t1) gins(x86.AFSTCW, nil, &t1)
gins(i386.AMOVW, ncon(0xf7f), &t2) gins(x86.AMOVW, ncon(0xf7f), &t2)
gins(i386.AFLDCW, &t2, nil) gins(x86.AFLDCW, &t2, nil)
// actual work // actual work
gins(i386.AFMOVD, &two63f, &f0) gins(x86.AFMOVD, &two63f, &f0)
gins(i386.AFUCOMIP, &f0, &f1) gins(x86.AFUCOMIP, &f0, &f1)
p2 = gc.Gbranch(optoas(gc.OLE, gc.Types[tt]), nil, 0) p2 = gc.Gbranch(optoas(gc.OLE, gc.Types[tt]), nil, 0)
gins(i386.AFMOVVP, &f0, t) gins(x86.AFMOVVP, &f0, t)
p3 := gc.Gbranch(obj.AJMP, nil, 0) p3 := gc.Gbranch(obj.AJMP, nil, 0)
gc.Patch(p2, gc.Pc) gc.Patch(p2, gc.Pc)
gins(i386.AFMOVD, &two63f, &f0) gins(x86.AFMOVD, &two63f, &f0)
gins(i386.AFSUBDP, &f0, &f1) gins(x86.AFSUBDP, &f0, &f1)
gins(i386.AFMOVVP, &f0, t) gins(x86.AFMOVVP, &f0, t)
split64(t, &tlo, &thi) split64(t, &tlo, &thi)
gins(i386.AXORL, ncon(0x80000000), &thi) // + 2^63 gins(x86.AXORL, ncon(0x80000000), &thi) // + 2^63
gc.Patch(p3, gc.Pc) gc.Patch(p3, gc.Pc)
splitclean() splitclean()
// restore rounding mode // restore rounding mode
gins(i386.AFLDCW, &t1, nil) gins(x86.AFLDCW, &t1, nil)
gc.Patch(p1, gc.Pc) gc.Patch(p1, gc.Pc)
return return
...@@ -1334,12 +1334,12 @@ func floatmove(f *gc.Node, t *gc.Node) { ...@@ -1334,12 +1334,12 @@ func floatmove(f *gc.Node, t *gc.Node) {
goto hardmem goto hardmem
} }
var f0 gc.Node var f0 gc.Node
gc.Nodreg(&f0, t.Type, i386.REG_F0) gc.Nodreg(&f0, t.Type, x86.REG_F0)
gins(i386.AFMOVV, f, &f0) gins(x86.AFMOVV, f, &f0)
if tt == gc.TFLOAT32 { if tt == gc.TFLOAT32 {
gins(i386.AFMOVFP, &f0, t) gins(x86.AFMOVFP, &f0, t)
} else { } else {
gins(i386.AFMOVDP, &f0, t) gins(x86.AFMOVDP, &f0, t)
} }
return return
...@@ -1349,30 +1349,30 @@ func floatmove(f *gc.Node, t *gc.Node) { ...@@ -1349,30 +1349,30 @@ func floatmove(f *gc.Node, t *gc.Node) {
case gc.TUINT64<<16 | gc.TFLOAT32, case gc.TUINT64<<16 | gc.TFLOAT32,
gc.TUINT64<<16 | gc.TFLOAT64: gc.TUINT64<<16 | gc.TFLOAT64:
var ax gc.Node var ax gc.Node
gc.Nodreg(&ax, gc.Types[gc.TUINT32], i386.REG_AX) gc.Nodreg(&ax, gc.Types[gc.TUINT32], x86.REG_AX)
var dx gc.Node var dx gc.Node
gc.Nodreg(&dx, gc.Types[gc.TUINT32], i386.REG_DX) gc.Nodreg(&dx, gc.Types[gc.TUINT32], x86.REG_DX)
var cx gc.Node var cx gc.Node
gc.Nodreg(&cx, gc.Types[gc.TUINT32], i386.REG_CX) gc.Nodreg(&cx, gc.Types[gc.TUINT32], x86.REG_CX)
var t1 gc.Node var t1 gc.Node
gc.Tempname(&t1, f.Type) gc.Tempname(&t1, f.Type)
var tlo gc.Node var tlo gc.Node
var thi gc.Node var thi gc.Node
split64(&t1, &tlo, &thi) split64(&t1, &tlo, &thi)
gmove(f, &t1) gmove(f, &t1)
gins(i386.ACMPL, &thi, ncon(0)) gins(x86.ACMPL, &thi, ncon(0))
p1 := gc.Gbranch(i386.AJLT, nil, 0) p1 := gc.Gbranch(x86.AJLT, nil, 0)
// native // native
var r1 gc.Node var r1 gc.Node
gc.Nodreg(&r1, gc.Types[tt], i386.REG_F0) gc.Nodreg(&r1, gc.Types[tt], x86.REG_F0)
gins(i386.AFMOVV, &t1, &r1) gins(x86.AFMOVV, &t1, &r1)
if tt == gc.TFLOAT32 { if tt == gc.TFLOAT32 {
gins(i386.AFMOVFP, &r1, t) gins(x86.AFMOVFP, &r1, t)
} else { } else {
gins(i386.AFMOVDP, &r1, t) gins(x86.AFMOVDP, &r1, t)
} }
p2 := gc.Gbranch(obj.AJMP, nil, 0) p2 := gc.Gbranch(obj.AJMP, nil, 0)
...@@ -1381,25 +1381,25 @@ func floatmove(f *gc.Node, t *gc.Node) { ...@@ -1381,25 +1381,25 @@ func floatmove(f *gc.Node, t *gc.Node) {
gmove(&tlo, &ax) gmove(&tlo, &ax)
gmove(&thi, &dx) gmove(&thi, &dx)
p1 = gins(i386.ASHRL, ncon(1), &ax) p1 = gins(x86.ASHRL, ncon(1), &ax)
p1.From.Index = i386.REG_DX // double-width shift DX -> AX p1.From.Index = x86.REG_DX // double-width shift DX -> AX
p1.From.Scale = 0 p1.From.Scale = 0
gins(i386.AMOVL, ncon(0), &cx) gins(x86.AMOVL, ncon(0), &cx)
gins(i386.ASETCC, nil, &cx) gins(x86.ASETCC, nil, &cx)
gins(i386.AORL, &cx, &ax) gins(x86.AORL, &cx, &ax)
gins(i386.ASHRL, ncon(1), &dx) gins(x86.ASHRL, ncon(1), &dx)
gmove(&dx, &thi) gmove(&dx, &thi)
gmove(&ax, &tlo) gmove(&ax, &tlo)
gc.Nodreg(&r1, gc.Types[tt], i386.REG_F0) gc.Nodreg(&r1, gc.Types[tt], x86.REG_F0)
var r2 gc.Node var r2 gc.Node
gc.Nodreg(&r2, gc.Types[tt], i386.REG_F0+1) gc.Nodreg(&r2, gc.Types[tt], x86.REG_F0+1)
gins(i386.AFMOVV, &t1, &r1) gins(x86.AFMOVV, &t1, &r1)
gins(i386.AFMOVD, &r1, &r1) gins(x86.AFMOVD, &r1, &r1)
gins(i386.AFADDDP, &r1, &r2) gins(x86.AFADDDP, &r1, &r2)
if tt == gc.TFLOAT32 { if tt == gc.TFLOAT32 {
gins(i386.AFMOVFP, &r1, t) gins(x86.AFMOVFP, &r1, t)
} else { } else {
gins(i386.AFMOVDP, &r1, t) gins(x86.AFMOVDP, &r1, t)
} }
gc.Patch(p2, gc.Pc) gc.Patch(p2, gc.Pc)
splitclean() splitclean()
...@@ -1449,12 +1449,12 @@ func floatmove_387(f *gc.Node, t *gc.Node) { ...@@ -1449,12 +1449,12 @@ func floatmove_387(f *gc.Node, t *gc.Node) {
goto hardmem goto hardmem
} }
var r1 gc.Node var r1 gc.Node
gc.Nodreg(&r1, gc.Types[ft], i386.REG_F0) gc.Nodreg(&r1, gc.Types[ft], x86.REG_F0)
if f.Op != gc.OREGISTER { if f.Op != gc.OREGISTER {
if ft == gc.TFLOAT32 { if ft == gc.TFLOAT32 {
gins(i386.AFMOVF, f, &r1) gins(x86.AFMOVF, f, &r1)
} else { } else {
gins(i386.AFMOVD, f, &r1) gins(x86.AFMOVD, f, &r1)
} }
} }
...@@ -1464,17 +1464,17 @@ func floatmove_387(f *gc.Node, t *gc.Node) { ...@@ -1464,17 +1464,17 @@ func floatmove_387(f *gc.Node, t *gc.Node) {
var t2 gc.Node var t2 gc.Node
memname(&t2, gc.Types[gc.TUINT16]) memname(&t2, gc.Types[gc.TUINT16])
gins(i386.AFSTCW, nil, &t1) gins(x86.AFSTCW, nil, &t1)
gins(i386.AMOVW, ncon(0xf7f), &t2) gins(x86.AMOVW, ncon(0xf7f), &t2)
gins(i386.AFLDCW, &t2, nil) gins(x86.AFLDCW, &t2, nil)
if tt == gc.TINT16 { if tt == gc.TINT16 {
gins(i386.AFMOVWP, &r1, t) gins(x86.AFMOVWP, &r1, t)
} else if tt == gc.TINT32 { } else if tt == gc.TINT32 {
gins(i386.AFMOVLP, &r1, t) gins(x86.AFMOVLP, &r1, t)
} else { } else {
gins(i386.AFMOVVP, &r1, t) gins(x86.AFMOVVP, &r1, t)
} }
gins(i386.AFLDCW, &t1, nil) gins(x86.AFLDCW, &t1, nil)
return return
// convert via int32. // convert via int32.
...@@ -1493,9 +1493,9 @@ func floatmove_387(f *gc.Node, t *gc.Node) { ...@@ -1493,9 +1493,9 @@ func floatmove_387(f *gc.Node, t *gc.Node) {
gc.Fatal("gmove %v", gc.Nconv(t, 0)) gc.Fatal("gmove %v", gc.Nconv(t, 0))
case gc.TINT8: case gc.TINT8:
gins(i386.ACMPL, &t1, ncon(-0x80&(1<<32-1))) gins(x86.ACMPL, &t1, ncon(-0x80&(1<<32-1)))
p1 := gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TINT32]), nil, -1) p1 := gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TINT32]), nil, -1)
gins(i386.ACMPL, &t1, ncon(0x7f)) gins(x86.ACMPL, &t1, ncon(0x7f))
p2 := gc.Gbranch(optoas(gc.OGT, gc.Types[gc.TINT32]), nil, -1) p2 := gc.Gbranch(optoas(gc.OGT, gc.Types[gc.TINT32]), nil, -1)
p3 := gc.Gbranch(obj.AJMP, nil, 0) p3 := gc.Gbranch(obj.AJMP, nil, 0)
gc.Patch(p1, gc.Pc) gc.Patch(p1, gc.Pc)
...@@ -1505,16 +1505,16 @@ func floatmove_387(f *gc.Node, t *gc.Node) { ...@@ -1505,16 +1505,16 @@ func floatmove_387(f *gc.Node, t *gc.Node) {
gmove(&t1, t) gmove(&t1, t)
case gc.TUINT8: case gc.TUINT8:
gins(i386.ATESTL, ncon(0xffffff00), &t1) gins(x86.ATESTL, ncon(0xffffff00), &t1)
p1 := gc.Gbranch(i386.AJEQ, nil, +1) p1 := gc.Gbranch(x86.AJEQ, nil, +1)
gins(i386.AMOVL, ncon(0), &t1) gins(x86.AMOVL, ncon(0), &t1)
gc.Patch(p1, gc.Pc) gc.Patch(p1, gc.Pc)
gmove(&t1, t) gmove(&t1, t)
case gc.TUINT16: case gc.TUINT16:
gins(i386.ATESTL, ncon(0xffff0000), &t1) gins(x86.ATESTL, ncon(0xffff0000), &t1)
p1 := gc.Gbranch(i386.AJEQ, nil, +1) p1 := gc.Gbranch(x86.AJEQ, nil, +1)
gins(i386.AMOVL, ncon(0), &t1) gins(x86.AMOVL, ncon(0), &t1)
gc.Patch(p1, gc.Pc) gc.Patch(p1, gc.Pc)
gmove(&t1, t) gmove(&t1, t)
} }
...@@ -1547,13 +1547,13 @@ func floatmove_387(f *gc.Node, t *gc.Node) { ...@@ -1547,13 +1547,13 @@ func floatmove_387(f *gc.Node, t *gc.Node) {
switch ft { switch ft {
case gc.TINT16: case gc.TINT16:
a = i386.AFMOVW a = x86.AFMOVW
case gc.TINT32: case gc.TINT32:
a = i386.AFMOVL a = x86.AFMOVL
default: default:
a = i386.AFMOVV a = x86.AFMOVV
} }
// convert via int32 memory // convert via int32 memory
...@@ -1589,23 +1589,23 @@ func floatmove_387(f *gc.Node, t *gc.Node) { ...@@ -1589,23 +1589,23 @@ func floatmove_387(f *gc.Node, t *gc.Node) {
goto hard goto hard
} }
if f.Op == gc.OREGISTER && t.Op == gc.OREGISTER { if f.Op == gc.OREGISTER && t.Op == gc.OREGISTER {
if f.Val.U.Reg != i386.REG_F0 || t.Val.U.Reg != i386.REG_F0 { if f.Val.U.Reg != x86.REG_F0 || t.Val.U.Reg != x86.REG_F0 {
goto fatal goto fatal
} }
return return
} }
a = i386.AFMOVF a = x86.AFMOVF
if ft == gc.TFLOAT64 { if ft == gc.TFLOAT64 {
a = i386.AFMOVD a = x86.AFMOVD
} }
if gc.Ismem(t) { if gc.Ismem(t) {
if f.Op != gc.OREGISTER || f.Val.U.Reg != i386.REG_F0 { if f.Op != gc.OREGISTER || f.Val.U.Reg != x86.REG_F0 {
gc.Fatal("gmove %v", gc.Nconv(f, 0)) gc.Fatal("gmove %v", gc.Nconv(f, 0))
} }
a = i386.AFMOVFP a = x86.AFMOVFP
if ft == gc.TFLOAT64 { if ft == gc.TFLOAT64 {
a = i386.AFMOVDP a = x86.AFMOVDP
} }
} }
...@@ -1614,16 +1614,16 @@ func floatmove_387(f *gc.Node, t *gc.Node) { ...@@ -1614,16 +1614,16 @@ func floatmove_387(f *gc.Node, t *gc.Node) {
goto hard goto hard
} }
if f.Op == gc.OREGISTER && t.Op == gc.OREGISTER { if f.Op == gc.OREGISTER && t.Op == gc.OREGISTER {
if f.Val.U.Reg != i386.REG_F0 || t.Val.U.Reg != i386.REG_F0 { if f.Val.U.Reg != x86.REG_F0 || t.Val.U.Reg != x86.REG_F0 {
goto fatal goto fatal
} }
return return
} }
if f.Op == gc.OREGISTER { if f.Op == gc.OREGISTER {
gins(i386.AFMOVDP, f, t) gins(x86.AFMOVDP, f, t)
} else { } else {
gins(i386.AFMOVF, f, t) gins(x86.AFMOVF, f, t)
} }
return return
...@@ -1634,15 +1634,15 @@ func floatmove_387(f *gc.Node, t *gc.Node) { ...@@ -1634,15 +1634,15 @@ func floatmove_387(f *gc.Node, t *gc.Node) {
if f.Op == gc.OREGISTER && t.Op == gc.OREGISTER { if f.Op == gc.OREGISTER && t.Op == gc.OREGISTER {
var r1 gc.Node var r1 gc.Node
gc.Tempname(&r1, gc.Types[gc.TFLOAT32]) gc.Tempname(&r1, gc.Types[gc.TFLOAT32])
gins(i386.AFMOVFP, f, &r1) gins(x86.AFMOVFP, f, &r1)
gins(i386.AFMOVF, &r1, t) gins(x86.AFMOVF, &r1, t)
return return
} }
if f.Op == gc.OREGISTER { if f.Op == gc.OREGISTER {
gins(i386.AFMOVFP, f, t) gins(x86.AFMOVFP, f, t)
} else { } else {
gins(i386.AFMOVD, f, t) gins(x86.AFMOVD, f, t)
} }
return return
} }
...@@ -1713,11 +1713,11 @@ func floatmove_sse(f *gc.Node, t *gc.Node) { ...@@ -1713,11 +1713,11 @@ func floatmove_sse(f *gc.Node, t *gc.Node) {
goto hardmem goto hardmem
case gc.TFLOAT32<<16 | gc.TINT32: case gc.TFLOAT32<<16 | gc.TINT32:
a = i386.ACVTTSS2SL a = x86.ACVTTSS2SL
goto rdst goto rdst
case gc.TFLOAT64<<16 | gc.TINT32: case gc.TFLOAT64<<16 | gc.TINT32:
a = i386.ACVTTSD2SL a = x86.ACVTTSD2SL
goto rdst goto rdst
// convert via int32 memory // convert via int32 memory
...@@ -1744,28 +1744,28 @@ func floatmove_sse(f *gc.Node, t *gc.Node) { ...@@ -1744,28 +1744,28 @@ func floatmove_sse(f *gc.Node, t *gc.Node) {
goto hardmem goto hardmem
case gc.TINT32<<16 | gc.TFLOAT32: case gc.TINT32<<16 | gc.TFLOAT32:
a = i386.ACVTSL2SS a = x86.ACVTSL2SS
goto rdst goto rdst
case gc.TINT32<<16 | gc.TFLOAT64: case gc.TINT32<<16 | gc.TFLOAT64:
a = i386.ACVTSL2SD a = x86.ACVTSL2SD
goto rdst goto rdst
/* /*
* float to float * float to float
*/ */
case gc.TFLOAT32<<16 | gc.TFLOAT32: case gc.TFLOAT32<<16 | gc.TFLOAT32:
a = i386.AMOVSS a = x86.AMOVSS
case gc.TFLOAT64<<16 | gc.TFLOAT64: case gc.TFLOAT64<<16 | gc.TFLOAT64:
a = i386.AMOVSD a = x86.AMOVSD
case gc.TFLOAT32<<16 | gc.TFLOAT64: case gc.TFLOAT32<<16 | gc.TFLOAT64:
a = i386.ACVTSS2SD a = x86.ACVTSS2SD
goto rdst goto rdst
case gc.TFLOAT64<<16 | gc.TFLOAT32: case gc.TFLOAT64<<16 | gc.TFLOAT32:
a = i386.ACVTSD2SS a = x86.ACVTSD2SS
goto rdst goto rdst
} }
...@@ -1820,25 +1820,25 @@ func samaddr(f *gc.Node, t *gc.Node) bool { ...@@ -1820,25 +1820,25 @@ func samaddr(f *gc.Node, t *gc.Node) bool {
* as f, t * as f, t
*/ */
func gins(as int, f *gc.Node, t *gc.Node) *obj.Prog { func gins(as int, f *gc.Node, t *gc.Node) *obj.Prog {
if as == i386.AFMOVF && f != nil && f.Op == gc.OREGISTER && t != nil && t.Op == gc.OREGISTER { if as == x86.AFMOVF && f != nil && f.Op == gc.OREGISTER && t != nil && t.Op == gc.OREGISTER {
gc.Fatal("gins MOVF reg, reg") gc.Fatal("gins MOVF reg, reg")
} }
if as == i386.ACVTSD2SS && f != nil && f.Op == gc.OLITERAL { if as == x86.ACVTSD2SS && f != nil && f.Op == gc.OLITERAL {
gc.Fatal("gins CVTSD2SS const") gc.Fatal("gins CVTSD2SS const")
} }
if as == i386.AMOVSD && t != nil && t.Op == gc.OREGISTER && t.Val.U.Reg == i386.REG_F0 { if as == x86.AMOVSD && t != nil && t.Op == gc.OREGISTER && t.Val.U.Reg == x86.REG_F0 {
gc.Fatal("gins MOVSD into F0") gc.Fatal("gins MOVSD into F0")
} }
switch as { switch as {
case i386.AMOVB, case x86.AMOVB,
i386.AMOVW, x86.AMOVW,
i386.AMOVL: x86.AMOVL:
if f != nil && t != nil && samaddr(f, t) { if f != nil && t != nil && samaddr(f, t) {
return nil return nil
} }
case i386.ALEAL: case x86.ALEAL:
if f != nil && gc.Isconst(f, gc.CTNIL) { if f != nil && gc.Isconst(f, gc.CTNIL) {
gc.Fatal("gins LEAL nil %v", gc.Tconv(f.Type, 0)) gc.Fatal("gins LEAL nil %v", gc.Tconv(f.Type, 0))
} }
...@@ -1865,13 +1865,13 @@ func gins(as int, f *gc.Node, t *gc.Node) *obj.Prog { ...@@ -1865,13 +1865,13 @@ func gins(as int, f *gc.Node, t *gc.Node) *obj.Prog {
w := 0 w := 0
switch as { switch as {
case i386.AMOVB: case x86.AMOVB:
w = 1 w = 1
case i386.AMOVW: case x86.AMOVW:
w = 2 w = 2
case i386.AMOVL: case x86.AMOVL:
w = 4 w = 4
} }
......
...@@ -33,13 +33,13 @@ package main ...@@ -33,13 +33,13 @@ package main
import ( import (
"cmd/internal/gc" "cmd/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
i386 "cmd/internal/obj/x86" "cmd/internal/obj/x86"
"fmt" "fmt"
) )
const ( const (
REGEXT = 0 REGEXT = 0
exregoffset = i386.REG_DI exregoffset = x86.REG_DI
) )
var gactive uint32 var gactive uint32
...@@ -100,20 +100,20 @@ func peep(firstp *obj.Prog) { ...@@ -100,20 +100,20 @@ func peep(firstp *obj.Prog) {
for r := g.Start; r != nil; r = r.Link { for r := g.Start; r != nil; r = r.Link {
p = r.Prog p = r.Prog
switch p.As { switch p.As {
case i386.ALEAL: case x86.ALEAL:
if regtyp(&p.To) { if regtyp(&p.To) {
if p.From.Sym != nil { if p.From.Sym != nil {
if p.From.Index == i386.REG_NONE { if p.From.Index == x86.REG_NONE {
conprop(r) conprop(r)
} }
} }
} }
case i386.AMOVB, case x86.AMOVB,
i386.AMOVW, x86.AMOVW,
i386.AMOVL, x86.AMOVL,
i386.AMOVSS, x86.AMOVSS,
i386.AMOVSD: x86.AMOVSD:
if regtyp(&p.To) { if regtyp(&p.To) {
if p.From.Type == obj.TYPE_CONST || p.From.Type == obj.TYPE_FCONST { if p.From.Type == obj.TYPE_CONST || p.From.Type == obj.TYPE_FCONST {
conprop(r) conprop(r)
...@@ -135,9 +135,9 @@ loop1: ...@@ -135,9 +135,9 @@ loop1:
for r = g.Start; r != nil; r = r.Link { for r = g.Start; r != nil; r = r.Link {
p = r.Prog p = r.Prog
switch p.As { switch p.As {
case i386.AMOVL, case x86.AMOVL,
i386.AMOVSS, x86.AMOVSS,
i386.AMOVSD: x86.AMOVSD:
if regtyp(&p.To) { if regtyp(&p.To) {
if regtyp(&p.From) { if regtyp(&p.From) {
if copyprop(g, r) { if copyprop(g, r) {
...@@ -150,66 +150,66 @@ loop1: ...@@ -150,66 +150,66 @@ loop1:
} }
} }
case i386.AMOVBLZX, case x86.AMOVBLZX,
i386.AMOVWLZX, x86.AMOVWLZX,
i386.AMOVBLSX, x86.AMOVBLSX,
i386.AMOVWLSX: x86.AMOVWLSX:
if regtyp(&p.To) { if regtyp(&p.To) {
r1 = rnops(gc.Uniqs(r)) r1 = rnops(gc.Uniqs(r))
if r1 != nil { if r1 != nil {
p1 = r1.Prog p1 = r1.Prog
if p.As == p1.As && p.To.Type == p1.From.Type && p.To.Reg == p1.From.Reg { if p.As == p1.As && p.To.Type == p1.From.Type && p.To.Reg == p1.From.Reg {
p1.As = i386.AMOVL p1.As = x86.AMOVL
t++ t++
} }
} }
} }
case i386.AADDL, case x86.AADDL,
i386.AADDW: x86.AADDW:
if p.From.Type != obj.TYPE_CONST || needc(p.Link) { if p.From.Type != obj.TYPE_CONST || needc(p.Link) {
break break
} }
if p.From.Offset == -1 { if p.From.Offset == -1 {
if p.As == i386.AADDL { if p.As == x86.AADDL {
p.As = i386.ADECL p.As = x86.ADECL
} else { } else {
p.As = i386.ADECW p.As = x86.ADECW
} }
p.From = obj.Addr{} p.From = obj.Addr{}
break break
} }
if p.From.Offset == 1 { if p.From.Offset == 1 {
if p.As == i386.AADDL { if p.As == x86.AADDL {
p.As = i386.AINCL p.As = x86.AINCL
} else { } else {
p.As = i386.AINCW p.As = x86.AINCW
} }
p.From = obj.Addr{} p.From = obj.Addr{}
break break
} }
case i386.ASUBL, case x86.ASUBL,
i386.ASUBW: x86.ASUBW:
if p.From.Type != obj.TYPE_CONST || needc(p.Link) { if p.From.Type != obj.TYPE_CONST || needc(p.Link) {
break break
} }
if p.From.Offset == -1 { if p.From.Offset == -1 {
if p.As == i386.ASUBL { if p.As == x86.ASUBL {
p.As = i386.AINCL p.As = x86.AINCL
} else { } else {
p.As = i386.AINCW p.As = x86.AINCW
} }
p.From = obj.Addr{} p.From = obj.Addr{}
break break
} }
if p.From.Offset == 1 { if p.From.Offset == 1 {
if p.As == i386.ASUBL { if p.As == x86.ASUBL {
p.As = i386.ADECL p.As = x86.ADECL
} else { } else {
p.As = i386.ADECW p.As = x86.ADECW
} }
p.From = obj.Addr{} p.From = obj.Addr{}
break break
...@@ -228,10 +228,10 @@ loop1: ...@@ -228,10 +228,10 @@ loop1:
// the processor can do better if we do moves using both. // the processor can do better if we do moves using both.
for r := g.Start; r != nil; r = r.Link { for r := g.Start; r != nil; r = r.Link {
p = r.Prog p = r.Prog
if p.As == i386.AMOVSD { if p.As == x86.AMOVSD {
if regtyp(&p.From) { if regtyp(&p.From) {
if regtyp(&p.To) { if regtyp(&p.To) {
p.As = i386.AMOVAPD p.As = x86.AMOVAPD
} }
} }
} }
...@@ -252,7 +252,7 @@ func excise(r *gc.Flow) { ...@@ -252,7 +252,7 @@ func excise(r *gc.Flow) {
} }
func regtyp(a *obj.Addr) bool { func regtyp(a *obj.Addr) bool {
return a.Type == obj.TYPE_REG && (i386.REG_AX <= a.Reg && a.Reg <= i386.REG_DI || i386.REG_X0 <= a.Reg && a.Reg <= i386.REG_X7) return a.Type == obj.TYPE_REG && (x86.REG_AX <= a.Reg && a.Reg <= x86.REG_DI || x86.REG_X0 <= a.Reg && a.Reg <= x86.REG_X7)
} }
// movb elimination. // movb elimination.
...@@ -269,21 +269,21 @@ func elimshortmov(g *gc.Graph) { ...@@ -269,21 +269,21 @@ func elimshortmov(g *gc.Graph) {
p = r.Prog p = r.Prog
if regtyp(&p.To) { if regtyp(&p.To) {
switch p.As { switch p.As {
case i386.AINCB, case x86.AINCB,
i386.AINCW: x86.AINCW:
p.As = i386.AINCL p.As = x86.AINCL
case i386.ADECB, case x86.ADECB,
i386.ADECW: x86.ADECW:
p.As = i386.ADECL p.As = x86.ADECL
case i386.ANEGB, case x86.ANEGB,
i386.ANEGW: x86.ANEGW:
p.As = i386.ANEGL p.As = x86.ANEGL
case i386.ANOTB, case x86.ANOTB,
i386.ANOTW: x86.ANOTW:
p.As = i386.ANOTL p.As = x86.ANOTL
} }
if regtyp(&p.From) || p.From.Type == obj.TYPE_CONST { if regtyp(&p.From) || p.From.Type == obj.TYPE_CONST {
...@@ -292,54 +292,54 @@ func elimshortmov(g *gc.Graph) { ...@@ -292,54 +292,54 @@ func elimshortmov(g *gc.Graph) {
// we don't switch to 32-bit arithmetic if it can // we don't switch to 32-bit arithmetic if it can
// change how the carry bit is set (and the carry bit is needed). // change how the carry bit is set (and the carry bit is needed).
switch p.As { switch p.As {
case i386.AMOVB, case x86.AMOVB,
i386.AMOVW: x86.AMOVW:
p.As = i386.AMOVL p.As = x86.AMOVL
case i386.AADDB, case x86.AADDB,
i386.AADDW: x86.AADDW:
if !needc(p.Link) { if !needc(p.Link) {
p.As = i386.AADDL p.As = x86.AADDL
} }
case i386.ASUBB, case x86.ASUBB,
i386.ASUBW: x86.ASUBW:
if !needc(p.Link) { if !needc(p.Link) {
p.As = i386.ASUBL p.As = x86.ASUBL
} }
case i386.AMULB, case x86.AMULB,
i386.AMULW: x86.AMULW:
p.As = i386.AMULL p.As = x86.AMULL
case i386.AIMULB, case x86.AIMULB,
i386.AIMULW: x86.AIMULW:
p.As = i386.AIMULL p.As = x86.AIMULL
case i386.AANDB, case x86.AANDB,
i386.AANDW: x86.AANDW:
p.As = i386.AANDL p.As = x86.AANDL
case i386.AORB, case x86.AORB,
i386.AORW: x86.AORW:
p.As = i386.AORL p.As = x86.AORL
case i386.AXORB, case x86.AXORB,
i386.AXORW: x86.AXORW:
p.As = i386.AXORL p.As = x86.AXORL
case i386.ASHLB, case x86.ASHLB,
i386.ASHLW: x86.ASHLW:
p.As = i386.ASHLL p.As = x86.ASHLL
} }
} else { } else {
// explicit zero extension // explicit zero extension
switch p.As { switch p.As {
case i386.AMOVB: case x86.AMOVB:
p.As = i386.AMOVBLZX p.As = x86.AMOVBLZX
case i386.AMOVW: case x86.AMOVW:
p.As = i386.AMOVWLZX p.As = x86.AMOVWLZX
} }
} }
} }
...@@ -581,7 +581,7 @@ func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int { ...@@ -581,7 +581,7 @@ func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int {
if REGEXT != 0 /*TypeKind(100016)*/ && v.Type == obj.TYPE_REG && v.Reg <= REGEXT && v.Reg > exregoffset { if REGEXT != 0 /*TypeKind(100016)*/ && v.Type == obj.TYPE_REG && v.Reg <= REGEXT && v.Reg > exregoffset {
return 2 return 2
} }
if i386.REGARG >= 0 && v.Type == obj.TYPE_REG && v.Reg == i386.REGARG { if x86.REGARG >= 0 && v.Type == obj.TYPE_REG && v.Reg == x86.REGARG {
return 2 return 2
} }
if v.Type == p.From.Type && v.Reg == p.From.Reg { if v.Type == p.From.Type && v.Reg == p.From.Reg {
...@@ -601,7 +601,7 @@ func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int { ...@@ -601,7 +601,7 @@ func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int {
return 3 return 3
case obj.ATEXT: case obj.ATEXT:
if i386.REGARG >= 0 && v.Type == obj.TYPE_REG && v.Reg == i386.REGARG { if x86.REGARG >= 0 && v.Type == obj.TYPE_REG && v.Reg == x86.REGARG {
return 3 return 3
} }
return 0 return 0
...@@ -666,10 +666,10 @@ func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int { ...@@ -666,10 +666,10 @@ func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int {
* semantics * semantics
*/ */
func copyas(a *obj.Addr, v *obj.Addr) bool { func copyas(a *obj.Addr, v *obj.Addr) bool {
if i386.REG_AL <= a.Reg && a.Reg <= i386.REG_BL { if x86.REG_AL <= a.Reg && a.Reg <= x86.REG_BL {
gc.Fatal("use of byte register") gc.Fatal("use of byte register")
} }
if i386.REG_AL <= v.Reg && v.Reg <= i386.REG_BL { if x86.REG_AL <= v.Reg && v.Reg <= x86.REG_BL {
gc.Fatal("use of byte register") gc.Fatal("use of byte register")
} }
...@@ -728,7 +728,7 @@ func copyau(a *obj.Addr, v *obj.Addr) bool { ...@@ -728,7 +728,7 @@ func copyau(a *obj.Addr, v *obj.Addr) bool {
func copysub(a *obj.Addr, v *obj.Addr, s *obj.Addr, f int) int { func copysub(a *obj.Addr, v *obj.Addr, s *obj.Addr, f int) int {
if copyas(a, v) { if copyas(a, v) {
reg := int(s.Reg) reg := int(s.Reg)
if reg >= i386.REG_AX && reg <= i386.REG_DI || reg >= i386.REG_X0 && reg <= i386.REG_X7 { if reg >= x86.REG_AX && reg <= x86.REG_DI || reg >= x86.REG_X0 && reg <= x86.REG_X7 {
if f != 0 { if f != 0 {
a.Reg = int16(reg) a.Reg = int16(reg)
} }
...@@ -740,7 +740,7 @@ func copysub(a *obj.Addr, v *obj.Addr, s *obj.Addr, f int) int { ...@@ -740,7 +740,7 @@ func copysub(a *obj.Addr, v *obj.Addr, s *obj.Addr, f int) int {
if regtyp(v) { if regtyp(v) {
reg := int(v.Reg) reg := int(v.Reg)
if a.Type == obj.TYPE_MEM && int(a.Reg) == reg { if a.Type == obj.TYPE_MEM && int(a.Reg) == reg {
if (s.Reg == i386.REG_BP) && a.Index != obj.TYPE_NONE { if (s.Reg == x86.REG_BP) && a.Index != obj.TYPE_NONE {
return 1 /* can't use BP-base with index */ return 1 /* can't use BP-base with index */
} }
if f != 0 { if f != 0 {
...@@ -813,9 +813,9 @@ loop: ...@@ -813,9 +813,9 @@ loop:
} }
func smallindir(a *obj.Addr, reg *obj.Addr) bool { func smallindir(a *obj.Addr, reg *obj.Addr) bool {
return regtyp(reg) && a.Type == obj.TYPE_MEM && a.Reg == reg.Reg && a.Index == i386.REG_NONE && 0 <= a.Offset && a.Offset < 4096 return regtyp(reg) && a.Type == obj.TYPE_MEM && a.Reg == reg.Reg && a.Index == x86.REG_NONE && 0 <= a.Offset && a.Offset < 4096
} }
func stackaddr(a *obj.Addr) bool { func stackaddr(a *obj.Addr) bool {
return a.Type == obj.TYPE_REG && a.Reg == i386.REG_SP return a.Type == obj.TYPE_REG && a.Reg == x86.REG_SP
} }
...@@ -7,16 +7,16 @@ package main ...@@ -7,16 +7,16 @@ package main
import ( import (
"cmd/internal/gc" "cmd/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
i386 "cmd/internal/obj/x86" "cmd/internal/obj/x86"
) )
var ( var (
AX = RtoB(i386.REG_AX) AX = RtoB(x86.REG_AX)
BX = RtoB(i386.REG_BX) BX = RtoB(x86.REG_BX)
CX = RtoB(i386.REG_CX) CX = RtoB(x86.REG_CX)
DX = RtoB(i386.REG_DX) DX = RtoB(x86.REG_DX)
DI = RtoB(i386.REG_DI) DI = RtoB(x86.REG_DI)
SI = RtoB(i386.REG_SI) SI = RtoB(x86.REG_SI)
LeftRdwr uint32 = gc.LeftRead | gc.LeftWrite LeftRdwr uint32 = gc.LeftRead | gc.LeftWrite
RightRdwr uint32 = gc.RightRead | gc.RightWrite RightRdwr uint32 = gc.RightRead | gc.RightWrite
) )
...@@ -30,7 +30,7 @@ var ( ...@@ -30,7 +30,7 @@ var (
// size variants of an operation even if we just use a subset. // size variants of an operation even if we just use a subset.
// //
// The table is formatted for 8-space tabs. // The table is formatted for 8-space tabs.
var progtable = [i386.ALAST]gc.ProgInfo{ var progtable = [x86.ALAST]gc.ProgInfo{
obj.ATYPE: gc.ProgInfo{gc.Pseudo | gc.Skip, 0, 0, 0}, obj.ATYPE: gc.ProgInfo{gc.Pseudo | gc.Skip, 0, 0, 0},
obj.ATEXT: gc.ProgInfo{gc.Pseudo, 0, 0, 0}, obj.ATEXT: gc.ProgInfo{gc.Pseudo, 0, 0, 0},
obj.AFUNCDATA: gc.ProgInfo{gc.Pseudo, 0, 0, 0}, obj.AFUNCDATA: gc.ProgInfo{gc.Pseudo, 0, 0, 0},
...@@ -44,216 +44,216 @@ var progtable = [i386.ALAST]gc.ProgInfo{ ...@@ -44,216 +44,216 @@ var progtable = [i386.ALAST]gc.ProgInfo{
// NOP is an internal no-op that also stands // NOP is an internal no-op that also stands
// for USED and SET annotations, not the Intel opcode. // for USED and SET annotations, not the Intel opcode.
obj.ANOP: gc.ProgInfo{gc.LeftRead | gc.RightWrite, 0, 0, 0}, obj.ANOP: gc.ProgInfo{gc.LeftRead | gc.RightWrite, 0, 0, 0},
i386.AADCL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0}, x86.AADCL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
i386.AADCW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0}, x86.AADCW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
i386.AADDB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.AADDB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.AADDL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.AADDL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.AADDW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.AADDW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.AADDSD: gc.ProgInfo{gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0}, x86.AADDSD: gc.ProgInfo{gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
i386.AADDSS: gc.ProgInfo{gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0}, x86.AADDSS: gc.ProgInfo{gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
i386.AANDB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.AANDB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.AANDL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.AANDL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.AANDW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.AANDW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
obj.ACALL: gc.ProgInfo{gc.RightAddr | gc.Call | gc.KillCarry, 0, 0, 0}, obj.ACALL: gc.ProgInfo{gc.RightAddr | gc.Call | gc.KillCarry, 0, 0, 0},
i386.ACDQ: gc.ProgInfo{gc.OK, AX, AX | DX, 0}, x86.ACDQ: gc.ProgInfo{gc.OK, AX, AX | DX, 0},
i386.ACWD: gc.ProgInfo{gc.OK, AX, AX | DX, 0}, x86.ACWD: gc.ProgInfo{gc.OK, AX, AX | DX, 0},
i386.ACLD: gc.ProgInfo{gc.OK, 0, 0, 0}, x86.ACLD: gc.ProgInfo{gc.OK, 0, 0, 0},
i386.ASTD: gc.ProgInfo{gc.OK, 0, 0, 0}, x86.ASTD: gc.ProgInfo{gc.OK, 0, 0, 0},
i386.ACMPB: gc.ProgInfo{gc.SizeB | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0}, x86.ACMPB: gc.ProgInfo{gc.SizeB | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
i386.ACMPL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0}, x86.ACMPL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
i386.ACMPW: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0}, x86.ACMPW: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
i386.ACOMISD: gc.ProgInfo{gc.SizeD | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0}, x86.ACOMISD: gc.ProgInfo{gc.SizeD | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
i386.ACOMISS: gc.ProgInfo{gc.SizeF | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0}, x86.ACOMISS: gc.ProgInfo{gc.SizeF | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
i386.ACVTSD2SL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0}, x86.ACVTSD2SL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
i386.ACVTSD2SS: gc.ProgInfo{gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0}, x86.ACVTSD2SS: gc.ProgInfo{gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
i386.ACVTSL2SD: gc.ProgInfo{gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0}, x86.ACVTSL2SD: gc.ProgInfo{gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
i386.ACVTSL2SS: gc.ProgInfo{gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0}, x86.ACVTSL2SS: gc.ProgInfo{gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
i386.ACVTSS2SD: gc.ProgInfo{gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0}, x86.ACVTSS2SD: gc.ProgInfo{gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
i386.ACVTSS2SL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0}, x86.ACVTSS2SL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
i386.ACVTTSD2SL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0}, x86.ACVTTSD2SL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
i386.ACVTTSS2SL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0}, x86.ACVTTSS2SL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
i386.ADECB: gc.ProgInfo{gc.SizeB | RightRdwr, 0, 0, 0}, x86.ADECB: gc.ProgInfo{gc.SizeB | RightRdwr, 0, 0, 0},
i386.ADECL: gc.ProgInfo{gc.SizeL | RightRdwr, 0, 0, 0}, x86.ADECL: gc.ProgInfo{gc.SizeL | RightRdwr, 0, 0, 0},
i386.ADECW: gc.ProgInfo{gc.SizeW | RightRdwr, 0, 0, 0}, x86.ADECW: gc.ProgInfo{gc.SizeW | RightRdwr, 0, 0, 0},
i386.ADIVB: gc.ProgInfo{gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0}, x86.ADIVB: gc.ProgInfo{gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0},
i386.ADIVL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0}, x86.ADIVL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0},
i386.ADIVW: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0}, x86.ADIVW: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0},
i386.ADIVSD: gc.ProgInfo{gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0}, x86.ADIVSD: gc.ProgInfo{gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
i386.ADIVSS: gc.ProgInfo{gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0}, x86.ADIVSS: gc.ProgInfo{gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
i386.AFLDCW: gc.ProgInfo{gc.SizeW | gc.LeftAddr, 0, 0, 0}, x86.AFLDCW: gc.ProgInfo{gc.SizeW | gc.LeftAddr, 0, 0, 0},
i386.AFSTCW: gc.ProgInfo{gc.SizeW | gc.RightAddr, 0, 0, 0}, x86.AFSTCW: gc.ProgInfo{gc.SizeW | gc.RightAddr, 0, 0, 0},
i386.AFSTSW: gc.ProgInfo{gc.SizeW | gc.RightAddr | gc.RightWrite, 0, 0, 0}, x86.AFSTSW: gc.ProgInfo{gc.SizeW | gc.RightAddr | gc.RightWrite, 0, 0, 0},
i386.AFADDD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFADDD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFADDDP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFADDDP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFADDF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFADDF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFCOMD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | gc.RightRead, 0, 0, 0}, x86.AFCOMD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | gc.RightRead, 0, 0, 0},
i386.AFCOMDP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | gc.RightRead, 0, 0, 0}, x86.AFCOMDP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | gc.RightRead, 0, 0, 0},
i386.AFCOMDPP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | gc.RightRead, 0, 0, 0}, x86.AFCOMDPP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | gc.RightRead, 0, 0, 0},
i386.AFCOMF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | gc.RightRead, 0, 0, 0}, x86.AFCOMF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | gc.RightRead, 0, 0, 0},
i386.AFCOMFP: gc.ProgInfo{gc.SizeF | gc.LeftAddr | gc.RightRead, 0, 0, 0}, x86.AFCOMFP: gc.ProgInfo{gc.SizeF | gc.LeftAddr | gc.RightRead, 0, 0, 0},
i386.AFUCOMIP: gc.ProgInfo{gc.SizeF | gc.LeftAddr | gc.RightRead, 0, 0, 0}, x86.AFUCOMIP: gc.ProgInfo{gc.SizeF | gc.LeftAddr | gc.RightRead, 0, 0, 0},
i386.AFCHS: gc.ProgInfo{gc.SizeD | RightRdwr, 0, 0, 0}, // also SizeF x86.AFCHS: gc.ProgInfo{gc.SizeD | RightRdwr, 0, 0, 0}, // also SizeF
i386.AFDIVDP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFDIVDP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFDIVF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFDIVF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFDIVD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFDIVD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFDIVRDP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFDIVRDP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFDIVRF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFDIVRF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFDIVRD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFDIVRD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFXCHD: gc.ProgInfo{gc.SizeD | LeftRdwr | RightRdwr, 0, 0, 0}, x86.AFXCHD: gc.ProgInfo{gc.SizeD | LeftRdwr | RightRdwr, 0, 0, 0},
i386.AFSUBD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFSUBD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFSUBDP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFSUBDP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFSUBF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFSUBF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFSUBRD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFSUBRD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFSUBRDP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFSUBRDP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFSUBRF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFSUBRF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFMOVD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | gc.RightWrite, 0, 0, 0}, x86.AFMOVD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | gc.RightWrite, 0, 0, 0},
i386.AFMOVF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | gc.RightWrite, 0, 0, 0}, x86.AFMOVF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | gc.RightWrite, 0, 0, 0},
i386.AFMOVL: gc.ProgInfo{gc.SizeL | gc.LeftAddr | gc.RightWrite, 0, 0, 0}, x86.AFMOVL: gc.ProgInfo{gc.SizeL | gc.LeftAddr | gc.RightWrite, 0, 0, 0},
i386.AFMOVW: gc.ProgInfo{gc.SizeW | gc.LeftAddr | gc.RightWrite, 0, 0, 0}, x86.AFMOVW: gc.ProgInfo{gc.SizeW | gc.LeftAddr | gc.RightWrite, 0, 0, 0},
i386.AFMOVV: gc.ProgInfo{gc.SizeQ | gc.LeftAddr | gc.RightWrite, 0, 0, 0}, x86.AFMOVV: gc.ProgInfo{gc.SizeQ | gc.LeftAddr | gc.RightWrite, 0, 0, 0},
// These instructions are marked as RightAddr // These instructions are marked as RightAddr
// so that the register optimizer does not try to replace the // so that the register optimizer does not try to replace the
// memory references with integer register references. // memory references with integer register references.
// But they do not use the previous value at the address, so // But they do not use the previous value at the address, so
// we also mark them RightWrite. // we also mark them RightWrite.
i386.AFMOVDP: gc.ProgInfo{gc.SizeD | gc.LeftRead | gc.RightWrite | gc.RightAddr, 0, 0, 0}, x86.AFMOVDP: gc.ProgInfo{gc.SizeD | gc.LeftRead | gc.RightWrite | gc.RightAddr, 0, 0, 0},
i386.AFMOVFP: gc.ProgInfo{gc.SizeF | gc.LeftRead | gc.RightWrite | gc.RightAddr, 0, 0, 0}, x86.AFMOVFP: gc.ProgInfo{gc.SizeF | gc.LeftRead | gc.RightWrite | gc.RightAddr, 0, 0, 0},
i386.AFMOVLP: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.RightAddr, 0, 0, 0}, x86.AFMOVLP: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.RightAddr, 0, 0, 0},
i386.AFMOVWP: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.RightWrite | gc.RightAddr, 0, 0, 0}, x86.AFMOVWP: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.RightWrite | gc.RightAddr, 0, 0, 0},
i386.AFMOVVP: gc.ProgInfo{gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.RightAddr, 0, 0, 0}, x86.AFMOVVP: gc.ProgInfo{gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.RightAddr, 0, 0, 0},
i386.AFMULD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFMULD: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFMULDP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFMULDP: gc.ProgInfo{gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AFMULF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0}, x86.AFMULF: gc.ProgInfo{gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0},
i386.AIDIVB: gc.ProgInfo{gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0}, x86.AIDIVB: gc.ProgInfo{gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0},
i386.AIDIVL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0}, x86.AIDIVL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0},
i386.AIDIVW: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0}, x86.AIDIVW: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0},
i386.AIMULB: gc.ProgInfo{gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0}, x86.AIMULB: gc.ProgInfo{gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0},
i386.AIMULL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.ImulAXDX | gc.SetCarry, 0, 0, 0}, x86.AIMULL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.ImulAXDX | gc.SetCarry, 0, 0, 0},
i386.AIMULW: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.ImulAXDX | gc.SetCarry, 0, 0, 0}, x86.AIMULW: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.ImulAXDX | gc.SetCarry, 0, 0, 0},
i386.AINCB: gc.ProgInfo{gc.SizeB | RightRdwr, 0, 0, 0}, x86.AINCB: gc.ProgInfo{gc.SizeB | RightRdwr, 0, 0, 0},
i386.AINCL: gc.ProgInfo{gc.SizeL | RightRdwr, 0, 0, 0}, x86.AINCL: gc.ProgInfo{gc.SizeL | RightRdwr, 0, 0, 0},
i386.AINCW: gc.ProgInfo{gc.SizeW | RightRdwr, 0, 0, 0}, x86.AINCW: gc.ProgInfo{gc.SizeW | RightRdwr, 0, 0, 0},
i386.AJCC: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJCC: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
i386.AJCS: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJCS: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
i386.AJEQ: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJEQ: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
i386.AJGE: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJGE: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
i386.AJGT: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJGT: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
i386.AJHI: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJHI: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
i386.AJLE: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJLE: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
i386.AJLS: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJLS: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
i386.AJLT: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJLT: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
i386.AJMI: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJMI: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
i386.AJNE: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJNE: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
i386.AJOC: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJOC: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
i386.AJOS: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJOS: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
i386.AJPC: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJPC: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
i386.AJPL: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJPL: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
i386.AJPS: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0}, x86.AJPS: gc.ProgInfo{gc.Cjmp | gc.UseCarry, 0, 0, 0},
obj.AJMP: gc.ProgInfo{gc.Jump | gc.Break | gc.KillCarry, 0, 0, 0}, obj.AJMP: gc.ProgInfo{gc.Jump | gc.Break | gc.KillCarry, 0, 0, 0},
i386.ALEAL: gc.ProgInfo{gc.LeftAddr | gc.RightWrite, 0, 0, 0}, x86.ALEAL: gc.ProgInfo{gc.LeftAddr | gc.RightWrite, 0, 0, 0},
i386.AMOVBLSX: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0}, x86.AMOVBLSX: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
i386.AMOVBLZX: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0}, x86.AMOVBLZX: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
i386.AMOVBWSX: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0}, x86.AMOVBWSX: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
i386.AMOVBWZX: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0}, x86.AMOVBWZX: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
i386.AMOVWLSX: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0}, x86.AMOVWLSX: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
i386.AMOVWLZX: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0}, x86.AMOVWLZX: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
i386.AMOVB: gc.ProgInfo{gc.SizeB | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0}, x86.AMOVB: gc.ProgInfo{gc.SizeB | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
i386.AMOVL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0}, x86.AMOVL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
i386.AMOVW: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0}, x86.AMOVW: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
i386.AMOVSB: gc.ProgInfo{gc.OK, DI | SI, DI | SI, 0}, x86.AMOVSB: gc.ProgInfo{gc.OK, DI | SI, DI | SI, 0},
i386.AMOVSL: gc.ProgInfo{gc.OK, DI | SI, DI | SI, 0}, x86.AMOVSL: gc.ProgInfo{gc.OK, DI | SI, DI | SI, 0},
i386.AMOVSW: gc.ProgInfo{gc.OK, DI | SI, DI | SI, 0}, x86.AMOVSW: gc.ProgInfo{gc.OK, DI | SI, DI | SI, 0},
obj.ADUFFCOPY: gc.ProgInfo{gc.OK, DI | SI, DI | SI | CX, 0}, obj.ADUFFCOPY: gc.ProgInfo{gc.OK, DI | SI, DI | SI | CX, 0},
i386.AMOVSD: gc.ProgInfo{gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0}, x86.AMOVSD: gc.ProgInfo{gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
i386.AMOVSS: gc.ProgInfo{gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0}, x86.AMOVSS: gc.ProgInfo{gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
// We use MOVAPD as a faster synonym for MOVSD. // We use MOVAPD as a faster synonym for MOVSD.
i386.AMOVAPD: gc.ProgInfo{gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0}, x86.AMOVAPD: gc.ProgInfo{gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
i386.AMULB: gc.ProgInfo{gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0}, x86.AMULB: gc.ProgInfo{gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0},
i386.AMULL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.SetCarry, AX, AX | DX, 0}, x86.AMULL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.SetCarry, AX, AX | DX, 0},
i386.AMULW: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.SetCarry, AX, AX | DX, 0}, x86.AMULW: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.SetCarry, AX, AX | DX, 0},
i386.AMULSD: gc.ProgInfo{gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0}, x86.AMULSD: gc.ProgInfo{gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
i386.AMULSS: gc.ProgInfo{gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0}, x86.AMULSS: gc.ProgInfo{gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
i386.ANEGB: gc.ProgInfo{gc.SizeB | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.ANEGB: gc.ProgInfo{gc.SizeB | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.ANEGL: gc.ProgInfo{gc.SizeL | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.ANEGL: gc.ProgInfo{gc.SizeL | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.ANEGW: gc.ProgInfo{gc.SizeW | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.ANEGW: gc.ProgInfo{gc.SizeW | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.ANOTB: gc.ProgInfo{gc.SizeB | RightRdwr, 0, 0, 0}, x86.ANOTB: gc.ProgInfo{gc.SizeB | RightRdwr, 0, 0, 0},
i386.ANOTL: gc.ProgInfo{gc.SizeL | RightRdwr, 0, 0, 0}, x86.ANOTL: gc.ProgInfo{gc.SizeL | RightRdwr, 0, 0, 0},
i386.ANOTW: gc.ProgInfo{gc.SizeW | RightRdwr, 0, 0, 0}, x86.ANOTW: gc.ProgInfo{gc.SizeW | RightRdwr, 0, 0, 0},
i386.AORB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.AORB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.AORL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.AORL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.AORW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.AORW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.APOPL: gc.ProgInfo{gc.SizeL | gc.RightWrite, 0, 0, 0}, x86.APOPL: gc.ProgInfo{gc.SizeL | gc.RightWrite, 0, 0, 0},
i386.APUSHL: gc.ProgInfo{gc.SizeL | gc.LeftRead, 0, 0, 0}, x86.APUSHL: gc.ProgInfo{gc.SizeL | gc.LeftRead, 0, 0, 0},
i386.ARCLB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0}, x86.ARCLB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
i386.ARCLL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0}, x86.ARCLL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
i386.ARCLW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0}, x86.ARCLW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
i386.ARCRB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0}, x86.ARCRB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
i386.ARCRL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0}, x86.ARCRL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
i386.ARCRW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0}, x86.ARCRW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
i386.AREP: gc.ProgInfo{gc.OK, CX, CX, 0}, x86.AREP: gc.ProgInfo{gc.OK, CX, CX, 0},
i386.AREPN: gc.ProgInfo{gc.OK, CX, CX, 0}, x86.AREPN: gc.ProgInfo{gc.OK, CX, CX, 0},
obj.ARET: gc.ProgInfo{gc.Break | gc.KillCarry, 0, 0, 0}, obj.ARET: gc.ProgInfo{gc.Break | gc.KillCarry, 0, 0, 0},
i386.AROLB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.AROLB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.AROLL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.AROLL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.AROLW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.AROLW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ARORB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.ARORB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ARORL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.ARORL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ARORW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.ARORW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ASAHF: gc.ProgInfo{gc.OK, AX, AX, 0}, x86.ASAHF: gc.ProgInfo{gc.OK, AX, AX, 0},
i386.ASALB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.ASALB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ASALL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.ASALL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ASALW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.ASALW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ASARB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.ASARB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ASARL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.ASARL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ASARW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.ASARW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ASBBB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0}, x86.ASBBB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
i386.ASBBL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0}, x86.ASBBL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
i386.ASBBW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0}, x86.ASBBW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
i386.ASETCC: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETCC: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASETCS: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETCS: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASETEQ: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETEQ: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASETGE: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETGE: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASETGT: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETGT: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASETHI: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETHI: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASETLE: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETLE: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASETLS: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETLS: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASETLT: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETLT: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASETMI: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETMI: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASETNE: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETNE: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASETOC: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETOC: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASETOS: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETOS: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASETPC: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETPC: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASETPL: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETPL: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASETPS: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0}, x86.ASETPS: gc.ProgInfo{gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
i386.ASHLB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.ASHLB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ASHLL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.ASHLL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ASHLW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.ASHLW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ASHRB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.ASHRB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ASHRL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.ASHRL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ASHRW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0}, x86.ASHRW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
i386.ASTOSB: gc.ProgInfo{gc.OK, AX | DI, DI, 0}, x86.ASTOSB: gc.ProgInfo{gc.OK, AX | DI, DI, 0},
i386.ASTOSL: gc.ProgInfo{gc.OK, AX | DI, DI, 0}, x86.ASTOSL: gc.ProgInfo{gc.OK, AX | DI, DI, 0},
i386.ASTOSW: gc.ProgInfo{gc.OK, AX | DI, DI, 0}, x86.ASTOSW: gc.ProgInfo{gc.OK, AX | DI, DI, 0},
obj.ADUFFZERO: gc.ProgInfo{gc.OK, AX | DI, DI, 0}, obj.ADUFFZERO: gc.ProgInfo{gc.OK, AX | DI, DI, 0},
i386.ASUBB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.ASUBB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.ASUBL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.ASUBL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.ASUBW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.ASUBW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.ASUBSD: gc.ProgInfo{gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0}, x86.ASUBSD: gc.ProgInfo{gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
i386.ASUBSS: gc.ProgInfo{gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0}, x86.ASUBSS: gc.ProgInfo{gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
i386.ATESTB: gc.ProgInfo{gc.SizeB | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0}, x86.ATESTB: gc.ProgInfo{gc.SizeB | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
i386.ATESTL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0}, x86.ATESTL: gc.ProgInfo{gc.SizeL | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
i386.ATESTW: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0}, x86.ATESTW: gc.ProgInfo{gc.SizeW | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
i386.AUCOMISD: gc.ProgInfo{gc.SizeD | gc.LeftRead | gc.RightRead, 0, 0, 0}, x86.AUCOMISD: gc.ProgInfo{gc.SizeD | gc.LeftRead | gc.RightRead, 0, 0, 0},
i386.AUCOMISS: gc.ProgInfo{gc.SizeF | gc.LeftRead | gc.RightRead, 0, 0, 0}, x86.AUCOMISS: gc.ProgInfo{gc.SizeF | gc.LeftRead | gc.RightRead, 0, 0, 0},
i386.AXCHGB: gc.ProgInfo{gc.SizeB | LeftRdwr | RightRdwr, 0, 0, 0}, x86.AXCHGB: gc.ProgInfo{gc.SizeB | LeftRdwr | RightRdwr, 0, 0, 0},
i386.AXCHGL: gc.ProgInfo{gc.SizeL | LeftRdwr | RightRdwr, 0, 0, 0}, x86.AXCHGL: gc.ProgInfo{gc.SizeL | LeftRdwr | RightRdwr, 0, 0, 0},
i386.AXCHGW: gc.ProgInfo{gc.SizeW | LeftRdwr | RightRdwr, 0, 0, 0}, x86.AXCHGW: gc.ProgInfo{gc.SizeW | LeftRdwr | RightRdwr, 0, 0, 0},
i386.AXORB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.AXORB: gc.ProgInfo{gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.AXORL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.AXORL: gc.ProgInfo{gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
i386.AXORW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0}, x86.AXORW: gc.ProgInfo{gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
} }
func proginfo(p *obj.Prog) (info gc.ProgInfo) { func proginfo(p *obj.Prog) (info gc.ProgInfo) {
...@@ -279,13 +279,13 @@ func proginfo(p *obj.Prog) (info gc.ProgInfo) { ...@@ -279,13 +279,13 @@ func proginfo(p *obj.Prog) (info gc.ProgInfo) {
if p.From.Type == obj.TYPE_MEM && p.From.Name == obj.NAME_NONE { if p.From.Type == obj.TYPE_MEM && p.From.Name == obj.NAME_NONE {
info.Regindex |= RtoB(int(p.From.Reg)) info.Regindex |= RtoB(int(p.From.Reg))
} }
if p.From.Index != i386.REG_NONE { if p.From.Index != x86.REG_NONE {
info.Regindex |= RtoB(int(p.From.Index)) info.Regindex |= RtoB(int(p.From.Index))
} }
if p.To.Type == obj.TYPE_MEM && p.To.Name == obj.NAME_NONE { if p.To.Type == obj.TYPE_MEM && p.To.Name == obj.NAME_NONE {
info.Regindex |= RtoB(int(p.To.Reg)) info.Regindex |= RtoB(int(p.To.Reg))
} }
if p.To.Index != i386.REG_NONE { if p.To.Index != x86.REG_NONE {
info.Regindex |= RtoB(int(p.To.Index)) info.Regindex |= RtoB(int(p.To.Index))
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
package main package main
import i386 "cmd/internal/obj/x86" import "cmd/internal/obj/x86"
import "cmd/internal/gc" import "cmd/internal/gc"
const ( const (
...@@ -62,28 +62,28 @@ func regnames(n *int) []string { ...@@ -62,28 +62,28 @@ func regnames(n *int) []string {
} }
func excludedregs() uint64 { func excludedregs() uint64 {
return RtoB(i386.REG_SP) return RtoB(x86.REG_SP)
} }
func doregbits(r int) uint64 { func doregbits(r int) uint64 {
b := uint64(0) b := uint64(0)
if r >= i386.REG_AX && r <= i386.REG_DI { if r >= x86.REG_AX && r <= x86.REG_DI {
b |= RtoB(r) b |= RtoB(r)
} else if r >= i386.REG_AL && r <= i386.REG_BL { } else if r >= x86.REG_AL && r <= x86.REG_BL {
b |= RtoB(r - i386.REG_AL + i386.REG_AX) b |= RtoB(r - x86.REG_AL + x86.REG_AX)
} else if r >= i386.REG_AH && r <= i386.REG_BH { } else if r >= x86.REG_AH && r <= x86.REG_BH {
b |= RtoB(r - i386.REG_AH + i386.REG_AX) b |= RtoB(r - x86.REG_AH + x86.REG_AX)
} else if r >= i386.REG_X0 && r <= i386.REG_X0+7 { } else if r >= x86.REG_X0 && r <= x86.REG_X0+7 {
b |= FtoB(r) b |= FtoB(r)
} }
return b return b
} }
func RtoB(r int) uint64 { func RtoB(r int) uint64 {
if r < i386.REG_AX || r > i386.REG_DI { if r < x86.REG_AX || r > x86.REG_DI {
return 0 return 0
} }
return 1 << uint(r-i386.REG_AX) return 1 << uint(r-x86.REG_AX)
} }
func BtoR(b uint64) int { func BtoR(b uint64) int {
...@@ -91,14 +91,14 @@ func BtoR(b uint64) int { ...@@ -91,14 +91,14 @@ func BtoR(b uint64) int {
if b == 0 { if b == 0 {
return 0 return 0
} }
return gc.Bitno(b) + i386.REG_AX return gc.Bitno(b) + x86.REG_AX
} }
func FtoB(f int) uint64 { func FtoB(f int) uint64 {
if f < i386.REG_X0 || f > i386.REG_X7 { if f < x86.REG_X0 || f > x86.REG_X7 {
return 0 return 0
} }
return 1 << uint(f-i386.REG_X0+8) return 1 << uint(f-x86.REG_X0+8)
} }
func BtoF(b uint64) int { func BtoF(b uint64) int {
...@@ -106,5 +106,5 @@ func BtoF(b uint64) int { ...@@ -106,5 +106,5 @@ func BtoF(b uint64) int {
if b == 0 { if b == 0 {
return 0 return 0
} }
return gc.Bitno(b) - 8 + i386.REG_X0 return gc.Bitno(b) - 8 + x86.REG_X0
} }
...@@ -131,8 +131,7 @@ func bootstrapFixImports(text, srcFile string) string { ...@@ -131,8 +131,7 @@ func bootstrapFixImports(text, srcFile string) string {
continue continue
} }
if strings.HasPrefix(line, `import "`) || strings.HasPrefix(line, `import . "`) || if strings.HasPrefix(line, `import "`) || strings.HasPrefix(line, `import . "`) ||
inBlock && (strings.HasPrefix(line, "\t\"") || strings.HasPrefix(line, "\t. \"")) || inBlock && (strings.HasPrefix(line, "\t\"") || strings.HasPrefix(line, "\t. \"")) {
strings.Contains(line, `i386 "cmd/internal/obj/x86"`) {
lines[i] = strings.Replace(line, `"cmd/`, `"bootstrap/`, -1) lines[i] = strings.Replace(line, `"cmd/`, `"bootstrap/`, -1)
} }
} }
......
...@@ -35,7 +35,7 @@ package main ...@@ -35,7 +35,7 @@ package main
import ( import (
"cmd/internal/asm" "cmd/internal/asm"
"cmd/internal/obj" "cmd/internal/obj"
i386 "cmd/internal/obj/x86" "cmd/internal/obj/x86"
) )
var ( var (
...@@ -60,7 +60,7 @@ func main() { ...@@ -60,7 +60,7 @@ func main() {
asm.Thechar = '8' asm.Thechar = '8'
asm.Thestring = "386" asm.Thestring = "386"
asm.Thelinkarch = &i386.Link386 asm.Thelinkarch = &x86.Link386
asm.Main() asm.Main()
} }
...@@ -90,620 +90,620 @@ var lexinit = []asm.Lextab{ ...@@ -90,620 +90,620 @@ var lexinit = []asm.Lextab{
{"SB", LSB, obj.NAME_EXTERN}, {"SB", LSB, obj.NAME_EXTERN},
{"FP", LFP, obj.NAME_PARAM}, {"FP", LFP, obj.NAME_PARAM},
{"PC", LPC, obj.TYPE_BRANCH}, {"PC", LPC, obj.TYPE_BRANCH},
{"AL", LBREG, i386.REG_AL}, {"AL", LBREG, x86.REG_AL},
{"CL", LBREG, i386.REG_CL}, {"CL", LBREG, x86.REG_CL},
{"DL", LBREG, i386.REG_DL}, {"DL", LBREG, x86.REG_DL},
{"BL", LBREG, i386.REG_BL}, {"BL", LBREG, x86.REG_BL},
{"AH", LBREG, i386.REG_AH}, {"AH", LBREG, x86.REG_AH},
{"CH", LBREG, i386.REG_CH}, {"CH", LBREG, x86.REG_CH},
{"DH", LBREG, i386.REG_DH}, {"DH", LBREG, x86.REG_DH},
{"BH", LBREG, i386.REG_BH}, {"BH", LBREG, x86.REG_BH},
{"AX", LLREG, i386.REG_AX}, {"AX", LLREG, x86.REG_AX},
{"CX", LLREG, i386.REG_CX}, {"CX", LLREG, x86.REG_CX},
{"DX", LLREG, i386.REG_DX}, {"DX", LLREG, x86.REG_DX},
{"BX", LLREG, i386.REG_BX}, {"BX", LLREG, x86.REG_BX},
/* "SP", LLREG, REG_SP, */ /* "SP", LLREG, REG_SP, */
{"BP", LLREG, i386.REG_BP}, {"BP", LLREG, x86.REG_BP},
{"SI", LLREG, i386.REG_SI}, {"SI", LLREG, x86.REG_SI},
{"DI", LLREG, i386.REG_DI}, {"DI", LLREG, x86.REG_DI},
{"F0", LFREG, i386.REG_F0 + 0}, {"F0", LFREG, x86.REG_F0 + 0},
{"F1", LFREG, i386.REG_F0 + 1}, {"F1", LFREG, x86.REG_F0 + 1},
{"F2", LFREG, i386.REG_F0 + 2}, {"F2", LFREG, x86.REG_F0 + 2},
{"F3", LFREG, i386.REG_F0 + 3}, {"F3", LFREG, x86.REG_F0 + 3},
{"F4", LFREG, i386.REG_F0 + 4}, {"F4", LFREG, x86.REG_F0 + 4},
{"F5", LFREG, i386.REG_F0 + 5}, {"F5", LFREG, x86.REG_F0 + 5},
{"F6", LFREG, i386.REG_F0 + 6}, {"F6", LFREG, x86.REG_F0 + 6},
{"F7", LFREG, i386.REG_F0 + 7}, {"F7", LFREG, x86.REG_F0 + 7},
{"X0", LXREG, i386.REG_X0 + 0}, {"X0", LXREG, x86.REG_X0 + 0},
{"X1", LXREG, i386.REG_X0 + 1}, {"X1", LXREG, x86.REG_X0 + 1},
{"X2", LXREG, i386.REG_X0 + 2}, {"X2", LXREG, x86.REG_X0 + 2},
{"X3", LXREG, i386.REG_X0 + 3}, {"X3", LXREG, x86.REG_X0 + 3},
{"X4", LXREG, i386.REG_X0 + 4}, {"X4", LXREG, x86.REG_X0 + 4},
{"X5", LXREG, i386.REG_X0 + 5}, {"X5", LXREG, x86.REG_X0 + 5},
{"X6", LXREG, i386.REG_X0 + 6}, {"X6", LXREG, x86.REG_X0 + 6},
{"X7", LXREG, i386.REG_X0 + 7}, {"X7", LXREG, x86.REG_X0 + 7},
{"CS", LSREG, i386.REG_CS}, {"CS", LSREG, x86.REG_CS},
{"SS", LSREG, i386.REG_SS}, {"SS", LSREG, x86.REG_SS},
{"DS", LSREG, i386.REG_DS}, {"DS", LSREG, x86.REG_DS},
{"ES", LSREG, i386.REG_ES}, {"ES", LSREG, x86.REG_ES},
{"FS", LSREG, i386.REG_FS}, {"FS", LSREG, x86.REG_FS},
{"GS", LSREG, i386.REG_GS}, {"GS", LSREG, x86.REG_GS},
{"TLS", LSREG, i386.REG_TLS}, {"TLS", LSREG, x86.REG_TLS},
{"GDTR", LBREG, i386.REG_GDTR}, {"GDTR", LBREG, x86.REG_GDTR},
{"IDTR", LBREG, i386.REG_IDTR}, {"IDTR", LBREG, x86.REG_IDTR},
{"LDTR", LBREG, i386.REG_LDTR}, {"LDTR", LBREG, x86.REG_LDTR},
{"MSW", LBREG, i386.REG_MSW}, {"MSW", LBREG, x86.REG_MSW},
{"TASK", LBREG, i386.REG_TASK}, {"TASK", LBREG, x86.REG_TASK},
{"CR0", LBREG, i386.REG_CR + 0}, {"CR0", LBREG, x86.REG_CR + 0},
{"CR1", LBREG, i386.REG_CR + 1}, {"CR1", LBREG, x86.REG_CR + 1},
{"CR2", LBREG, i386.REG_CR + 2}, {"CR2", LBREG, x86.REG_CR + 2},
{"CR3", LBREG, i386.REG_CR + 3}, {"CR3", LBREG, x86.REG_CR + 3},
{"CR4", LBREG, i386.REG_CR + 4}, {"CR4", LBREG, x86.REG_CR + 4},
{"CR5", LBREG, i386.REG_CR + 5}, {"CR5", LBREG, x86.REG_CR + 5},
{"CR6", LBREG, i386.REG_CR + 6}, {"CR6", LBREG, x86.REG_CR + 6},
{"CR7", LBREG, i386.REG_CR + 7}, {"CR7", LBREG, x86.REG_CR + 7},
{"DR0", LBREG, i386.REG_DR + 0}, {"DR0", LBREG, x86.REG_DR + 0},
{"DR1", LBREG, i386.REG_DR + 1}, {"DR1", LBREG, x86.REG_DR + 1},
{"DR2", LBREG, i386.REG_DR + 2}, {"DR2", LBREG, x86.REG_DR + 2},
{"DR3", LBREG, i386.REG_DR + 3}, {"DR3", LBREG, x86.REG_DR + 3},
{"DR4", LBREG, i386.REG_DR + 4}, {"DR4", LBREG, x86.REG_DR + 4},
{"DR5", LBREG, i386.REG_DR + 5}, {"DR5", LBREG, x86.REG_DR + 5},
{"DR6", LBREG, i386.REG_DR + 6}, {"DR6", LBREG, x86.REG_DR + 6},
{"DR7", LBREG, i386.REG_DR + 7}, {"DR7", LBREG, x86.REG_DR + 7},
{"TR0", LBREG, i386.REG_TR + 0}, {"TR0", LBREG, x86.REG_TR + 0},
{"TR1", LBREG, i386.REG_TR + 1}, {"TR1", LBREG, x86.REG_TR + 1},
{"TR2", LBREG, i386.REG_TR + 2}, {"TR2", LBREG, x86.REG_TR + 2},
{"TR3", LBREG, i386.REG_TR + 3}, {"TR3", LBREG, x86.REG_TR + 3},
{"TR4", LBREG, i386.REG_TR + 4}, {"TR4", LBREG, x86.REG_TR + 4},
{"TR5", LBREG, i386.REG_TR + 5}, {"TR5", LBREG, x86.REG_TR + 5},
{"TR6", LBREG, i386.REG_TR + 6}, {"TR6", LBREG, x86.REG_TR + 6},
{"TR7", LBREG, i386.REG_TR + 7}, {"TR7", LBREG, x86.REG_TR + 7},
{"AAA", LTYPE0, i386.AAAA}, {"AAA", LTYPE0, x86.AAAA},
{"AAD", LTYPE0, i386.AAAD}, {"AAD", LTYPE0, x86.AAAD},
{"AAM", LTYPE0, i386.AAAM}, {"AAM", LTYPE0, x86.AAAM},
{"AAS", LTYPE0, i386.AAAS}, {"AAS", LTYPE0, x86.AAAS},
{"ADCB", LTYPE3, i386.AADCB}, {"ADCB", LTYPE3, x86.AADCB},
{"ADCL", LTYPE3, i386.AADCL}, {"ADCL", LTYPE3, x86.AADCL},
{"ADCW", LTYPE3, i386.AADCW}, {"ADCW", LTYPE3, x86.AADCW},
{"ADDB", LTYPE3, i386.AADDB}, {"ADDB", LTYPE3, x86.AADDB},
{"ADDL", LTYPE3, i386.AADDL}, {"ADDL", LTYPE3, x86.AADDL},
{"ADDW", LTYPE3, i386.AADDW}, {"ADDW", LTYPE3, x86.AADDW},
{"ADJSP", LTYPE2, i386.AADJSP}, {"ADJSP", LTYPE2, x86.AADJSP},
{"ANDB", LTYPE3, i386.AANDB}, {"ANDB", LTYPE3, x86.AANDB},
{"ANDL", LTYPE3, i386.AANDL}, {"ANDL", LTYPE3, x86.AANDL},
{"ANDW", LTYPE3, i386.AANDW}, {"ANDW", LTYPE3, x86.AANDW},
{"ARPL", LTYPE3, i386.AARPL}, {"ARPL", LTYPE3, x86.AARPL},
{"BOUNDL", LTYPE3, i386.ABOUNDL}, {"BOUNDL", LTYPE3, x86.ABOUNDL},
{"BOUNDW", LTYPE3, i386.ABOUNDW}, {"BOUNDW", LTYPE3, x86.ABOUNDW},
{"BSFL", LTYPE3, i386.ABSFL}, {"BSFL", LTYPE3, x86.ABSFL},
{"BSFW", LTYPE3, i386.ABSFW}, {"BSFW", LTYPE3, x86.ABSFW},
{"BSRL", LTYPE3, i386.ABSRL}, {"BSRL", LTYPE3, x86.ABSRL},
{"BSRW", LTYPE3, i386.ABSRW}, {"BSRW", LTYPE3, x86.ABSRW},
{"BSWAPL", LTYPE1, i386.ABSWAPL}, {"BSWAPL", LTYPE1, x86.ABSWAPL},
{"BTCL", LTYPE3, i386.ABTCL}, {"BTCL", LTYPE3, x86.ABTCL},
{"BTCW", LTYPE3, i386.ABTCW}, {"BTCW", LTYPE3, x86.ABTCW},
{"BTL", LTYPE3, i386.ABTL}, {"BTL", LTYPE3, x86.ABTL},
{"BTRL", LTYPE3, i386.ABTRL}, {"BTRL", LTYPE3, x86.ABTRL},
{"BTRW", LTYPE3, i386.ABTRW}, {"BTRW", LTYPE3, x86.ABTRW},
{"BTSL", LTYPE3, i386.ABTSL}, {"BTSL", LTYPE3, x86.ABTSL},
{"BTSW", LTYPE3, i386.ABTSW}, {"BTSW", LTYPE3, x86.ABTSW},
{"BTW", LTYPE3, i386.ABTW}, {"BTW", LTYPE3, x86.ABTW},
{"BYTE", LTYPE2, i386.ABYTE}, {"BYTE", LTYPE2, x86.ABYTE},
{"CALL", LTYPEC, obj.ACALL}, {"CALL", LTYPEC, obj.ACALL},
{"CLC", LTYPE0, i386.ACLC}, {"CLC", LTYPE0, x86.ACLC},
{"CLD", LTYPE0, i386.ACLD}, {"CLD", LTYPE0, x86.ACLD},
{"CLI", LTYPE0, i386.ACLI}, {"CLI", LTYPE0, x86.ACLI},
{"CLTS", LTYPE0, i386.ACLTS}, {"CLTS", LTYPE0, x86.ACLTS},
{"CMC", LTYPE0, i386.ACMC}, {"CMC", LTYPE0, x86.ACMC},
{"CMPB", LTYPE4, i386.ACMPB}, {"CMPB", LTYPE4, x86.ACMPB},
{"CMPL", LTYPE4, i386.ACMPL}, {"CMPL", LTYPE4, x86.ACMPL},
{"CMPW", LTYPE4, i386.ACMPW}, {"CMPW", LTYPE4, x86.ACMPW},
{"CMPSB", LTYPE0, i386.ACMPSB}, {"CMPSB", LTYPE0, x86.ACMPSB},
{"CMPSL", LTYPE0, i386.ACMPSL}, {"CMPSL", LTYPE0, x86.ACMPSL},
{"CMPSW", LTYPE0, i386.ACMPSW}, {"CMPSW", LTYPE0, x86.ACMPSW},
{"CMPXCHG8B", LTYPE1, i386.ACMPXCHG8B}, {"CMPXCHG8B", LTYPE1, x86.ACMPXCHG8B},
{"CMPXCHGB", LTYPE3, i386.ACMPXCHGB}, {"CMPXCHGB", LTYPE3, x86.ACMPXCHGB},
{"CMPXCHGL", LTYPE3, i386.ACMPXCHGL}, {"CMPXCHGL", LTYPE3, x86.ACMPXCHGL},
{"CMPXCHGW", LTYPE3, i386.ACMPXCHGW}, {"CMPXCHGW", LTYPE3, x86.ACMPXCHGW},
{"CPUID", LTYPE0, i386.ACPUID}, {"CPUID", LTYPE0, x86.ACPUID},
{"DAA", LTYPE0, i386.ADAA}, {"DAA", LTYPE0, x86.ADAA},
{"DAS", LTYPE0, i386.ADAS}, {"DAS", LTYPE0, x86.ADAS},
{"DATA", LTYPED, obj.ADATA}, {"DATA", LTYPED, obj.ADATA},
{"DECB", LTYPE1, i386.ADECB}, {"DECB", LTYPE1, x86.ADECB},
{"DECL", LTYPE1, i386.ADECL}, {"DECL", LTYPE1, x86.ADECL},
{"DECW", LTYPE1, i386.ADECW}, {"DECW", LTYPE1, x86.ADECW},
{"DIVB", LTYPE2, i386.ADIVB}, {"DIVB", LTYPE2, x86.ADIVB},
{"DIVL", LTYPE2, i386.ADIVL}, {"DIVL", LTYPE2, x86.ADIVL},
{"DIVW", LTYPE2, i386.ADIVW}, {"DIVW", LTYPE2, x86.ADIVW},
{"END", LTYPE0, obj.AEND}, {"END", LTYPE0, obj.AEND},
{"ENTER", LTYPE2, i386.AENTER}, {"ENTER", LTYPE2, x86.AENTER},
{"GLOBL", LTYPEG, obj.AGLOBL}, {"GLOBL", LTYPEG, obj.AGLOBL},
{"HLT", LTYPE0, i386.AHLT}, {"HLT", LTYPE0, x86.AHLT},
{"IDIVB", LTYPE2, i386.AIDIVB}, {"IDIVB", LTYPE2, x86.AIDIVB},
{"IDIVL", LTYPE2, i386.AIDIVL}, {"IDIVL", LTYPE2, x86.AIDIVL},
{"IDIVW", LTYPE2, i386.AIDIVW}, {"IDIVW", LTYPE2, x86.AIDIVW},
{"IMULB", LTYPE2, i386.AIMULB}, {"IMULB", LTYPE2, x86.AIMULB},
{"IMULL", LTYPEI, i386.AIMULL}, {"IMULL", LTYPEI, x86.AIMULL},
{"IMULW", LTYPEI, i386.AIMULW}, {"IMULW", LTYPEI, x86.AIMULW},
{"INB", LTYPE0, i386.AINB}, {"INB", LTYPE0, x86.AINB},
{"INL", LTYPE0, i386.AINL}, {"INL", LTYPE0, x86.AINL},
{"INW", LTYPE0, i386.AINW}, {"INW", LTYPE0, x86.AINW},
{"INCB", LTYPE1, i386.AINCB}, {"INCB", LTYPE1, x86.AINCB},
{"INCL", LTYPE1, i386.AINCL}, {"INCL", LTYPE1, x86.AINCL},
{"INCW", LTYPE1, i386.AINCW}, {"INCW", LTYPE1, x86.AINCW},
{"INSB", LTYPE0, i386.AINSB}, {"INSB", LTYPE0, x86.AINSB},
{"INSL", LTYPE0, i386.AINSL}, {"INSL", LTYPE0, x86.AINSL},
{"INSW", LTYPE0, i386.AINSW}, {"INSW", LTYPE0, x86.AINSW},
{"INT", LTYPE2, i386.AINT}, {"INT", LTYPE2, x86.AINT},
{"INTO", LTYPE0, i386.AINTO}, {"INTO", LTYPE0, x86.AINTO},
{"IRETL", LTYPE0, i386.AIRETL}, {"IRETL", LTYPE0, x86.AIRETL},
{"IRETW", LTYPE0, i386.AIRETW}, {"IRETW", LTYPE0, x86.AIRETW},
{"JOS", LTYPER, i386.AJOS}, /* overflow set (OF = 1) */ {"JOS", LTYPER, x86.AJOS}, /* overflow set (OF = 1) */
{"JO", LTYPER, i386.AJOS}, /* alternate */ {"JO", LTYPER, x86.AJOS}, /* alternate */
{"JOC", LTYPER, i386.AJOC}, /* overflow clear (OF = 0) */ {"JOC", LTYPER, x86.AJOC}, /* overflow clear (OF = 0) */
{"JNO", LTYPER, i386.AJOC}, /* alternate */ {"JNO", LTYPER, x86.AJOC}, /* alternate */
{"JCS", LTYPER, i386.AJCS}, /* carry set (CF = 1) */ {"JCS", LTYPER, x86.AJCS}, /* carry set (CF = 1) */
{"JB", LTYPER, i386.AJCS}, /* alternate */ {"JB", LTYPER, x86.AJCS}, /* alternate */
{"JC", LTYPER, i386.AJCS}, /* alternate */ {"JC", LTYPER, x86.AJCS}, /* alternate */
{"JNAE", LTYPER, i386.AJCS}, /* alternate */ {"JNAE", LTYPER, x86.AJCS}, /* alternate */
{"JLO", LTYPER, i386.AJCS}, /* alternate */ {"JLO", LTYPER, x86.AJCS}, /* alternate */
{"JCC", LTYPER, i386.AJCC}, /* carry clear (CF = 0) */ {"JCC", LTYPER, x86.AJCC}, /* carry clear (CF = 0) */
{"JAE", LTYPER, i386.AJCC}, /* alternate */ {"JAE", LTYPER, x86.AJCC}, /* alternate */
{"JNB", LTYPER, i386.AJCC}, /* alternate */ {"JNB", LTYPER, x86.AJCC}, /* alternate */
{"JNC", LTYPER, i386.AJCC}, /* alternate */ {"JNC", LTYPER, x86.AJCC}, /* alternate */
{"JHS", LTYPER, i386.AJCC}, /* alternate */ {"JHS", LTYPER, x86.AJCC}, /* alternate */
{"JEQ", LTYPER, i386.AJEQ}, /* equal (ZF = 1) */ {"JEQ", LTYPER, x86.AJEQ}, /* equal (ZF = 1) */
{"JE", LTYPER, i386.AJEQ}, /* alternate */ {"JE", LTYPER, x86.AJEQ}, /* alternate */
{"JZ", LTYPER, i386.AJEQ}, /* alternate */ {"JZ", LTYPER, x86.AJEQ}, /* alternate */
{"JNE", LTYPER, i386.AJNE}, /* not equal (ZF = 0) */ {"JNE", LTYPER, x86.AJNE}, /* not equal (ZF = 0) */
{"JNZ", LTYPER, i386.AJNE}, /* alternate */ {"JNZ", LTYPER, x86.AJNE}, /* alternate */
{"JLS", LTYPER, i386.AJLS}, /* lower or same (unsigned) (CF = 1 || ZF = 1) */ {"JLS", LTYPER, x86.AJLS}, /* lower or same (unsigned) (CF = 1 || ZF = 1) */
{"JBE", LTYPER, i386.AJLS}, /* alternate */ {"JBE", LTYPER, x86.AJLS}, /* alternate */
{"JNA", LTYPER, i386.AJLS}, /* alternate */ {"JNA", LTYPER, x86.AJLS}, /* alternate */
{"JHI", LTYPER, i386.AJHI}, /* higher (unsigned) (CF = 0 && ZF = 0) */ {"JHI", LTYPER, x86.AJHI}, /* higher (unsigned) (CF = 0 && ZF = 0) */
{"JA", LTYPER, i386.AJHI}, /* alternate */ {"JA", LTYPER, x86.AJHI}, /* alternate */
{"JNBE", LTYPER, i386.AJHI}, /* alternate */ {"JNBE", LTYPER, x86.AJHI}, /* alternate */
{"JMI", LTYPER, i386.AJMI}, /* negative (minus) (SF = 1) */ {"JMI", LTYPER, x86.AJMI}, /* negative (minus) (SF = 1) */
{"JS", LTYPER, i386.AJMI}, /* alternate */ {"JS", LTYPER, x86.AJMI}, /* alternate */
{"JPL", LTYPER, i386.AJPL}, /* non-negative (plus) (SF = 0) */ {"JPL", LTYPER, x86.AJPL}, /* non-negative (plus) (SF = 0) */
{"JNS", LTYPER, i386.AJPL}, /* alternate */ {"JNS", LTYPER, x86.AJPL}, /* alternate */
{"JPS", LTYPER, i386.AJPS}, /* parity set (PF = 1) */ {"JPS", LTYPER, x86.AJPS}, /* parity set (PF = 1) */
{"JP", LTYPER, i386.AJPS}, /* alternate */ {"JP", LTYPER, x86.AJPS}, /* alternate */
{"JPE", LTYPER, i386.AJPS}, /* alternate */ {"JPE", LTYPER, x86.AJPS}, /* alternate */
{"JPC", LTYPER, i386.AJPC}, /* parity clear (PF = 0) */ {"JPC", LTYPER, x86.AJPC}, /* parity clear (PF = 0) */
{"JNP", LTYPER, i386.AJPC}, /* alternate */ {"JNP", LTYPER, x86.AJPC}, /* alternate */
{"JPO", LTYPER, i386.AJPC}, /* alternate */ {"JPO", LTYPER, x86.AJPC}, /* alternate */
{"JLT", LTYPER, i386.AJLT}, /* less than (signed) (SF != OF) */ {"JLT", LTYPER, x86.AJLT}, /* less than (signed) (SF != OF) */
{"JL", LTYPER, i386.AJLT}, /* alternate */ {"JL", LTYPER, x86.AJLT}, /* alternate */
{"JNGE", LTYPER, i386.AJLT}, /* alternate */ {"JNGE", LTYPER, x86.AJLT}, /* alternate */
{"JGE", LTYPER, i386.AJGE}, /* greater than or equal (signed) (SF = OF) */ {"JGE", LTYPER, x86.AJGE}, /* greater than or equal (signed) (SF = OF) */
{"JNL", LTYPER, i386.AJGE}, /* alternate */ {"JNL", LTYPER, x86.AJGE}, /* alternate */
{"JLE", LTYPER, i386.AJLE}, /* less than or equal (signed) (ZF = 1 || SF != OF) */ {"JLE", LTYPER, x86.AJLE}, /* less than or equal (signed) (ZF = 1 || SF != OF) */
{"JNG", LTYPER, i386.AJLE}, /* alternate */ {"JNG", LTYPER, x86.AJLE}, /* alternate */
{"JGT", LTYPER, i386.AJGT}, /* greater than (signed) (ZF = 0 && SF = OF) */ {"JGT", LTYPER, x86.AJGT}, /* greater than (signed) (ZF = 0 && SF = OF) */
{"JG", LTYPER, i386.AJGT}, /* alternate */ {"JG", LTYPER, x86.AJGT}, /* alternate */
{"JNLE", LTYPER, i386.AJGT}, /* alternate */ {"JNLE", LTYPER, x86.AJGT}, /* alternate */
{"JCXZL", LTYPER, i386.AJCXZL}, {"JCXZL", LTYPER, x86.AJCXZL},
{"JCXZW", LTYPER, i386.AJCXZW}, {"JCXZW", LTYPER, x86.AJCXZW},
{"JMP", LTYPEC, obj.AJMP}, {"JMP", LTYPEC, obj.AJMP},
{"LAHF", LTYPE0, i386.ALAHF}, {"LAHF", LTYPE0, x86.ALAHF},
{"LARL", LTYPE3, i386.ALARL}, {"LARL", LTYPE3, x86.ALARL},
{"LARW", LTYPE3, i386.ALARW}, {"LARW", LTYPE3, x86.ALARW},
{"LEAL", LTYPE3, i386.ALEAL}, {"LEAL", LTYPE3, x86.ALEAL},
{"LEAW", LTYPE3, i386.ALEAW}, {"LEAW", LTYPE3, x86.ALEAW},
{"LEAVEL", LTYPE0, i386.ALEAVEL}, {"LEAVEL", LTYPE0, x86.ALEAVEL},
{"LEAVEW", LTYPE0, i386.ALEAVEW}, {"LEAVEW", LTYPE0, x86.ALEAVEW},
{"LOCK", LTYPE0, i386.ALOCK}, {"LOCK", LTYPE0, x86.ALOCK},
{"LODSB", LTYPE0, i386.ALODSB}, {"LODSB", LTYPE0, x86.ALODSB},
{"LODSL", LTYPE0, i386.ALODSL}, {"LODSL", LTYPE0, x86.ALODSL},
{"LODSW", LTYPE0, i386.ALODSW}, {"LODSW", LTYPE0, x86.ALODSW},
{"LONG", LTYPE2, i386.ALONG}, {"LONG", LTYPE2, x86.ALONG},
{"LOOP", LTYPER, i386.ALOOP}, {"LOOP", LTYPER, x86.ALOOP},
{"LOOPEQ", LTYPER, i386.ALOOPEQ}, {"LOOPEQ", LTYPER, x86.ALOOPEQ},
{"LOOPNE", LTYPER, i386.ALOOPNE}, {"LOOPNE", LTYPER, x86.ALOOPNE},
{"LSLL", LTYPE3, i386.ALSLL}, {"LSLL", LTYPE3, x86.ALSLL},
{"LSLW", LTYPE3, i386.ALSLW}, {"LSLW", LTYPE3, x86.ALSLW},
{"MOVB", LTYPE3, i386.AMOVB}, {"MOVB", LTYPE3, x86.AMOVB},
{"MOVL", LTYPEM, i386.AMOVL}, {"MOVL", LTYPEM, x86.AMOVL},
{"MOVW", LTYPEM, i386.AMOVW}, {"MOVW", LTYPEM, x86.AMOVW},
{"MOVQ", LTYPEM, i386.AMOVQ}, {"MOVQ", LTYPEM, x86.AMOVQ},
{"MOVBLSX", LTYPE3, i386.AMOVBLSX}, {"MOVBLSX", LTYPE3, x86.AMOVBLSX},
{"MOVBLZX", LTYPE3, i386.AMOVBLZX}, {"MOVBLZX", LTYPE3, x86.AMOVBLZX},
{"MOVBWSX", LTYPE3, i386.AMOVBWSX}, {"MOVBWSX", LTYPE3, x86.AMOVBWSX},
{"MOVBWZX", LTYPE3, i386.AMOVBWZX}, {"MOVBWZX", LTYPE3, x86.AMOVBWZX},
{"MOVWLSX", LTYPE3, i386.AMOVWLSX}, {"MOVWLSX", LTYPE3, x86.AMOVWLSX},
{"MOVWLZX", LTYPE3, i386.AMOVWLZX}, {"MOVWLZX", LTYPE3, x86.AMOVWLZX},
{"MOVSB", LTYPE0, i386.AMOVSB}, {"MOVSB", LTYPE0, x86.AMOVSB},
{"MOVSL", LTYPE0, i386.AMOVSL}, {"MOVSL", LTYPE0, x86.AMOVSL},
{"MOVSW", LTYPE0, i386.AMOVSW}, {"MOVSW", LTYPE0, x86.AMOVSW},
{"MULB", LTYPE2, i386.AMULB}, {"MULB", LTYPE2, x86.AMULB},
{"MULL", LTYPE2, i386.AMULL}, {"MULL", LTYPE2, x86.AMULL},
{"MULW", LTYPE2, i386.AMULW}, {"MULW", LTYPE2, x86.AMULW},
{"NEGB", LTYPE1, i386.ANEGB}, {"NEGB", LTYPE1, x86.ANEGB},
{"NEGL", LTYPE1, i386.ANEGL}, {"NEGL", LTYPE1, x86.ANEGL},
{"NEGW", LTYPE1, i386.ANEGW}, {"NEGW", LTYPE1, x86.ANEGW},
{"NOP", LTYPEN, obj.ANOP}, {"NOP", LTYPEN, obj.ANOP},
{"NOTB", LTYPE1, i386.ANOTB}, {"NOTB", LTYPE1, x86.ANOTB},
{"NOTL", LTYPE1, i386.ANOTL}, {"NOTL", LTYPE1, x86.ANOTL},
{"NOTW", LTYPE1, i386.ANOTW}, {"NOTW", LTYPE1, x86.ANOTW},
{"ORB", LTYPE3, i386.AORB}, {"ORB", LTYPE3, x86.AORB},
{"ORL", LTYPE3, i386.AORL}, {"ORL", LTYPE3, x86.AORL},
{"ORW", LTYPE3, i386.AORW}, {"ORW", LTYPE3, x86.AORW},
{"OUTB", LTYPE0, i386.AOUTB}, {"OUTB", LTYPE0, x86.AOUTB},
{"OUTL", LTYPE0, i386.AOUTL}, {"OUTL", LTYPE0, x86.AOUTL},
{"OUTW", LTYPE0, i386.AOUTW}, {"OUTW", LTYPE0, x86.AOUTW},
{"OUTSB", LTYPE0, i386.AOUTSB}, {"OUTSB", LTYPE0, x86.AOUTSB},
{"OUTSL", LTYPE0, i386.AOUTSL}, {"OUTSL", LTYPE0, x86.AOUTSL},
{"OUTSW", LTYPE0, i386.AOUTSW}, {"OUTSW", LTYPE0, x86.AOUTSW},
{"PAUSE", LTYPEN, i386.APAUSE}, {"PAUSE", LTYPEN, x86.APAUSE},
{"PINSRD", LTYPEX, i386.APINSRD}, {"PINSRD", LTYPEX, x86.APINSRD},
{"POPAL", LTYPE0, i386.APOPAL}, {"POPAL", LTYPE0, x86.APOPAL},
{"POPAW", LTYPE0, i386.APOPAW}, {"POPAW", LTYPE0, x86.APOPAW},
{"POPFL", LTYPE0, i386.APOPFL}, {"POPFL", LTYPE0, x86.APOPFL},
{"POPFW", LTYPE0, i386.APOPFW}, {"POPFW", LTYPE0, x86.APOPFW},
{"POPL", LTYPE1, i386.APOPL}, {"POPL", LTYPE1, x86.APOPL},
{"POPW", LTYPE1, i386.APOPW}, {"POPW", LTYPE1, x86.APOPW},
{"PUSHAL", LTYPE0, i386.APUSHAL}, {"PUSHAL", LTYPE0, x86.APUSHAL},
{"PUSHAW", LTYPE0, i386.APUSHAW}, {"PUSHAW", LTYPE0, x86.APUSHAW},
{"PUSHFL", LTYPE0, i386.APUSHFL}, {"PUSHFL", LTYPE0, x86.APUSHFL},
{"PUSHFW", LTYPE0, i386.APUSHFW}, {"PUSHFW", LTYPE0, x86.APUSHFW},
{"PUSHL", LTYPE2, i386.APUSHL}, {"PUSHL", LTYPE2, x86.APUSHL},
{"PUSHW", LTYPE2, i386.APUSHW}, {"PUSHW", LTYPE2, x86.APUSHW},
{"RCLB", LTYPE3, i386.ARCLB}, {"RCLB", LTYPE3, x86.ARCLB},
{"RCLL", LTYPE3, i386.ARCLL}, {"RCLL", LTYPE3, x86.ARCLL},
{"RCLW", LTYPE3, i386.ARCLW}, {"RCLW", LTYPE3, x86.ARCLW},
{"RCRB", LTYPE3, i386.ARCRB}, {"RCRB", LTYPE3, x86.ARCRB},
{"RCRL", LTYPE3, i386.ARCRL}, {"RCRL", LTYPE3, x86.ARCRL},
{"RCRW", LTYPE3, i386.ARCRW}, {"RCRW", LTYPE3, x86.ARCRW},
{"RDTSC", LTYPE0, i386.ARDTSC}, {"RDTSC", LTYPE0, x86.ARDTSC},
{"REP", LTYPE0, i386.AREP}, {"REP", LTYPE0, x86.AREP},
{"REPN", LTYPE0, i386.AREPN}, {"REPN", LTYPE0, x86.AREPN},
{"RET", LTYPE0, obj.ARET}, {"RET", LTYPE0, obj.ARET},
{"ROLB", LTYPE3, i386.AROLB}, {"ROLB", LTYPE3, x86.AROLB},
{"ROLL", LTYPE3, i386.AROLL}, {"ROLL", LTYPE3, x86.AROLL},
{"ROLW", LTYPE3, i386.AROLW}, {"ROLW", LTYPE3, x86.AROLW},
{"RORB", LTYPE3, i386.ARORB}, {"RORB", LTYPE3, x86.ARORB},
{"RORL", LTYPE3, i386.ARORL}, {"RORL", LTYPE3, x86.ARORL},
{"RORW", LTYPE3, i386.ARORW}, {"RORW", LTYPE3, x86.ARORW},
{"SAHF", LTYPE0, i386.ASAHF}, {"SAHF", LTYPE0, x86.ASAHF},
{"SALB", LTYPE3, i386.ASALB}, {"SALB", LTYPE3, x86.ASALB},
{"SALL", LTYPE3, i386.ASALL}, {"SALL", LTYPE3, x86.ASALL},
{"SALW", LTYPE3, i386.ASALW}, {"SALW", LTYPE3, x86.ASALW},
{"SARB", LTYPE3, i386.ASARB}, {"SARB", LTYPE3, x86.ASARB},
{"SARL", LTYPE3, i386.ASARL}, {"SARL", LTYPE3, x86.ASARL},
{"SARW", LTYPE3, i386.ASARW}, {"SARW", LTYPE3, x86.ASARW},
{"SBBB", LTYPE3, i386.ASBBB}, {"SBBB", LTYPE3, x86.ASBBB},
{"SBBL", LTYPE3, i386.ASBBL}, {"SBBL", LTYPE3, x86.ASBBL},
{"SBBW", LTYPE3, i386.ASBBW}, {"SBBW", LTYPE3, x86.ASBBW},
{"SCASB", LTYPE0, i386.ASCASB}, {"SCASB", LTYPE0, x86.ASCASB},
{"SCASL", LTYPE0, i386.ASCASL}, {"SCASL", LTYPE0, x86.ASCASL},
{"SCASW", LTYPE0, i386.ASCASW}, {"SCASW", LTYPE0, x86.ASCASW},
{"SETCC", LTYPE1, i386.ASETCC}, /* see JCC etc above for condition codes */ {"SETCC", LTYPE1, x86.ASETCC}, /* see JCC etc above for condition codes */
{"SETCS", LTYPE1, i386.ASETCS}, {"SETCS", LTYPE1, x86.ASETCS},
{"SETEQ", LTYPE1, i386.ASETEQ}, {"SETEQ", LTYPE1, x86.ASETEQ},
{"SETGE", LTYPE1, i386.ASETGE}, {"SETGE", LTYPE1, x86.ASETGE},
{"SETGT", LTYPE1, i386.ASETGT}, {"SETGT", LTYPE1, x86.ASETGT},
{"SETHI", LTYPE1, i386.ASETHI}, {"SETHI", LTYPE1, x86.ASETHI},
{"SETLE", LTYPE1, i386.ASETLE}, {"SETLE", LTYPE1, x86.ASETLE},
{"SETLS", LTYPE1, i386.ASETLS}, {"SETLS", LTYPE1, x86.ASETLS},
{"SETLT", LTYPE1, i386.ASETLT}, {"SETLT", LTYPE1, x86.ASETLT},
{"SETMI", LTYPE1, i386.ASETMI}, {"SETMI", LTYPE1, x86.ASETMI},
{"SETNE", LTYPE1, i386.ASETNE}, {"SETNE", LTYPE1, x86.ASETNE},
{"SETOC", LTYPE1, i386.ASETOC}, {"SETOC", LTYPE1, x86.ASETOC},
{"SETOS", LTYPE1, i386.ASETOS}, {"SETOS", LTYPE1, x86.ASETOS},
{"SETPC", LTYPE1, i386.ASETPC}, {"SETPC", LTYPE1, x86.ASETPC},
{"SETPL", LTYPE1, i386.ASETPL}, {"SETPL", LTYPE1, x86.ASETPL},
{"SETPS", LTYPE1, i386.ASETPS}, {"SETPS", LTYPE1, x86.ASETPS},
{"CDQ", LTYPE0, i386.ACDQ}, {"CDQ", LTYPE0, x86.ACDQ},
{"CWD", LTYPE0, i386.ACWD}, {"CWD", LTYPE0, x86.ACWD},
{"SHLB", LTYPE3, i386.ASHLB}, {"SHLB", LTYPE3, x86.ASHLB},
{"SHLL", LTYPES, i386.ASHLL}, {"SHLL", LTYPES, x86.ASHLL},
{"SHLW", LTYPES, i386.ASHLW}, {"SHLW", LTYPES, x86.ASHLW},
{"SHRB", LTYPE3, i386.ASHRB}, {"SHRB", LTYPE3, x86.ASHRB},
{"SHRL", LTYPES, i386.ASHRL}, {"SHRL", LTYPES, x86.ASHRL},
{"SHRW", LTYPES, i386.ASHRW}, {"SHRW", LTYPES, x86.ASHRW},
{"STC", LTYPE0, i386.ASTC}, {"STC", LTYPE0, x86.ASTC},
{"STD", LTYPE0, i386.ASTD}, {"STD", LTYPE0, x86.ASTD},
{"STI", LTYPE0, i386.ASTI}, {"STI", LTYPE0, x86.ASTI},
{"STOSB", LTYPE0, i386.ASTOSB}, {"STOSB", LTYPE0, x86.ASTOSB},
{"STOSL", LTYPE0, i386.ASTOSL}, {"STOSL", LTYPE0, x86.ASTOSL},
{"STOSW", LTYPE0, i386.ASTOSW}, {"STOSW", LTYPE0, x86.ASTOSW},
{"SUBB", LTYPE3, i386.ASUBB}, {"SUBB", LTYPE3, x86.ASUBB},
{"SUBL", LTYPE3, i386.ASUBL}, {"SUBL", LTYPE3, x86.ASUBL},
{"SUBW", LTYPE3, i386.ASUBW}, {"SUBW", LTYPE3, x86.ASUBW},
{"SYSCALL", LTYPE0, i386.ASYSCALL}, {"SYSCALL", LTYPE0, x86.ASYSCALL},
{"TESTB", LTYPE3, i386.ATESTB}, {"TESTB", LTYPE3, x86.ATESTB},
{"TESTL", LTYPE3, i386.ATESTL}, {"TESTL", LTYPE3, x86.ATESTL},
{"TESTW", LTYPE3, i386.ATESTW}, {"TESTW", LTYPE3, x86.ATESTW},
{"TEXT", LTYPET, obj.ATEXT}, {"TEXT", LTYPET, obj.ATEXT},
{"VERR", LTYPE2, i386.AVERR}, {"VERR", LTYPE2, x86.AVERR},
{"VERW", LTYPE2, i386.AVERW}, {"VERW", LTYPE2, x86.AVERW},
{"WAIT", LTYPE0, i386.AWAIT}, {"WAIT", LTYPE0, x86.AWAIT},
{"WORD", LTYPE2, i386.AWORD}, {"WORD", LTYPE2, x86.AWORD},
{"XADDB", LTYPE3, i386.AXADDB}, {"XADDB", LTYPE3, x86.AXADDB},
{"XADDL", LTYPE3, i386.AXADDL}, {"XADDL", LTYPE3, x86.AXADDL},
{"XADDW", LTYPE3, i386.AXADDW}, {"XADDW", LTYPE3, x86.AXADDW},
{"XCHGB", LTYPE3, i386.AXCHGB}, {"XCHGB", LTYPE3, x86.AXCHGB},
{"XCHGL", LTYPE3, i386.AXCHGL}, {"XCHGL", LTYPE3, x86.AXCHGL},
{"XCHGW", LTYPE3, i386.AXCHGW}, {"XCHGW", LTYPE3, x86.AXCHGW},
{"XLAT", LTYPE2, i386.AXLAT}, {"XLAT", LTYPE2, x86.AXLAT},
{"XORB", LTYPE3, i386.AXORB}, {"XORB", LTYPE3, x86.AXORB},
{"XORL", LTYPE3, i386.AXORL}, {"XORL", LTYPE3, x86.AXORL},
{"XORW", LTYPE3, i386.AXORW}, {"XORW", LTYPE3, x86.AXORW},
{"CMOVLCC", LTYPE3, i386.ACMOVLCC}, {"CMOVLCC", LTYPE3, x86.ACMOVLCC},
{"CMOVLCS", LTYPE3, i386.ACMOVLCS}, {"CMOVLCS", LTYPE3, x86.ACMOVLCS},
{"CMOVLEQ", LTYPE3, i386.ACMOVLEQ}, {"CMOVLEQ", LTYPE3, x86.ACMOVLEQ},
{"CMOVLGE", LTYPE3, i386.ACMOVLGE}, {"CMOVLGE", LTYPE3, x86.ACMOVLGE},
{"CMOVLGT", LTYPE3, i386.ACMOVLGT}, {"CMOVLGT", LTYPE3, x86.ACMOVLGT},
{"CMOVLHI", LTYPE3, i386.ACMOVLHI}, {"CMOVLHI", LTYPE3, x86.ACMOVLHI},
{"CMOVLLE", LTYPE3, i386.ACMOVLLE}, {"CMOVLLE", LTYPE3, x86.ACMOVLLE},
{"CMOVLLS", LTYPE3, i386.ACMOVLLS}, {"CMOVLLS", LTYPE3, x86.ACMOVLLS},
{"CMOVLLT", LTYPE3, i386.ACMOVLLT}, {"CMOVLLT", LTYPE3, x86.ACMOVLLT},
{"CMOVLMI", LTYPE3, i386.ACMOVLMI}, {"CMOVLMI", LTYPE3, x86.ACMOVLMI},
{"CMOVLNE", LTYPE3, i386.ACMOVLNE}, {"CMOVLNE", LTYPE3, x86.ACMOVLNE},
{"CMOVLOC", LTYPE3, i386.ACMOVLOC}, {"CMOVLOC", LTYPE3, x86.ACMOVLOC},
{"CMOVLOS", LTYPE3, i386.ACMOVLOS}, {"CMOVLOS", LTYPE3, x86.ACMOVLOS},
{"CMOVLPC", LTYPE3, i386.ACMOVLPC}, {"CMOVLPC", LTYPE3, x86.ACMOVLPC},
{"CMOVLPL", LTYPE3, i386.ACMOVLPL}, {"CMOVLPL", LTYPE3, x86.ACMOVLPL},
{"CMOVLPS", LTYPE3, i386.ACMOVLPS}, {"CMOVLPS", LTYPE3, x86.ACMOVLPS},
{"CMOVWCC", LTYPE3, i386.ACMOVWCC}, {"CMOVWCC", LTYPE3, x86.ACMOVWCC},
{"CMOVWCS", LTYPE3, i386.ACMOVWCS}, {"CMOVWCS", LTYPE3, x86.ACMOVWCS},
{"CMOVWEQ", LTYPE3, i386.ACMOVWEQ}, {"CMOVWEQ", LTYPE3, x86.ACMOVWEQ},
{"CMOVWGE", LTYPE3, i386.ACMOVWGE}, {"CMOVWGE", LTYPE3, x86.ACMOVWGE},
{"CMOVWGT", LTYPE3, i386.ACMOVWGT}, {"CMOVWGT", LTYPE3, x86.ACMOVWGT},
{"CMOVWHI", LTYPE3, i386.ACMOVWHI}, {"CMOVWHI", LTYPE3, x86.ACMOVWHI},
{"CMOVWLE", LTYPE3, i386.ACMOVWLE}, {"CMOVWLE", LTYPE3, x86.ACMOVWLE},
{"CMOVWLS", LTYPE3, i386.ACMOVWLS}, {"CMOVWLS", LTYPE3, x86.ACMOVWLS},
{"CMOVWLT", LTYPE3, i386.ACMOVWLT}, {"CMOVWLT", LTYPE3, x86.ACMOVWLT},
{"CMOVWMI", LTYPE3, i386.ACMOVWMI}, {"CMOVWMI", LTYPE3, x86.ACMOVWMI},
{"CMOVWNE", LTYPE3, i386.ACMOVWNE}, {"CMOVWNE", LTYPE3, x86.ACMOVWNE},
{"CMOVWOC", LTYPE3, i386.ACMOVWOC}, {"CMOVWOC", LTYPE3, x86.ACMOVWOC},
{"CMOVWOS", LTYPE3, i386.ACMOVWOS}, {"CMOVWOS", LTYPE3, x86.ACMOVWOS},
{"CMOVWPC", LTYPE3, i386.ACMOVWPC}, {"CMOVWPC", LTYPE3, x86.ACMOVWPC},
{"CMOVWPL", LTYPE3, i386.ACMOVWPL}, {"CMOVWPL", LTYPE3, x86.ACMOVWPL},
{"CMOVWPS", LTYPE3, i386.ACMOVWPS}, {"CMOVWPS", LTYPE3, x86.ACMOVWPS},
{"FMOVB", LTYPE3, i386.AFMOVB}, {"FMOVB", LTYPE3, x86.AFMOVB},
{"FMOVBP", LTYPE3, i386.AFMOVBP}, {"FMOVBP", LTYPE3, x86.AFMOVBP},
{"FMOVD", LTYPE3, i386.AFMOVD}, {"FMOVD", LTYPE3, x86.AFMOVD},
{"FMOVDP", LTYPE3, i386.AFMOVDP}, {"FMOVDP", LTYPE3, x86.AFMOVDP},
{"FMOVF", LTYPE3, i386.AFMOVF}, {"FMOVF", LTYPE3, x86.AFMOVF},
{"FMOVFP", LTYPE3, i386.AFMOVFP}, {"FMOVFP", LTYPE3, x86.AFMOVFP},
{"FMOVL", LTYPE3, i386.AFMOVL}, {"FMOVL", LTYPE3, x86.AFMOVL},
{"FMOVLP", LTYPE3, i386.AFMOVLP}, {"FMOVLP", LTYPE3, x86.AFMOVLP},
{"FMOVV", LTYPE3, i386.AFMOVV}, {"FMOVV", LTYPE3, x86.AFMOVV},
{"FMOVVP", LTYPE3, i386.AFMOVVP}, {"FMOVVP", LTYPE3, x86.AFMOVVP},
{"FMOVW", LTYPE3, i386.AFMOVW}, {"FMOVW", LTYPE3, x86.AFMOVW},
{"FMOVWP", LTYPE3, i386.AFMOVWP}, {"FMOVWP", LTYPE3, x86.AFMOVWP},
{"FMOVX", LTYPE3, i386.AFMOVX}, {"FMOVX", LTYPE3, x86.AFMOVX},
{"FMOVXP", LTYPE3, i386.AFMOVXP}, {"FMOVXP", LTYPE3, x86.AFMOVXP},
{"FCMOVCC", LTYPE3, i386.AFCMOVCC}, {"FCMOVCC", LTYPE3, x86.AFCMOVCC},
{"FCMOVCS", LTYPE3, i386.AFCMOVCS}, {"FCMOVCS", LTYPE3, x86.AFCMOVCS},
{"FCMOVEQ", LTYPE3, i386.AFCMOVEQ}, {"FCMOVEQ", LTYPE3, x86.AFCMOVEQ},
{"FCMOVHI", LTYPE3, i386.AFCMOVHI}, {"FCMOVHI", LTYPE3, x86.AFCMOVHI},
{"FCMOVLS", LTYPE3, i386.AFCMOVLS}, {"FCMOVLS", LTYPE3, x86.AFCMOVLS},
{"FCMOVNE", LTYPE3, i386.AFCMOVNE}, {"FCMOVNE", LTYPE3, x86.AFCMOVNE},
{"FCMOVNU", LTYPE3, i386.AFCMOVNU}, {"FCMOVNU", LTYPE3, x86.AFCMOVNU},
{"FCMOVUN", LTYPE3, i386.AFCMOVUN}, {"FCMOVUN", LTYPE3, x86.AFCMOVUN},
{"FCOMB", LTYPE3, i386.AFCOMB}, {"FCOMB", LTYPE3, x86.AFCOMB},
{"FCOMBP", LTYPE3, i386.AFCOMBP}, {"FCOMBP", LTYPE3, x86.AFCOMBP},
{"FCOMD", LTYPE3, i386.AFCOMD}, {"FCOMD", LTYPE3, x86.AFCOMD},
{"FCOMDP", LTYPE3, i386.AFCOMDP}, {"FCOMDP", LTYPE3, x86.AFCOMDP},
{"FCOMDPP", LTYPE3, i386.AFCOMDPP}, {"FCOMDPP", LTYPE3, x86.AFCOMDPP},
{"FCOMF", LTYPE3, i386.AFCOMF}, {"FCOMF", LTYPE3, x86.AFCOMF},
{"FCOMFP", LTYPE3, i386.AFCOMFP}, {"FCOMFP", LTYPE3, x86.AFCOMFP},
{"FCOMI", LTYPE3, i386.AFCOMI}, {"FCOMI", LTYPE3, x86.AFCOMI},
{"FCOMIP", LTYPE3, i386.AFCOMIP}, {"FCOMIP", LTYPE3, x86.AFCOMIP},
{"FCOML", LTYPE3, i386.AFCOML}, {"FCOML", LTYPE3, x86.AFCOML},
{"FCOMLP", LTYPE3, i386.AFCOMLP}, {"FCOMLP", LTYPE3, x86.AFCOMLP},
{"FCOMW", LTYPE3, i386.AFCOMW}, {"FCOMW", LTYPE3, x86.AFCOMW},
{"FCOMWP", LTYPE3, i386.AFCOMWP}, {"FCOMWP", LTYPE3, x86.AFCOMWP},
{"FUCOM", LTYPE3, i386.AFUCOM}, {"FUCOM", LTYPE3, x86.AFUCOM},
{"FUCOMI", LTYPE3, i386.AFUCOMI}, {"FUCOMI", LTYPE3, x86.AFUCOMI},
{"FUCOMIP", LTYPE3, i386.AFUCOMIP}, {"FUCOMIP", LTYPE3, x86.AFUCOMIP},
{"FUCOMP", LTYPE3, i386.AFUCOMP}, {"FUCOMP", LTYPE3, x86.AFUCOMP},
{"FUCOMPP", LTYPE3, i386.AFUCOMPP}, {"FUCOMPP", LTYPE3, x86.AFUCOMPP},
{"FADDW", LTYPE3, i386.AFADDW}, {"FADDW", LTYPE3, x86.AFADDW},
{"FADDL", LTYPE3, i386.AFADDL}, {"FADDL", LTYPE3, x86.AFADDL},
{"FADDF", LTYPE3, i386.AFADDF}, {"FADDF", LTYPE3, x86.AFADDF},
{"FADDD", LTYPE3, i386.AFADDD}, {"FADDD", LTYPE3, x86.AFADDD},
{"FADDDP", LTYPE3, i386.AFADDDP}, {"FADDDP", LTYPE3, x86.AFADDDP},
{"FSUBDP", LTYPE3, i386.AFSUBDP}, {"FSUBDP", LTYPE3, x86.AFSUBDP},
{"FSUBW", LTYPE3, i386.AFSUBW}, {"FSUBW", LTYPE3, x86.AFSUBW},
{"FSUBL", LTYPE3, i386.AFSUBL}, {"FSUBL", LTYPE3, x86.AFSUBL},
{"FSUBF", LTYPE3, i386.AFSUBF}, {"FSUBF", LTYPE3, x86.AFSUBF},
{"FSUBD", LTYPE3, i386.AFSUBD}, {"FSUBD", LTYPE3, x86.AFSUBD},
{"FSUBRDP", LTYPE3, i386.AFSUBRDP}, {"FSUBRDP", LTYPE3, x86.AFSUBRDP},
{"FSUBRW", LTYPE3, i386.AFSUBRW}, {"FSUBRW", LTYPE3, x86.AFSUBRW},
{"FSUBRL", LTYPE3, i386.AFSUBRL}, {"FSUBRL", LTYPE3, x86.AFSUBRL},
{"FSUBRF", LTYPE3, i386.AFSUBRF}, {"FSUBRF", LTYPE3, x86.AFSUBRF},
{"FSUBRD", LTYPE3, i386.AFSUBRD}, {"FSUBRD", LTYPE3, x86.AFSUBRD},
{"FMULDP", LTYPE3, i386.AFMULDP}, {"FMULDP", LTYPE3, x86.AFMULDP},
{"FMULW", LTYPE3, i386.AFMULW}, {"FMULW", LTYPE3, x86.AFMULW},
{"FMULL", LTYPE3, i386.AFMULL}, {"FMULL", LTYPE3, x86.AFMULL},
{"FMULF", LTYPE3, i386.AFMULF}, {"FMULF", LTYPE3, x86.AFMULF},
{"FMULD", LTYPE3, i386.AFMULD}, {"FMULD", LTYPE3, x86.AFMULD},
{"FDIVDP", LTYPE3, i386.AFDIVDP}, {"FDIVDP", LTYPE3, x86.AFDIVDP},
{"FDIVW", LTYPE3, i386.AFDIVW}, {"FDIVW", LTYPE3, x86.AFDIVW},
{"FDIVL", LTYPE3, i386.AFDIVL}, {"FDIVL", LTYPE3, x86.AFDIVL},
{"FDIVF", LTYPE3, i386.AFDIVF}, {"FDIVF", LTYPE3, x86.AFDIVF},
{"FDIVD", LTYPE3, i386.AFDIVD}, {"FDIVD", LTYPE3, x86.AFDIVD},
{"FDIVRDP", LTYPE3, i386.AFDIVRDP}, {"FDIVRDP", LTYPE3, x86.AFDIVRDP},
{"FDIVRW", LTYPE3, i386.AFDIVRW}, {"FDIVRW", LTYPE3, x86.AFDIVRW},
{"FDIVRL", LTYPE3, i386.AFDIVRL}, {"FDIVRL", LTYPE3, x86.AFDIVRL},
{"FDIVRF", LTYPE3, i386.AFDIVRF}, {"FDIVRF", LTYPE3, x86.AFDIVRF},
{"FDIVRD", LTYPE3, i386.AFDIVRD}, {"FDIVRD", LTYPE3, x86.AFDIVRD},
{"FXCHD", LTYPE3, i386.AFXCHD}, {"FXCHD", LTYPE3, x86.AFXCHD},
{"FFREE", LTYPE1, i386.AFFREE}, {"FFREE", LTYPE1, x86.AFFREE},
{"FLDCW", LTYPE2, i386.AFLDCW}, {"FLDCW", LTYPE2, x86.AFLDCW},
{"FLDENV", LTYPE1, i386.AFLDENV}, {"FLDENV", LTYPE1, x86.AFLDENV},
{"FRSTOR", LTYPE2, i386.AFRSTOR}, {"FRSTOR", LTYPE2, x86.AFRSTOR},
{"FSAVE", LTYPE1, i386.AFSAVE}, {"FSAVE", LTYPE1, x86.AFSAVE},
{"FSTCW", LTYPE1, i386.AFSTCW}, {"FSTCW", LTYPE1, x86.AFSTCW},
{"FSTENV", LTYPE1, i386.AFSTENV}, {"FSTENV", LTYPE1, x86.AFSTENV},
{"FSTSW", LTYPE1, i386.AFSTSW}, {"FSTSW", LTYPE1, x86.AFSTSW},
{"F2XM1", LTYPE0, i386.AF2XM1}, {"F2XM1", LTYPE0, x86.AF2XM1},
{"FABS", LTYPE0, i386.AFABS}, {"FABS", LTYPE0, x86.AFABS},
{"FCHS", LTYPE0, i386.AFCHS}, {"FCHS", LTYPE0, x86.AFCHS},
{"FCLEX", LTYPE0, i386.AFCLEX}, {"FCLEX", LTYPE0, x86.AFCLEX},
{"FCOS", LTYPE0, i386.AFCOS}, {"FCOS", LTYPE0, x86.AFCOS},
{"FDECSTP", LTYPE0, i386.AFDECSTP}, {"FDECSTP", LTYPE0, x86.AFDECSTP},
{"FINCSTP", LTYPE0, i386.AFINCSTP}, {"FINCSTP", LTYPE0, x86.AFINCSTP},
{"FINIT", LTYPE0, i386.AFINIT}, {"FINIT", LTYPE0, x86.AFINIT},
{"FLD1", LTYPE0, i386.AFLD1}, {"FLD1", LTYPE0, x86.AFLD1},
{"FLDL2E", LTYPE0, i386.AFLDL2E}, {"FLDL2E", LTYPE0, x86.AFLDL2E},
{"FLDL2T", LTYPE0, i386.AFLDL2T}, {"FLDL2T", LTYPE0, x86.AFLDL2T},
{"FLDLG2", LTYPE0, i386.AFLDLG2}, {"FLDLG2", LTYPE0, x86.AFLDLG2},
{"FLDLN2", LTYPE0, i386.AFLDLN2}, {"FLDLN2", LTYPE0, x86.AFLDLN2},
{"FLDPI", LTYPE0, i386.AFLDPI}, {"FLDPI", LTYPE0, x86.AFLDPI},
{"FLDZ", LTYPE0, i386.AFLDZ}, {"FLDZ", LTYPE0, x86.AFLDZ},
{"FNOP", LTYPE0, i386.AFNOP}, {"FNOP", LTYPE0, x86.AFNOP},
{"FPATAN", LTYPE0, i386.AFPATAN}, {"FPATAN", LTYPE0, x86.AFPATAN},
{"FPREM", LTYPE0, i386.AFPREM}, {"FPREM", LTYPE0, x86.AFPREM},
{"FPREM1", LTYPE0, i386.AFPREM1}, {"FPREM1", LTYPE0, x86.AFPREM1},
{"FPTAN", LTYPE0, i386.AFPTAN}, {"FPTAN", LTYPE0, x86.AFPTAN},
{"FRNDINT", LTYPE0, i386.AFRNDINT}, {"FRNDINT", LTYPE0, x86.AFRNDINT},
{"FSCALE", LTYPE0, i386.AFSCALE}, {"FSCALE", LTYPE0, x86.AFSCALE},
{"FSIN", LTYPE0, i386.AFSIN}, {"FSIN", LTYPE0, x86.AFSIN},
{"FSINCOS", LTYPE0, i386.AFSINCOS}, {"FSINCOS", LTYPE0, x86.AFSINCOS},
{"FSQRT", LTYPE0, i386.AFSQRT}, {"FSQRT", LTYPE0, x86.AFSQRT},
{"FTST", LTYPE0, i386.AFTST}, {"FTST", LTYPE0, x86.AFTST},
{"FXAM", LTYPE0, i386.AFXAM}, {"FXAM", LTYPE0, x86.AFXAM},
{"FXTRACT", LTYPE0, i386.AFXTRACT}, {"FXTRACT", LTYPE0, x86.AFXTRACT},
{"FYL2X", LTYPE0, i386.AFYL2X}, {"FYL2X", LTYPE0, x86.AFYL2X},
{"FYL2XP1", LTYPE0, i386.AFYL2XP1}, {"FYL2XP1", LTYPE0, x86.AFYL2XP1},
{"LFENCE", LTYPE0, i386.ALFENCE}, {"LFENCE", LTYPE0, x86.ALFENCE},
{"MFENCE", LTYPE0, i386.AMFENCE}, {"MFENCE", LTYPE0, x86.AMFENCE},
{"SFENCE", LTYPE0, i386.ASFENCE}, {"SFENCE", LTYPE0, x86.ASFENCE},
{"EMMS", LTYPE0, i386.AEMMS}, {"EMMS", LTYPE0, x86.AEMMS},
{"PREFETCHT0", LTYPE2, i386.APREFETCHT0}, {"PREFETCHT0", LTYPE2, x86.APREFETCHT0},
{"PREFETCHT1", LTYPE2, i386.APREFETCHT1}, {"PREFETCHT1", LTYPE2, x86.APREFETCHT1},
{"PREFETCHT2", LTYPE2, i386.APREFETCHT2}, {"PREFETCHT2", LTYPE2, x86.APREFETCHT2},
{"PREFETCHNTA", LTYPE2, i386.APREFETCHNTA}, {"PREFETCHNTA", LTYPE2, x86.APREFETCHNTA},
{"UNDEF", LTYPE0, obj.AUNDEF}, {"UNDEF", LTYPE0, obj.AUNDEF},
{"ADDPD", LTYPE3, i386.AADDPD}, {"ADDPD", LTYPE3, x86.AADDPD},
{"ADDPS", LTYPE3, i386.AADDPS}, {"ADDPS", LTYPE3, x86.AADDPS},
{"ADDSD", LTYPE3, i386.AADDSD}, {"ADDSD", LTYPE3, x86.AADDSD},
{"ADDSS", LTYPE3, i386.AADDSS}, {"ADDSS", LTYPE3, x86.AADDSS},
{"AESENC", LTYPE3, i386.AAESENC}, {"AESENC", LTYPE3, x86.AAESENC},
{"ANDNPD", LTYPE3, i386.AANDNPD}, {"ANDNPD", LTYPE3, x86.AANDNPD},
{"ANDNPS", LTYPE3, i386.AANDNPS}, {"ANDNPS", LTYPE3, x86.AANDNPS},
{"ANDPD", LTYPE3, i386.AANDPD}, {"ANDPD", LTYPE3, x86.AANDPD},
{"ANDPS", LTYPE3, i386.AANDPS}, {"ANDPS", LTYPE3, x86.AANDPS},
{"CMPPD", LTYPEXC, i386.ACMPPD}, {"CMPPD", LTYPEXC, x86.ACMPPD},
{"CMPPS", LTYPEXC, i386.ACMPPS}, {"CMPPS", LTYPEXC, x86.ACMPPS},
{"CMPSD", LTYPEXC, i386.ACMPSD}, {"CMPSD", LTYPEXC, x86.ACMPSD},
{"CMPSS", LTYPEXC, i386.ACMPSS}, {"CMPSS", LTYPEXC, x86.ACMPSS},
{"COMISD", LTYPE3, i386.ACOMISD}, {"COMISD", LTYPE3, x86.ACOMISD},
{"COMISS", LTYPE3, i386.ACOMISS}, {"COMISS", LTYPE3, x86.ACOMISS},
{"CVTPL2PD", LTYPE3, i386.ACVTPL2PD}, {"CVTPL2PD", LTYPE3, x86.ACVTPL2PD},
{"CVTPL2PS", LTYPE3, i386.ACVTPL2PS}, {"CVTPL2PS", LTYPE3, x86.ACVTPL2PS},
{"CVTPD2PL", LTYPE3, i386.ACVTPD2PL}, {"CVTPD2PL", LTYPE3, x86.ACVTPD2PL},
{"CVTPD2PS", LTYPE3, i386.ACVTPD2PS}, {"CVTPD2PS", LTYPE3, x86.ACVTPD2PS},
{"CVTPS2PL", LTYPE3, i386.ACVTPS2PL}, {"CVTPS2PL", LTYPE3, x86.ACVTPS2PL},
{"CVTPS2PD", LTYPE3, i386.ACVTPS2PD}, {"CVTPS2PD", LTYPE3, x86.ACVTPS2PD},
{"CVTSD2SL", LTYPE3, i386.ACVTSD2SL}, {"CVTSD2SL", LTYPE3, x86.ACVTSD2SL},
{"CVTSD2SS", LTYPE3, i386.ACVTSD2SS}, {"CVTSD2SS", LTYPE3, x86.ACVTSD2SS},
{"CVTSL2SD", LTYPE3, i386.ACVTSL2SD}, {"CVTSL2SD", LTYPE3, x86.ACVTSL2SD},
{"CVTSL2SS", LTYPE3, i386.ACVTSL2SS}, {"CVTSL2SS", LTYPE3, x86.ACVTSL2SS},
{"CVTSS2SD", LTYPE3, i386.ACVTSS2SD}, {"CVTSS2SD", LTYPE3, x86.ACVTSS2SD},
{"CVTSS2SL", LTYPE3, i386.ACVTSS2SL}, {"CVTSS2SL", LTYPE3, x86.ACVTSS2SL},
{"CVTTPD2PL", LTYPE3, i386.ACVTTPD2PL}, {"CVTTPD2PL", LTYPE3, x86.ACVTTPD2PL},
{"CVTTPS2PL", LTYPE3, i386.ACVTTPS2PL}, {"CVTTPS2PL", LTYPE3, x86.ACVTTPS2PL},
{"CVTTSD2SL", LTYPE3, i386.ACVTTSD2SL}, {"CVTTSD2SL", LTYPE3, x86.ACVTTSD2SL},
{"CVTTSS2SL", LTYPE3, i386.ACVTTSS2SL}, {"CVTTSS2SL", LTYPE3, x86.ACVTTSS2SL},
{"DIVPD", LTYPE3, i386.ADIVPD}, {"DIVPD", LTYPE3, x86.ADIVPD},
{"DIVPS", LTYPE3, i386.ADIVPS}, {"DIVPS", LTYPE3, x86.ADIVPS},
{"DIVSD", LTYPE3, i386.ADIVSD}, {"DIVSD", LTYPE3, x86.ADIVSD},
{"DIVSS", LTYPE3, i386.ADIVSS}, {"DIVSS", LTYPE3, x86.ADIVSS},
{"MASKMOVOU", LTYPE3, i386.AMASKMOVOU}, {"MASKMOVOU", LTYPE3, x86.AMASKMOVOU},
{"MASKMOVDQU", LTYPE3, i386.AMASKMOVOU}, /* syn */ {"MASKMOVDQU", LTYPE3, x86.AMASKMOVOU}, /* syn */
{"MAXPD", LTYPE3, i386.AMAXPD}, {"MAXPD", LTYPE3, x86.AMAXPD},
{"MAXPS", LTYPE3, i386.AMAXPS}, {"MAXPS", LTYPE3, x86.AMAXPS},
{"MAXSD", LTYPE3, i386.AMAXSD}, {"MAXSD", LTYPE3, x86.AMAXSD},
{"MAXSS", LTYPE3, i386.AMAXSS}, {"MAXSS", LTYPE3, x86.AMAXSS},
{"MINPD", LTYPE3, i386.AMINPD}, {"MINPD", LTYPE3, x86.AMINPD},
{"MINPS", LTYPE3, i386.AMINPS}, {"MINPS", LTYPE3, x86.AMINPS},
{"MINSD", LTYPE3, i386.AMINSD}, {"MINSD", LTYPE3, x86.AMINSD},
{"MINSS", LTYPE3, i386.AMINSS}, {"MINSS", LTYPE3, x86.AMINSS},
{"MOVAPD", LTYPE3, i386.AMOVAPD}, {"MOVAPD", LTYPE3, x86.AMOVAPD},
{"MOVAPS", LTYPE3, i386.AMOVAPS}, {"MOVAPS", LTYPE3, x86.AMOVAPS},
{"MOVO", LTYPE3, i386.AMOVO}, {"MOVO", LTYPE3, x86.AMOVO},
{"MOVOA", LTYPE3, i386.AMOVO}, /* syn */ {"MOVOA", LTYPE3, x86.AMOVO}, /* syn */
{"MOVOU", LTYPE3, i386.AMOVOU}, {"MOVOU", LTYPE3, x86.AMOVOU},
{"MOVHLPS", LTYPE3, i386.AMOVHLPS}, {"MOVHLPS", LTYPE3, x86.AMOVHLPS},
{"MOVHPD", LTYPE3, i386.AMOVHPD}, {"MOVHPD", LTYPE3, x86.AMOVHPD},
{"MOVHPS", LTYPE3, i386.AMOVHPS}, {"MOVHPS", LTYPE3, x86.AMOVHPS},
{"MOVLHPS", LTYPE3, i386.AMOVLHPS}, {"MOVLHPS", LTYPE3, x86.AMOVLHPS},
{"MOVLPD", LTYPE3, i386.AMOVLPD}, {"MOVLPD", LTYPE3, x86.AMOVLPD},
{"MOVLPS", LTYPE3, i386.AMOVLPS}, {"MOVLPS", LTYPE3, x86.AMOVLPS},
{"MOVMSKPD", LTYPE3, i386.AMOVMSKPD}, {"MOVMSKPD", LTYPE3, x86.AMOVMSKPD},
{"MOVMSKPS", LTYPE3, i386.AMOVMSKPS}, {"MOVMSKPS", LTYPE3, x86.AMOVMSKPS},
{"MOVNTO", LTYPE3, i386.AMOVNTO}, {"MOVNTO", LTYPE3, x86.AMOVNTO},
{"MOVNTDQ", LTYPE3, i386.AMOVNTO}, /* syn */ {"MOVNTDQ", LTYPE3, x86.AMOVNTO}, /* syn */
{"MOVNTPD", LTYPE3, i386.AMOVNTPD}, {"MOVNTPD", LTYPE3, x86.AMOVNTPD},
{"MOVNTPS", LTYPE3, i386.AMOVNTPS}, {"MOVNTPS", LTYPE3, x86.AMOVNTPS},
{"MOVSD", LTYPE3, i386.AMOVSD}, {"MOVSD", LTYPE3, x86.AMOVSD},
{"MOVSS", LTYPE3, i386.AMOVSS}, {"MOVSS", LTYPE3, x86.AMOVSS},
{"MOVUPD", LTYPE3, i386.AMOVUPD}, {"MOVUPD", LTYPE3, x86.AMOVUPD},
{"MOVUPS", LTYPE3, i386.AMOVUPS}, {"MOVUPS", LTYPE3, x86.AMOVUPS},
{"MULPD", LTYPE3, i386.AMULPD}, {"MULPD", LTYPE3, x86.AMULPD},
{"MULPS", LTYPE3, i386.AMULPS}, {"MULPS", LTYPE3, x86.AMULPS},
{"MULSD", LTYPE3, i386.AMULSD}, {"MULSD", LTYPE3, x86.AMULSD},
{"MULSS", LTYPE3, i386.AMULSS}, {"MULSS", LTYPE3, x86.AMULSS},
{"ORPD", LTYPE3, i386.AORPD}, {"ORPD", LTYPE3, x86.AORPD},
{"ORPS", LTYPE3, i386.AORPS}, {"ORPS", LTYPE3, x86.AORPS},
{"PADDQ", LTYPE3, i386.APADDQ}, {"PADDQ", LTYPE3, x86.APADDQ},
{"PAND", LTYPE3, i386.APAND}, {"PAND", LTYPE3, x86.APAND},
{"PCMPEQB", LTYPE3, i386.APCMPEQB}, {"PCMPEQB", LTYPE3, x86.APCMPEQB},
{"PMAXSW", LTYPE3, i386.APMAXSW}, {"PMAXSW", LTYPE3, x86.APMAXSW},
{"PMAXUB", LTYPE3, i386.APMAXUB}, {"PMAXUB", LTYPE3, x86.APMAXUB},
{"PMINSW", LTYPE3, i386.APMINSW}, {"PMINSW", LTYPE3, x86.APMINSW},
{"PMINUB", LTYPE3, i386.APMINUB}, {"PMINUB", LTYPE3, x86.APMINUB},
{"PMOVMSKB", LTYPE3, i386.APMOVMSKB}, {"PMOVMSKB", LTYPE3, x86.APMOVMSKB},
{"PSADBW", LTYPE3, i386.APSADBW}, {"PSADBW", LTYPE3, x86.APSADBW},
{"PSHUFB", LTYPE3, i386.APSHUFB}, {"PSHUFB", LTYPE3, x86.APSHUFB},
{"PSHUFHW", LTYPEX, i386.APSHUFHW}, {"PSHUFHW", LTYPEX, x86.APSHUFHW},
{"PSHUFL", LTYPEX, i386.APSHUFL}, {"PSHUFL", LTYPEX, x86.APSHUFL},
{"PSHUFLW", LTYPEX, i386.APSHUFLW}, {"PSHUFLW", LTYPEX, x86.APSHUFLW},
{"PSUBB", LTYPE3, i386.APSUBB}, {"PSUBB", LTYPE3, x86.APSUBB},
{"PSUBL", LTYPE3, i386.APSUBL}, {"PSUBL", LTYPE3, x86.APSUBL},
{"PSUBQ", LTYPE3, i386.APSUBQ}, {"PSUBQ", LTYPE3, x86.APSUBQ},
{"PSUBSB", LTYPE3, i386.APSUBSB}, {"PSUBSB", LTYPE3, x86.APSUBSB},
{"PSUBSW", LTYPE3, i386.APSUBSW}, {"PSUBSW", LTYPE3, x86.APSUBSW},
{"PSUBUSB", LTYPE3, i386.APSUBUSB}, {"PSUBUSB", LTYPE3, x86.APSUBUSB},
{"PSUBUSW", LTYPE3, i386.APSUBUSW}, {"PSUBUSW", LTYPE3, x86.APSUBUSW},
{"PSUBW", LTYPE3, i386.APSUBW}, {"PSUBW", LTYPE3, x86.APSUBW},
{"PUNPCKHQDQ", LTYPE3, i386.APUNPCKHQDQ}, {"PUNPCKHQDQ", LTYPE3, x86.APUNPCKHQDQ},
{"PUNPCKLQDQ", LTYPE3, i386.APUNPCKLQDQ}, {"PUNPCKLQDQ", LTYPE3, x86.APUNPCKLQDQ},
{"PXOR", LTYPE3, i386.APXOR}, {"PXOR", LTYPE3, x86.APXOR},
{"RCPPS", LTYPE3, i386.ARCPPS}, {"RCPPS", LTYPE3, x86.ARCPPS},
{"RCPSS", LTYPE3, i386.ARCPSS}, {"RCPSS", LTYPE3, x86.ARCPSS},
{"RSQRTPS", LTYPE3, i386.ARSQRTPS}, {"RSQRTPS", LTYPE3, x86.ARSQRTPS},
{"RSQRTSS", LTYPE3, i386.ARSQRTSS}, {"RSQRTSS", LTYPE3, x86.ARSQRTSS},
{"SQRTPD", LTYPE3, i386.ASQRTPD}, {"SQRTPD", LTYPE3, x86.ASQRTPD},
{"SQRTPS", LTYPE3, i386.ASQRTPS}, {"SQRTPS", LTYPE3, x86.ASQRTPS},
{"SQRTSD", LTYPE3, i386.ASQRTSD}, {"SQRTSD", LTYPE3, x86.ASQRTSD},
{"SQRTSS", LTYPE3, i386.ASQRTSS}, {"SQRTSS", LTYPE3, x86.ASQRTSS},
{"SUBPD", LTYPE3, i386.ASUBPD}, {"SUBPD", LTYPE3, x86.ASUBPD},
{"SUBPS", LTYPE3, i386.ASUBPS}, {"SUBPS", LTYPE3, x86.ASUBPS},
{"SUBSD", LTYPE3, i386.ASUBSD}, {"SUBSD", LTYPE3, x86.ASUBSD},
{"SUBSS", LTYPE3, i386.ASUBSS}, {"SUBSS", LTYPE3, x86.ASUBSS},
{"UCOMISD", LTYPE3, i386.AUCOMISD}, {"UCOMISD", LTYPE3, x86.AUCOMISD},
{"UCOMISS", LTYPE3, i386.AUCOMISS}, {"UCOMISS", LTYPE3, x86.AUCOMISS},
{"UNPCKHPD", LTYPE3, i386.AUNPCKHPD}, {"UNPCKHPD", LTYPE3, x86.AUNPCKHPD},
{"UNPCKHPS", LTYPE3, i386.AUNPCKHPS}, {"UNPCKHPS", LTYPE3, x86.AUNPCKHPS},
{"UNPCKLPD", LTYPE3, i386.AUNPCKLPD}, {"UNPCKLPD", LTYPE3, x86.AUNPCKLPD},
{"UNPCKLPS", LTYPE3, i386.AUNPCKLPS}, {"UNPCKLPS", LTYPE3, x86.AUNPCKLPS},
{"XORPD", LTYPE3, i386.AXORPD}, {"XORPD", LTYPE3, x86.AXORPD},
{"XORPS", LTYPE3, i386.AXORPS}, {"XORPS", LTYPE3, x86.AXORPS},
{"USEFIELD", LTYPEN, obj.AUSEFIELD}, {"USEFIELD", LTYPEN, obj.AUSEFIELD},
{"PCDATA", LTYPEPC, obj.APCDATA}, {"PCDATA", LTYPEPC, obj.APCDATA},
{"FUNCDATA", LTYPEF, obj.AFUNCDATA}, {"FUNCDATA", LTYPEF, obj.AFUNCDATA},
} }
func cinit() { func cinit() {
nullgen.Type = i386.REG_NONE nullgen.Type = x86.REG_NONE
nullgen.Index = i386.REG_NONE nullgen.Index = x86.REG_NONE
} }
func checkscale(scale int16) { func checkscale(scale int16) {
......
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