mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-29 13:32:33 +00:00
Allow targets which produce setcc results in non-MVT::i1 registers to describe
what the contents of the top bits of these registers are, in the common cases of targets that sign and zero extend the results. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21145 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2467392c59
commit
7b5987d56e
@ -59,6 +59,12 @@ public:
|
|||||||
Extend, // Oversized shift pulls in zeros or sign bits.
|
Extend, // Oversized shift pulls in zeros or sign bits.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum SetCCResultValue {
|
||||||
|
UndefinedSetCCResult, // SetCC returns a garbage/unknown extend.
|
||||||
|
ZeroOrOneSetCCResult, // SetCC returns a zero extended result.
|
||||||
|
ZeroOrNegativeOneSetCCResult, // SetCC returns a sign extended result.
|
||||||
|
};
|
||||||
|
|
||||||
TargetLowering(TargetMachine &TM);
|
TargetLowering(TargetMachine &TM);
|
||||||
virtual ~TargetLowering();
|
virtual ~TargetLowering();
|
||||||
|
|
||||||
@ -68,9 +74,17 @@ public:
|
|||||||
bool isLittleEndian() const { return IsLittleEndian; }
|
bool isLittleEndian() const { return IsLittleEndian; }
|
||||||
MVT::ValueType getPointerTy() const { return PointerTy; }
|
MVT::ValueType getPointerTy() const { return PointerTy; }
|
||||||
MVT::ValueType getShiftAmountTy() const { return ShiftAmountTy; }
|
MVT::ValueType getShiftAmountTy() const { return ShiftAmountTy; }
|
||||||
MVT::ValueType getSetCCResultTy() const { return SetCCResultTy; }
|
|
||||||
OutOfRangeShiftAmount getShiftAmountFlavor() const {return ShiftAmtHandling; }
|
OutOfRangeShiftAmount getShiftAmountFlavor() const {return ShiftAmtHandling; }
|
||||||
|
|
||||||
|
/// getSetCCResultTy - Return the ValueType of the result of setcc operations.
|
||||||
|
///
|
||||||
|
MVT::ValueType getSetCCResultTy() const { return SetCCResultTy; }
|
||||||
|
|
||||||
|
/// getSetCCResultContents - For targets without boolean registers, this flag
|
||||||
|
/// returns information about the contents of the high-bits in the setcc
|
||||||
|
/// result register.
|
||||||
|
SetCCResultValue getSetCCResultContents() const { return SetCCResultContents;}
|
||||||
|
|
||||||
/// getRegClassFor - Return the register class that should be used for the
|
/// getRegClassFor - Return the register class that should be used for the
|
||||||
/// specified value type. This may only be called on legal types.
|
/// specified value type. This may only be called on legal types.
|
||||||
TargetRegisterClass *getRegClassFor(MVT::ValueType VT) const {
|
TargetRegisterClass *getRegClassFor(MVT::ValueType VT) const {
|
||||||
@ -183,6 +197,10 @@ protected:
|
|||||||
/// of a setcc operation. This defaults to the pointer type.
|
/// of a setcc operation. This defaults to the pointer type.
|
||||||
void setSetCCResultType(MVT::ValueType VT) { SetCCResultTy = VT; }
|
void setSetCCResultType(MVT::ValueType VT) { SetCCResultTy = VT; }
|
||||||
|
|
||||||
|
/// setSetCCResultContents - Specify how the target extends the result of a
|
||||||
|
/// setcc operation in a register.
|
||||||
|
void setSetCCResultContents(SetCCResultValue Ty) { SetCCResultContents = Ty; }
|
||||||
|
|
||||||
/// setShiftAmountFlavor - Describe how the target handles out of range shift
|
/// setShiftAmountFlavor - Describe how the target handles out of range shift
|
||||||
/// amounts.
|
/// amounts.
|
||||||
void setShiftAmountFlavor(OutOfRangeShiftAmount OORSA) {
|
void setShiftAmountFlavor(OutOfRangeShiftAmount OORSA) {
|
||||||
@ -296,6 +314,10 @@ private:
|
|||||||
/// PointerTy.
|
/// PointerTy.
|
||||||
MVT::ValueType SetCCResultTy;
|
MVT::ValueType SetCCResultTy;
|
||||||
|
|
||||||
|
/// SetCCResultContents - Information about the contents of the high-bits in
|
||||||
|
/// the result of a setcc comparison operation.
|
||||||
|
SetCCResultValue SetCCResultContents;
|
||||||
|
|
||||||
/// RegClassForVT - This indicates the default register class to use for
|
/// RegClassForVT - This indicates the default register class to use for
|
||||||
/// each ValueType the target supports natively.
|
/// each ValueType the target supports natively.
|
||||||
TargetRegisterClass *RegClassForVT[MVT::LAST_VALUETYPE];
|
TargetRegisterClass *RegClassForVT[MVT::LAST_VALUETYPE];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user