mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +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:
parent
5eb64744d0
commit
e14e338724
@ -452,10 +452,10 @@ void V8ISel::visitCallInst(CallInst &I) {
|
||||
.addReg (ArgReg);
|
||||
}
|
||||
|
||||
unsigned DestReg = getReg (I);
|
||||
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
|
||||
if (I.getType ()->getPrimitiveID () == Type::VoidTyID)
|
||||
if (I.getType () == Type::VoidTy)
|
||||
return;
|
||||
unsigned DestReg = getReg (I);
|
||||
// Deal w/ return value
|
||||
switch (getClass (I.getType ())) {
|
||||
case cByte:
|
||||
|
@ -452,10 +452,10 @@ void V8ISel::visitCallInst(CallInst &I) {
|
||||
.addReg (ArgReg);
|
||||
}
|
||||
|
||||
unsigned DestReg = getReg (I);
|
||||
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
|
||||
if (I.getType ()->getPrimitiveID () == Type::VoidTyID)
|
||||
if (I.getType () == Type::VoidTy)
|
||||
return;
|
||||
unsigned DestReg = getReg (I);
|
||||
// Deal w/ return value
|
||||
switch (getClass (I.getType ())) {
|
||||
case cByte:
|
||||
|
@ -452,10 +452,10 @@ void V8ISel::visitCallInst(CallInst &I) {
|
||||
.addReg (ArgReg);
|
||||
}
|
||||
|
||||
unsigned DestReg = getReg (I);
|
||||
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
|
||||
if (I.getType ()->getPrimitiveID () == Type::VoidTyID)
|
||||
if (I.getType () == Type::VoidTy)
|
||||
return;
|
||||
unsigned DestReg = getReg (I);
|
||||
// Deal w/ return value
|
||||
switch (getClass (I.getType ())) {
|
||||
case cByte:
|
||||
|
@ -452,10 +452,10 @@ void V8ISel::visitCallInst(CallInst &I) {
|
||||
.addReg (ArgReg);
|
||||
}
|
||||
|
||||
unsigned DestReg = getReg (I);
|
||||
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
|
||||
if (I.getType ()->getPrimitiveID () == Type::VoidTyID)
|
||||
if (I.getType () == Type::VoidTy)
|
||||
return;
|
||||
unsigned DestReg = getReg (I);
|
||||
// Deal w/ return value
|
||||
switch (getClass (I.getType ())) {
|
||||
case cByte:
|
||||
|
Loading…
Reference in New Issue
Block a user