mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
I started working on casts, but I don't have anything compilable yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12903 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
07b2c46ae3
commit
3d11e8a6d3
@ -62,6 +62,7 @@ namespace {
|
|||||||
void visitSetCondInst(Instruction &I);
|
void visitSetCondInst(Instruction &I);
|
||||||
void visitCallInst(CallInst &I);
|
void visitCallInst(CallInst &I);
|
||||||
void visitReturnInst(ReturnInst &I);
|
void visitReturnInst(ReturnInst &I);
|
||||||
|
void visitCastInst(CastInst &I);
|
||||||
void visitLoadInst(LoadInst &I);
|
void visitLoadInst(LoadInst &I);
|
||||||
void visitStoreInst(StoreInst &I);
|
void visitStoreInst(StoreInst &I);
|
||||||
|
|
||||||
@ -282,6 +283,16 @@ bool V8ISel::runOnFunction(Function &Fn) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void V8ISel::visitCastInst(CastInst &I) {
|
||||||
|
unsigned SrcReg = getReg (I.getOperand (0));
|
||||||
|
unsigned DestReg = getReg (I.getOperand (0));
|
||||||
|
const Type *oldTy = I.getOperand (0)->getType ();
|
||||||
|
const Type *newTy = I.getType ();
|
||||||
|
|
||||||
|
std::cerr << "Cast instruction not supported: " << I;
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
|
||||||
void V8ISel::visitLoadInst(LoadInst &I) {
|
void V8ISel::visitLoadInst(LoadInst &I) {
|
||||||
unsigned DestReg = getReg (I);
|
unsigned DestReg = getReg (I);
|
||||||
unsigned PtrReg = getReg (I.getOperand (0));
|
unsigned PtrReg = getReg (I.getOperand (0));
|
||||||
|
@ -62,6 +62,7 @@ namespace {
|
|||||||
void visitSetCondInst(Instruction &I);
|
void visitSetCondInst(Instruction &I);
|
||||||
void visitCallInst(CallInst &I);
|
void visitCallInst(CallInst &I);
|
||||||
void visitReturnInst(ReturnInst &I);
|
void visitReturnInst(ReturnInst &I);
|
||||||
|
void visitCastInst(CastInst &I);
|
||||||
void visitLoadInst(LoadInst &I);
|
void visitLoadInst(LoadInst &I);
|
||||||
void visitStoreInst(StoreInst &I);
|
void visitStoreInst(StoreInst &I);
|
||||||
|
|
||||||
@ -282,6 +283,16 @@ bool V8ISel::runOnFunction(Function &Fn) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void V8ISel::visitCastInst(CastInst &I) {
|
||||||
|
unsigned SrcReg = getReg (I.getOperand (0));
|
||||||
|
unsigned DestReg = getReg (I.getOperand (0));
|
||||||
|
const Type *oldTy = I.getOperand (0)->getType ();
|
||||||
|
const Type *newTy = I.getType ();
|
||||||
|
|
||||||
|
std::cerr << "Cast instruction not supported: " << I;
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
|
||||||
void V8ISel::visitLoadInst(LoadInst &I) {
|
void V8ISel::visitLoadInst(LoadInst &I) {
|
||||||
unsigned DestReg = getReg (I);
|
unsigned DestReg = getReg (I);
|
||||||
unsigned PtrReg = getReg (I.getOperand (0));
|
unsigned PtrReg = getReg (I.getOperand (0));
|
||||||
|
@ -62,6 +62,7 @@ namespace {
|
|||||||
void visitSetCondInst(Instruction &I);
|
void visitSetCondInst(Instruction &I);
|
||||||
void visitCallInst(CallInst &I);
|
void visitCallInst(CallInst &I);
|
||||||
void visitReturnInst(ReturnInst &I);
|
void visitReturnInst(ReturnInst &I);
|
||||||
|
void visitCastInst(CastInst &I);
|
||||||
void visitLoadInst(LoadInst &I);
|
void visitLoadInst(LoadInst &I);
|
||||||
void visitStoreInst(StoreInst &I);
|
void visitStoreInst(StoreInst &I);
|
||||||
|
|
||||||
@ -282,6 +283,16 @@ bool V8ISel::runOnFunction(Function &Fn) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void V8ISel::visitCastInst(CastInst &I) {
|
||||||
|
unsigned SrcReg = getReg (I.getOperand (0));
|
||||||
|
unsigned DestReg = getReg (I.getOperand (0));
|
||||||
|
const Type *oldTy = I.getOperand (0)->getType ();
|
||||||
|
const Type *newTy = I.getType ();
|
||||||
|
|
||||||
|
std::cerr << "Cast instruction not supported: " << I;
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
|
||||||
void V8ISel::visitLoadInst(LoadInst &I) {
|
void V8ISel::visitLoadInst(LoadInst &I) {
|
||||||
unsigned DestReg = getReg (I);
|
unsigned DestReg = getReg (I);
|
||||||
unsigned PtrReg = getReg (I.getOperand (0));
|
unsigned PtrReg = getReg (I.getOperand (0));
|
||||||
|
@ -62,6 +62,7 @@ namespace {
|
|||||||
void visitSetCondInst(Instruction &I);
|
void visitSetCondInst(Instruction &I);
|
||||||
void visitCallInst(CallInst &I);
|
void visitCallInst(CallInst &I);
|
||||||
void visitReturnInst(ReturnInst &I);
|
void visitReturnInst(ReturnInst &I);
|
||||||
|
void visitCastInst(CastInst &I);
|
||||||
void visitLoadInst(LoadInst &I);
|
void visitLoadInst(LoadInst &I);
|
||||||
void visitStoreInst(StoreInst &I);
|
void visitStoreInst(StoreInst &I);
|
||||||
|
|
||||||
@ -282,6 +283,16 @@ bool V8ISel::runOnFunction(Function &Fn) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void V8ISel::visitCastInst(CastInst &I) {
|
||||||
|
unsigned SrcReg = getReg (I.getOperand (0));
|
||||||
|
unsigned DestReg = getReg (I.getOperand (0));
|
||||||
|
const Type *oldTy = I.getOperand (0)->getType ();
|
||||||
|
const Type *newTy = I.getType ();
|
||||||
|
|
||||||
|
std::cerr << "Cast instruction not supported: " << I;
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
|
||||||
void V8ISel::visitLoadInst(LoadInst &I) {
|
void V8ISel::visitLoadInst(LoadInst &I) {
|
||||||
unsigned DestReg = getReg (I);
|
unsigned DestReg = getReg (I);
|
||||||
unsigned PtrReg = getReg (I.getOperand (0));
|
unsigned PtrReg = getReg (I.getOperand (0));
|
||||||
|
Loading…
Reference in New Issue
Block a user