static Registers() { d0 = new DataRegister("d0", 0, PrimitiveType.Word32); d1 = new DataRegister("d1", 1, PrimitiveType.Word32); d2 = new DataRegister("d2", 2, PrimitiveType.Word32); d3 = new DataRegister("d3", 3, PrimitiveType.Word32); d4 = new DataRegister("d4", 4, PrimitiveType.Word32); d5 = new DataRegister("d5", 5, PrimitiveType.Word32); d6 = new DataRegister("d6", 6, PrimitiveType.Word32); d7 = new DataRegister("d7", 7, PrimitiveType.Word32); a0 = new AddressRegister("a0", 8, PrimitiveType.Word32); a1 = new AddressRegister("a1", 9, PrimitiveType.Word32); a2 = new AddressRegister("a2", 10, PrimitiveType.Word32); a3 = new AddressRegister("a3", 11, PrimitiveType.Word32); a4 = new AddressRegister("a4", 12, PrimitiveType.Word32); a5 = new AddressRegister("a5", 13, PrimitiveType.Word32); a6 = new AddressRegister("a6", 14, PrimitiveType.Word32); a7 = new AddressRegister("a7", 15, PrimitiveType.Word32); fp0 = new FpRegister("fp0", 16, PrimitiveType.Real64); fp1 = new FpRegister("fp1", 17, PrimitiveType.Real64); fp2 = new FpRegister("fp2", 18, PrimitiveType.Real64); fp3 = new FpRegister("fp3", 19, PrimitiveType.Real64); fp4 = new FpRegister("fp4", 20, PrimitiveType.Real64); fp5 = new FpRegister("fp5", 21, PrimitiveType.Real64); fp6 = new FpRegister("fp6", 22, PrimitiveType.Real64); fp7 = new FpRegister("fp7", 23, PrimitiveType.Real64); ccr = new RegisterStorage("ccr", 24, PrimitiveType.Byte); sr = new RegisterStorage("sr", 25, PrimitiveType.Word16); usp = new RegisterStorage("usp", 26, PrimitiveType.Word32); pc = new AddressRegister("pc", 27, PrimitiveType.Pointer32); Max = 28; regs = new RegisterStorage[] { d0, d1, d2, d3, d4, d5, d6, d7, a0, a1, a2, a3, a4, a5, a6, a7, fp0, fp1, fp2, fp3, fp4, fp5, fp6, fp7, ccr, sr, usp, pc, }; }
public static MachineOperand PostIncrement(PrimitiveType dataWidth, AddressRegister baseReg) { return(new PostIncrementMemoryOperand(dataWidth, baseReg)); }
public PredecrementMemoryOperand(PrimitiveType dataWidth, AddressRegister areg) : base(dataWidth) { this.Register = areg; }
public static MemoryOperand Indirect(PrimitiveType width, AddressRegister baseReg) { return(new MemoryOperand(width, baseReg)); }
public static MachineOperand Indirect(PrimitiveType width, AddressRegister baseReg, Constant offset) { return(new MemoryOperand(width, baseReg, offset)); }
public MemoryOperand(PrimitiveType width, AddressRegister baseReg, Constant offset) : base(width) { this.Base = baseReg; this.Offset = offset; }
public MemoryOperand(PrimitiveType width, AddressRegister baseReg) : base(width) { this.Base = baseReg; }
static Registers() { d0 = new DataRegister("d0", 0, PrimitiveType.Word32); d1 = new DataRegister("d1", 1, PrimitiveType.Word32); d2 = new DataRegister("d2", 2, PrimitiveType.Word32); d3 = new DataRegister("d3", 3, PrimitiveType.Word32); d4 = new DataRegister("d4", 4, PrimitiveType.Word32); d5 = new DataRegister("d5", 5, PrimitiveType.Word32); d6 = new DataRegister("d6", 6, PrimitiveType.Word32); d7 = new DataRegister("d7", 7, PrimitiveType.Word32); a0 = new AddressRegister("a0", 8, PrimitiveType.Word32); a1 = new AddressRegister("a1", 9, PrimitiveType.Word32); a2 = new AddressRegister("a2", 10, PrimitiveType.Word32); a3 = new AddressRegister("a3", 11, PrimitiveType.Word32); a4 = new AddressRegister("a4", 12, PrimitiveType.Word32); a5 = new AddressRegister("a5", 13, PrimitiveType.Word32); a6 = new AddressRegister("a6", 14, PrimitiveType.Word32); a7 = new AddressRegister("a7", 15, PrimitiveType.Word32); fp0 = new FpRegister("fp0", 16, PrimitiveType.Real64); fp1 = new FpRegister("fp1", 17, PrimitiveType.Real64); fp2 = new FpRegister("fp2", 18, PrimitiveType.Real64); fp3 = new FpRegister("fp3", 19, PrimitiveType.Real64); fp4 = new FpRegister("fp4", 20, PrimitiveType.Real64); fp5 = new FpRegister("fp5", 21, PrimitiveType.Real64); fp6 = new FpRegister("fp6", 22, PrimitiveType.Real64); fp7 = new FpRegister("fp7", 23, PrimitiveType.Real64); ccr = new FlagRegister("ccr", PrimitiveType.Byte); sr = new RegisterStorage("sr", 25, 0, PrimitiveType.Word16); usp = new RegisterStorage("usp", 26, 0, PrimitiveType.Word32); pc = new AddressRegister("pc", 27, PrimitiveType.Pointer32); Max = 28; regs = new RegisterStorage[] { d0, d1, d2, d3, d4, d5, d6, d7, a0, a1, a2, a3, a4, a5, a6, a7, fp0, fp1, fp2, fp3, fp4, fp5, fp6, fp7, ccr, sr, usp, pc, }; }
static Registers() { d0 = new DataRegister("d0", 0, PrimitiveType.Word32); d1 = new DataRegister("d1", 1, PrimitiveType.Word32); d2 = new DataRegister("d2", 2, PrimitiveType.Word32); d3 = new DataRegister("d3", 3, PrimitiveType.Word32); d4 = new DataRegister("d4", 4, PrimitiveType.Word32); d5 = new DataRegister("d5", 5, PrimitiveType.Word32); d6 = new DataRegister("d6", 6, PrimitiveType.Word32); d7 = new DataRegister("d7", 7, PrimitiveType.Word32); a0 = new AddressRegister("a0", 8, PrimitiveType.Word32); a1 = new AddressRegister("a1", 9, PrimitiveType.Word32); a2 = new AddressRegister("a2", 10, PrimitiveType.Word32); a3 = new AddressRegister("a3", 11, PrimitiveType.Word32); a4 = new AddressRegister("a4", 12, PrimitiveType.Word32); a5 = new AddressRegister("a5", 13, PrimitiveType.Word32); a6 = new AddressRegister("a6", 14, PrimitiveType.Word32); a7 = new AddressRegister("a7", 15, PrimitiveType.Word32); fp0 = new FpRegister("fp0", 16, PrimitiveType.Real80); fp1 = new FpRegister("fp1", 17, PrimitiveType.Real80); fp2 = new FpRegister("fp2", 18, PrimitiveType.Real80); fp3 = new FpRegister("fp3", 19, PrimitiveType.Real80); fp4 = new FpRegister("fp4", 20, PrimitiveType.Real80); fp5 = new FpRegister("fp5", 21, PrimitiveType.Real80); fp6 = new FpRegister("fp6", 22, PrimitiveType.Real80); fp7 = new FpRegister("fp7", 23, PrimitiveType.Real80); ccr = new RegisterStorage("ccr", 24, 0, PrimitiveType.Byte); sr = new RegisterStorage("sr", 25, 0, PrimitiveType.Word16); usp = new RegisterStorage("usp", 26, 0, PrimitiveType.Word32); pc = new AddressRegister("pc", 27, PrimitiveType.Ptr32); fpsr = new RegisterStorage("fpsr", 28, 0, PrimitiveType.Word32); Max = 28; regs = new RegisterStorage[] { d0, d1, d2, d3, d4, d5, d6, d7, a0, a1, a2, a3, a4, a5, a6, a7, fp0, fp1, fp2, fp3, fp4, fp5, fp6, fp7, ccr, sr, usp, pc, fpsr, }; regsByName = regs.ToDictionary(r => r.Name, StringComparer.InvariantCultureIgnoreCase); }
static Registers() { d0 = new DataRegister("d0", 0, PrimitiveType.Word32); d1 = new DataRegister("d1", 1, PrimitiveType.Word32); d2 = new DataRegister("d2", 2, PrimitiveType.Word32); d3 = new DataRegister("d3", 3, PrimitiveType.Word32); d4 = new DataRegister("d4", 4, PrimitiveType.Word32); d5 = new DataRegister("d5", 5, PrimitiveType.Word32); d6 = new DataRegister("d6", 6, PrimitiveType.Word32); d7 = new DataRegister("d7", 7, PrimitiveType.Word32); a0 = new AddressRegister("a0", 8, PrimitiveType.Word32); a1 = new AddressRegister("a1", 9, PrimitiveType.Word32); a2 = new AddressRegister("a2", 10, PrimitiveType.Word32); a3 = new AddressRegister("a3", 11, PrimitiveType.Word32); a4 = new AddressRegister("a4", 12, PrimitiveType.Word32); a5 = new AddressRegister("a5", 13, PrimitiveType.Word32); a6 = new AddressRegister("a6", 14, PrimitiveType.Word32); a7 = new AddressRegister("a7", 15, PrimitiveType.Word32); fp0 = new FpRegister("fp0", 16, PrimitiveType.Real96); fp1 = new FpRegister("fp1", 17, PrimitiveType.Real96); fp2 = new FpRegister("fp2", 18, PrimitiveType.Real96); fp3 = new FpRegister("fp3", 19, PrimitiveType.Real96); fp4 = new FpRegister("fp4", 20, PrimitiveType.Real96); fp5 = new FpRegister("fp5", 21, PrimitiveType.Real96); fp6 = new FpRegister("fp6", 22, PrimitiveType.Real96); fp7 = new FpRegister("fp7", 23, PrimitiveType.Real96); ccr = new RegisterStorage("ccr", 24, 0, PrimitiveType.Byte); sr = new RegisterStorage("sr", 25, 0, PrimitiveType.Word16); usp = new RegisterStorage("usp", 26, 0, PrimitiveType.Word32); pc = new AddressRegister("pc", 27, PrimitiveType.Ptr32); fpsr = new RegisterStorage("fpsr", 28, 0, PrimitiveType.Word32); C = new FlagGroupStorage(ccr, (uint)FlagM.CF, "C", PrimitiveType.Bool); V = new FlagGroupStorage(ccr, (uint)FlagM.VF, "V", PrimitiveType.Bool); Z = new FlagGroupStorage(ccr, (uint)FlagM.ZF, "Z", PrimitiveType.Bool); N = new FlagGroupStorage(ccr, (uint)FlagM.NF, "N", PrimitiveType.Bool); X = new FlagGroupStorage(ccr, (uint)FlagM.XF, "X", PrimitiveType.Bool); CVZN = new FlagGroupStorage(ccr, (uint)(FlagM.NF | FlagM.ZF | FlagM.VF | FlagM.CF), "CVZN", PrimitiveType.Byte); CZ = new FlagGroupStorage(ccr, (uint)(FlagM.ZF | FlagM.CF), "CZ", PrimitiveType.Byte); CZN = new FlagGroupStorage(ccr, (uint)(FlagM.NF | FlagM.ZF | FlagM.CF), "CZN", PrimitiveType.Byte); CZNX = new FlagGroupStorage(ccr, (uint)(FlagM.XF | FlagM.NF | FlagM.ZF | FlagM.CF), "CZNX", PrimitiveType.Byte); CVZNX = new FlagGroupStorage(ccr, (uint)(FlagM.XF | FlagM.NF | FlagM.ZF | FlagM.VF | FlagM.CF), "CVZNX", PrimitiveType.Byte); VN = new FlagGroupStorage(ccr, (uint)(FlagM.NF | FlagM.VF), "VN", PrimitiveType.Byte); VZN = new FlagGroupStorage(ccr, (uint)(FlagM.NF | FlagM.ZF | FlagM.VF), "VZN", PrimitiveType.Byte); ZN = new FlagGroupStorage(ccr, (uint)(FlagM.NF | FlagM.ZF), "ZN", PrimitiveType.Byte); Max = 29; regs = new RegisterStorage[] { d0, d1, d2, d3, d4, d5, d6, d7, a0, a1, a2, a3, a4, a5, a6, a7, fp0, fp1, fp2, fp3, fp4, fp5, fp6, fp7, ccr, sr, usp, pc, fpsr, }; regsByName = regs.ToDictionary(r => r.Name, StringComparer.InvariantCultureIgnoreCase); flags = new[] { C, V, Z, N, X }; }