mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-16 11:24:39 +00:00
Fix bug generating code for void call instructions: don't call
getReg() on void value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14178 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -452,10 +452,10 @@ void V8ISel::visitCallInst(CallInst &I) {
|
|||||||
.addReg (ArgReg);
|
.addReg (ArgReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned DestReg = getReg (I);
|
|
||||||
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
|
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
|
||||||
if (I.getType ()->getPrimitiveID () == Type::VoidTyID)
|
if (I.getType () == Type::VoidTy)
|
||||||
return;
|
return;
|
||||||
|
unsigned DestReg = getReg (I);
|
||||||
// Deal w/ return value
|
// Deal w/ return value
|
||||||
switch (getClass (I.getType ())) {
|
switch (getClass (I.getType ())) {
|
||||||
case cByte:
|
case cByte:
|
||||||
|
@@ -452,10 +452,10 @@ void V8ISel::visitCallInst(CallInst &I) {
|
|||||||
.addReg (ArgReg);
|
.addReg (ArgReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned DestReg = getReg (I);
|
|
||||||
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
|
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
|
||||||
if (I.getType ()->getPrimitiveID () == Type::VoidTyID)
|
if (I.getType () == Type::VoidTy)
|
||||||
return;
|
return;
|
||||||
|
unsigned DestReg = getReg (I);
|
||||||
// Deal w/ return value
|
// Deal w/ return value
|
||||||
switch (getClass (I.getType ())) {
|
switch (getClass (I.getType ())) {
|
||||||
case cByte:
|
case cByte:
|
||||||
|
@@ -452,10 +452,10 @@ void V8ISel::visitCallInst(CallInst &I) {
|
|||||||
.addReg (ArgReg);
|
.addReg (ArgReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned DestReg = getReg (I);
|
|
||||||
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
|
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
|
||||||
if (I.getType ()->getPrimitiveID () == Type::VoidTyID)
|
if (I.getType () == Type::VoidTy)
|
||||||
return;
|
return;
|
||||||
|
unsigned DestReg = getReg (I);
|
||||||
// Deal w/ return value
|
// Deal w/ return value
|
||||||
switch (getClass (I.getType ())) {
|
switch (getClass (I.getType ())) {
|
||||||
case cByte:
|
case cByte:
|
||||||
|
@@ -452,10 +452,10 @@ void V8ISel::visitCallInst(CallInst &I) {
|
|||||||
.addReg (ArgReg);
|
.addReg (ArgReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned DestReg = getReg (I);
|
|
||||||
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
|
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
|
||||||
if (I.getType ()->getPrimitiveID () == Type::VoidTyID)
|
if (I.getType () == Type::VoidTy)
|
||||||
return;
|
return;
|
||||||
|
unsigned DestReg = getReg (I);
|
||||||
// Deal w/ return value
|
// Deal w/ return value
|
||||||
switch (getClass (I.getType ())) {
|
switch (getClass (I.getType ())) {
|
||||||
case cByte:
|
case cByte:
|
||||||
|
Reference in New Issue
Block a user