// Can't use SP as the index register
return Yxxx
}
- if ctxt.Asmode == 64 {
+ if ctxt.Arch.Family == sys.AMD64 {
switch a.Name {
case obj.NAME_EXTERN, obj.NAME_STATIC, obj.NAME_GOTREF:
// Global variables can't use index registers and their
REG_R13B,
REG_R14B,
REG_R15B:
- if ctxt.Asmode != 64 {
+ if ctxt.Arch.Family == sys.I386 {
return Yxxx
}
fallthrough
REG_R13,
REG_R14,
REG_R15:
- if ctxt.Asmode != 64 {
+ if ctxt.Arch.Family == sys.I386 {
return Yxxx
}
fallthrough
REG_R13,
REG_R14,
REG_R15:
- if ctxt.Asmode != 64 {
+ if ctxt.Arch.Family == sys.I386 {
goto bad
}
fallthrough
REG_R13,
REG_R14,
REG_R15:
- if ctxt.Asmode != 64 {
+ if ctxt.Arch.Family == sys.I386 {
goto bad
}
fallthrough
func asmins(ctxt *obj.Link, p *obj.Prog) {
ctxt.AsmBuf.Reset()
- ctxt.Asmode = int(p.Mode)
if ctxt.Headtype == obj.Hnacl && p.Mode == 32 {
switch p.As {
ctxt.Rexflag = 0
ctxt.Vexflag = 0
mark := ctxt.AsmBuf.Len()
- ctxt.Asmode = int(p.Mode)
doasm(ctxt, p)
if ctxt.Rexflag != 0 && ctxt.Vexflag == 0 {
/*