Exemple #1
0
 // IsS390xCMP reports whether the op (as defined by an s390x.A* constant) is
 // one of the CMP instructions that require special handling.
 public static bool IsS390xCMP(obj.As op)
 {
     if (op == s390x.ACMP || op == s390x.ACMPU || op == s390x.ACMPW || op == s390x.ACMPWU)
     {
         return(true);
     }
     return(false);
 }
Exemple #2
0
 // IsPPC64NEG reports whether the op (as defined by an ppc64.A* constant) is
 // one of the NEG-like instructions that require special handling.
 public static bool IsPPC64NEG(obj.As op)
 {
     if (op == ppc64.AADDMECC || op == ppc64.AADDMEVCC || op == ppc64.AADDMEV || op == ppc64.AADDME || op == ppc64.AADDZECC || op == ppc64.AADDZEVCC || op == ppc64.AADDZEV || op == ppc64.AADDZE || op == ppc64.ACNTLZDCC || op == ppc64.ACNTLZD || op == ppc64.ACNTLZWCC || op == ppc64.ACNTLZW || op == ppc64.AEXTSBCC || op == ppc64.AEXTSB || op == ppc64.AEXTSHCC || op == ppc64.AEXTSH || op == ppc64.AEXTSWCC || op == ppc64.AEXTSW || op == ppc64.ANEGCC || op == ppc64.ANEGVCC || op == ppc64.ANEGV || op == ppc64.ANEG || op == ppc64.ASLBMFEE || op == ppc64.ASLBMFEV || op == ppc64.ASLBMTE || op == ppc64.ASUBMECC || op == ppc64.ASUBMEVCC || op == ppc64.ASUBMEV || op == ppc64.ASUBME || op == ppc64.ASUBZECC || op == ppc64.ASUBZEVCC || op == ppc64.ASUBZEV || op == ppc64.ASUBZE)
     {
         return(true);
     }
     return(false);
 }
Exemple #3
0
 // IsS390xNEG reports whether the op (as defined by an s390x.A* constant) is
 // one of the NEG-like instructions that require special handling.
 public static bool IsS390xNEG(obj.As op)
 {
     if (op == s390x.ANEG || op == s390x.ANEGW)
     {
         return(true);
     }
     return(false);
 }
Exemple #4
0
 // IsRISCV64AMO reports whether the op (as defined by a riscv.A*
 // constant) is one of the AMO instructions that requires special
 // handling.
 public static bool IsRISCV64AMO(obj.As op)
 {
     if (op == riscv.ASCW || op == riscv.ASCD || op == riscv.AAMOSWAPW || op == riscv.AAMOSWAPD || op == riscv.AAMOADDW || op == riscv.AAMOADDD || op == riscv.AAMOANDW || op == riscv.AAMOANDD || op == riscv.AAMOORW || op == riscv.AAMOORD || op == riscv.AAMOXORW || op == riscv.AAMOXORD || op == riscv.AAMOMINW || op == riscv.AAMOMIND || op == riscv.AAMOMINUW || op == riscv.AAMOMINUD || op == riscv.AAMOMAXW || op == riscv.AAMOMAXD || op == riscv.AAMOMAXUW || op == riscv.AAMOMAXUD)
     {
         return(true);
     }
     return(false);
 }
Exemple #5
0
 // IsPPC64CMP reports whether the op (as defined by an ppc64.A* constant) is
 // one of the CMP instructions that require special handling.
 public static bool IsPPC64CMP(obj.As op)
 {
     if (op == ppc64.ACMP || op == ppc64.ACMPU || op == ppc64.ACMPW || op == ppc64.ACMPWU || op == ppc64.AFCMPU)
     {
         return(true);
     }
     return(false);
 }
Exemple #6
0
 // IsMIPSMUL reports whether the op (as defined by an mips.A* constant) is
 // one of the MUL/DIV/REM instructions that require special handling.
 public static bool IsMIPSMUL(obj.As op)
 {
     if (op == mips.AMUL || op == mips.AMULU || op == mips.AMULV || op == mips.AMULVU || op == mips.ADIV || op == mips.ADIVU || op == mips.ADIVV || op == mips.ADIVVU || op == mips.AREM || op == mips.AREMU || op == mips.AREMV || op == mips.AREMVU)
     {
         return(true);
     }
     return(false);
 }
Exemple #7
0
 // IsMIPSCMP reports whether the op (as defined by an mips.A* constant) is
 // one of the CMP instructions that require special handling.
 public static bool IsMIPSCMP(obj.As op)
 {
     if (op == mips.ACMPEQF || op == mips.ACMPEQD || op == mips.ACMPGEF || op == mips.ACMPGED || op == mips.ACMPGTF || op == mips.ACMPGTD)
     {
         return(true);
     }
     return(false);
 }
