mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 00:20:25 +00:00
Added getTargetLowering() to TargetMachine. Refactored targets to support this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26742 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "PPCISelLowering.h"
|
||||
#include "PPCTargetMachine.h"
|
||||
#include "llvm/ADT/VectorExtras.h"
|
||||
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
|
||||
#include "llvm/CodeGen/MachineFrameInfo.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
@@ -1174,3 +1175,10 @@ isOperandValidForConstraint(SDOperand Op, char Letter) {
|
||||
// Handle standard constraint letters.
|
||||
return TargetLowering::isOperandValidForConstraint(Op, Letter);
|
||||
}
|
||||
|
||||
/// isLegalAddressImmediate - Return true if the integer value can be used
|
||||
/// as the offset of the target addressing mode.
|
||||
bool PPCTargetLowering::isLegalAddressImmediate(int64_t V) const {
|
||||
// PPC allows a sign-extended 16-bit immediate field.
|
||||
return (V > -(1 << 16) && V < (1 << 16)-1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user