mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
* Switch to new TmpInstruction model
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1654 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cf4525bd20
commit
cb0a1202af
@ -16,10 +16,10 @@
|
|||||||
#include "llvm/CodeGen/InstrSelection.h"
|
#include "llvm/CodeGen/InstrSelection.h"
|
||||||
#include "llvm/CodeGen/InstrSelectionSupport.h"
|
#include "llvm/CodeGen/InstrSelectionSupport.h"
|
||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
|
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
||||||
#include "llvm/Method.h"
|
#include "llvm/Method.h"
|
||||||
#include "llvm/ConstantVals.h"
|
#include "llvm/ConstantVals.h"
|
||||||
#include "llvm/DerivedTypes.h"
|
#include "llvm/DerivedTypes.h"
|
||||||
#include "llvm/Type.h"
|
|
||||||
|
|
||||||
|
|
||||||
//************************ Internal Functions ******************************/
|
//************************ Internal Functions ******************************/
|
||||||
@ -33,8 +33,7 @@ CreateIntSetInstruction(int64_t C, Value* dest,
|
|||||||
uint64_t absC = (C >= 0)? C : -C;
|
uint64_t absC = (C >= 0)? C : -C;
|
||||||
if (absC > (unsigned int) ~0)
|
if (absC > (unsigned int) ~0)
|
||||||
{ // C does not fit in 32 bits
|
{ // C does not fit in 32 bits
|
||||||
TmpInstruction* tmpReg =
|
TmpInstruction* tmpReg = new TmpInstruction(Type::IntTy);
|
||||||
new TmpInstruction(Instruction::UserOp1, Type::IntTy, NULL, NULL);
|
|
||||||
tempVec.push_back(tmpReg);
|
tempVec.push_back(tmpReg);
|
||||||
|
|
||||||
minstr = new MachineInstr(SETX);
|
minstr = new MachineInstr(SETX);
|
||||||
@ -60,8 +59,7 @@ CreateUIntSetInstruction(uint64_t C, Value* dest,
|
|||||||
MachineInstr* minstr;
|
MachineInstr* minstr;
|
||||||
if (C > (unsigned int) ~0)
|
if (C > (unsigned int) ~0)
|
||||||
{ // C does not fit in 32 bits
|
{ // C does not fit in 32 bits
|
||||||
TmpInstruction* tmpReg =
|
TmpInstruction *tmpReg = new TmpInstruction(Type::IntTy);
|
||||||
new TmpInstruction(Instruction::UserOp1, Type::IntTy, NULL, NULL);
|
|
||||||
tempVec.push_back(tmpReg);
|
tempVec.push_back(tmpReg);
|
||||||
|
|
||||||
minstr = new MachineInstr(SETX);
|
minstr = new MachineInstr(SETX);
|
||||||
@ -152,16 +150,14 @@ UltraSparcInstrInfo::CreateCodeToLoadConst(Value* val,
|
|||||||
int64_t zeroOffset = 0; // to avoid ambiguity with (Value*) 0
|
int64_t zeroOffset = 0; // to avoid ambiguity with (Value*) 0
|
||||||
|
|
||||||
TmpInstruction* tmpReg =
|
TmpInstruction* tmpReg =
|
||||||
new TmpInstruction(Instruction::UserOp1,
|
new TmpInstruction(PointerType::get(val->getType()), val);
|
||||||
PointerType::get(val->getType()), val, NULL);
|
|
||||||
tempVec.push_back(tmpReg);
|
tempVec.push_back(tmpReg);
|
||||||
|
|
||||||
if (isa<Constant>(val))
|
if (isa<Constant>(val))
|
||||||
{
|
{
|
||||||
// Create another TmpInstruction for the hidden integer register
|
// Create another TmpInstruction for the hidden integer register
|
||||||
TmpInstruction* addrReg =
|
TmpInstruction* addrReg =
|
||||||
new TmpInstruction(Instruction::UserOp1,
|
new TmpInstruction(PointerType::get(val->getType()), val);
|
||||||
PointerType::get(val->getType()), val, NULL);
|
|
||||||
tempVec.push_back(addrReg);
|
tempVec.push_back(addrReg);
|
||||||
addrVal = addrReg;
|
addrVal = addrReg;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user