Exemple #8
0
 // IsPPC64RLD reports whether the op (as defined by an ppc64.A* constant) is
 // one of the RLD-like instructions that require special handling.
 // The FMADD-like instructions behave similarly.
 public static bool IsPPC64RLD(obj.As op)
 {
     if (op == ppc64.ARLDC || op == ppc64.ARLDCCC || op == ppc64.ARLDCL || op == ppc64.ARLDCLCC || op == ppc64.ARLDCR || op == ppc64.ARLDCRCC || op == ppc64.ARLDMI || op == ppc64.ARLDMICC || op == ppc64.ARLWMI || op == ppc64.ARLWMICC || op == ppc64.ARLWNM || op == ppc64.ARLWNMCC)
     {
         return(true);
     }
     else if (op == ppc64.AFMADD || op == ppc64.AFMADDCC || op == ppc64.AFMADDS || op == ppc64.AFMADDSCC || op == ppc64.AFMSUB || op == ppc64.AFMSUBCC || op == ppc64.AFMSUBS || op == ppc64.AFMSUBSCC || op == ppc64.AFNMADD || op == ppc64.AFNMADDCC || op == ppc64.AFNMADDS || op == ppc64.AFNMADDSCC || op == ppc64.AFNMSUB || op == ppc64.AFNMSUBCC || op == ppc64.AFNMSUBS || op == ppc64.AFNMSUBSCC)
     {
         return(true);
     }
     return(false);
 }
Exemple #9
0
 // genshift generates a Prog for r = r0 op (r1 shifted by n)
 private static ref obj.Prog genshift(ref gc.SSAGenState s, obj.As @as, short r0, short r1, short r, long typ, long n)
 {
     var p = s.Prog(as);
     p.From.Type = obj.TYPE_SHIFT;
     p.From.Offset = makeshift(r1, typ, n);
     p.Reg = r0;
     if (r != 0L)
     {
         p.To.Type = obj.TYPE_REG;
         p.To.Reg = r;
     }
     return p;
 }
Exemple #10
0
 // LosesStmtMark reports whether a prog with op as loses its statement mark on the way to DWARF.
 // The attributes from some opcodes are lost in translation.
 // TODO: this is an artifact of how funcpctab combines information for instructions at a single PC.
 // Should try to fix it there.
 public static bool LosesStmtMark(obj.As @as)
 {
     // is_stmt does not work for these; it DOES for ANOP even though that generates no code.
     return(as == obj.APCDATA || as == obj.AFUNCDATA);
 }
Exemple #11
0
 public static bool IsPPC64ISEL(obj.As op)
 {
     return(op == ppc64.AISEL);
 }
Exemple #12
0
 public FloatingEQNEJump(obj.As Jump = default, long Index = default)
 {
     this.Jump  = Jump;
     this.Index = Index;
 }
Exemple #13
0
 public opInfo(@string name = default, regInfo reg = default, auxType auxType = default, int argLen = default, obj.As asm = default, bool generic = default, bool rematerializeable = default, bool commutative = default, bool resultInArg0 = default, bool resultNotInArgs = default, bool clobberFlags = default, bool call = default, bool nilCheck = default, bool faultOnNilArg0 = default, bool faultOnNilArg1 = default, bool usesScratch = default, bool hasSideEffects = default, bool zeroWidth = default, bool unsafePoint = default, SymEffect symEffect = default, byte scale = default)
 {
     this.name              = name;
     this.reg               = reg;
     this.auxType           = auxType;
     this.argLen            = argLen;
     this.asm               = asm;
     this.generic           = generic;
     this.rematerializeable = rematerializeable;
     this.commutative       = commutative;
     this.resultInArg0      = resultInArg0;
     this.resultNotInArgs   = resultNotInArgs;
     this.clobberFlags      = clobberFlags;
     this.call              = call;
     this.nilCheck          = nilCheck;
     this.faultOnNilArg0    = faultOnNilArg0;
     this.faultOnNilArg1    = faultOnNilArg1;
     this.usesScratch       = usesScratch;
     this.hasSideEffects    = hasSideEffects;
     this.zeroWidth         = zeroWidth;
     this.unsafePoint       = unsafePoint;
     this.symEffect         = symEffect;
     this.scale             = scale;
 }
Exemple #14
0
 public IndexJump(obj.As Jump = default, long Index = default)
 {
     this.Jump  = Jump;
     this.Index = Index;
 }