mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
Do not move any values into registers for a void return (there isn't anything).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14413 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1062,6 +1062,8 @@ void ISel::promote32(unsigned targetReg, const ValueRecord &VR) {
|
||||
/// visitReturnInst - implemented with BLR
|
||||
///
|
||||
void ISel::visitReturnInst(ReturnInst &I) {
|
||||
// Only do the processing if this is a non-void return
|
||||
if (I.getNumOperands() > 0) {
|
||||
Value *RetVal = I.getOperand(0);
|
||||
switch (getClassB(RetVal->getType())) {
|
||||
case cByte: // integral return values: extend or move into r3 and return
|
||||
@@ -1083,6 +1085,7 @@ void ISel::visitReturnInst(ReturnInst &I) {
|
||||
default:
|
||||
visitInstruction(I);
|
||||
}
|
||||
}
|
||||
BuildMI(BB, PPC32::BLR, 1).addImm(0);
|
||||
}
|
||||
|
||||
|
@@ -1062,6 +1062,8 @@ void ISel::promote32(unsigned targetReg, const ValueRecord &VR) {
|
||||
/// visitReturnInst - implemented with BLR
|
||||
///
|
||||
void ISel::visitReturnInst(ReturnInst &I) {
|
||||
// Only do the processing if this is a non-void return
|
||||
if (I.getNumOperands() > 0) {
|
||||
Value *RetVal = I.getOperand(0);
|
||||
switch (getClassB(RetVal->getType())) {
|
||||
case cByte: // integral return values: extend or move into r3 and return
|
||||
@@ -1083,6 +1085,7 @@ void ISel::visitReturnInst(ReturnInst &I) {
|
||||
default:
|
||||
visitInstruction(I);
|
||||
}
|
||||
}
|
||||
BuildMI(BB, PPC32::BLR, 1).addImm(0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user