- //-------------------------------------------------------------------------
- // Code generation support for creating individual machine instructions
- //
- // WARNING: These methods are Sparc specific
- //
- // DO NOT USE ANY OF THESE METHODS THEY ARE DEPRECATED!
- //
- //-------------------------------------------------------------------------
-
- unsigned getNumDelaySlots(MachineOpCode Opcode) const {
- return get(Opcode).numDelaySlots;
- }
- bool isCCInstr(MachineOpCode Opcode) const {
- return get(Opcode).Flags & M_CC_FLAG;
- }
- bool isNop(MachineOpCode Opcode) const {
- return get(Opcode).Flags & M_NOP_FLAG;
- }
-
- /// hasDelaySlot - Returns true if the specified instruction has a delay slot
- /// which must be filled by the code generator.
- bool hasDelaySlot(unsigned Opcode) const {
- return get(Opcode).Flags & M_DELAY_SLOT_FLAG;
- }
-
- virtual bool hasResultInterlock(MachineOpCode Opcode) const {
- return true;
- }
-
- //
- // Latencies for individual instructions and instruction pairs
- //
- virtual int minLatency(MachineOpCode Opcode) const {
- return get(Opcode).latency;
- }
-
- virtual int maxLatency(MachineOpCode Opcode) const {
- return get(Opcode).latency;
- }
-
- //
- // Which operand holds an immediate constant? Returns -1 if none
- //
- virtual int getImmedConstantPos(MachineOpCode Opcode) const {
- return -1; // immediate position is machine specific, so say -1 == "none"
- }
-
- // Check if the specified constant fits in the immediate field
- // of this machine instruction
- //
- virtual bool constantFitsInImmedField(MachineOpCode Opcode,
- int64_t intValue) const;
-
- // Return the largest positive constant that can be held in the IMMED field
- // of this machine instruction.
- // isSignExtended is set to true if the value is sign-extended before use
- // (this is true for all immediate fields in SPARC instructions).
- // Return 0 if the instruction has no IMMED field.
- //
- virtual uint64_t maxImmedConstant(MachineOpCode Opcode,
- bool &isSignExtended) const {
- isSignExtended = get(Opcode).immedIsSignExtended;
- return get(Opcode).maxImmedConst;