mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-31 09:25:42 +00:00
Fix assertion failure when calling or returning from a function which
returns 'bool' type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16884 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -798,7 +798,7 @@ void V8ISel::visitCallInst(CallInst &I) {
|
|||||||
if (I.getType () == Type::VoidTy)
|
if (I.getType () == Type::VoidTy)
|
||||||
return;
|
return;
|
||||||
unsigned DestReg = getReg (I);
|
unsigned DestReg = getReg (I);
|
||||||
switch (getClass (I.getType ())) {
|
switch (getClassB (I.getType ())) {
|
||||||
case cByte:
|
case cByte:
|
||||||
case cShort:
|
case cShort:
|
||||||
case cInt:
|
case cInt:
|
||||||
@@ -823,7 +823,7 @@ void V8ISel::visitCallInst(CallInst &I) {
|
|||||||
void V8ISel::visitReturnInst(ReturnInst &I) {
|
void V8ISel::visitReturnInst(ReturnInst &I) {
|
||||||
if (I.getNumOperands () == 1) {
|
if (I.getNumOperands () == 1) {
|
||||||
unsigned RetValReg = getReg (I.getOperand (0));
|
unsigned RetValReg = getReg (I.getOperand (0));
|
||||||
switch (getClass (I.getOperand (0)->getType ())) {
|
switch (getClassB (I.getOperand (0)->getType ())) {
|
||||||
case cByte:
|
case cByte:
|
||||||
case cShort:
|
case cShort:
|
||||||
case cInt:
|
case cInt:
|
||||||
|
@@ -798,7 +798,7 @@ void V8ISel::visitCallInst(CallInst &I) {
|
|||||||
if (I.getType () == Type::VoidTy)
|
if (I.getType () == Type::VoidTy)
|
||||||
return;
|
return;
|
||||||
unsigned DestReg = getReg (I);
|
unsigned DestReg = getReg (I);
|
||||||
switch (getClass (I.getType ())) {
|
switch (getClassB (I.getType ())) {
|
||||||
case cByte:
|
case cByte:
|
||||||
case cShort:
|
case cShort:
|
||||||
case cInt:
|
case cInt:
|
||||||
@@ -823,7 +823,7 @@ void V8ISel::visitCallInst(CallInst &I) {
|
|||||||
void V8ISel::visitReturnInst(ReturnInst &I) {
|
void V8ISel::visitReturnInst(ReturnInst &I) {
|
||||||
if (I.getNumOperands () == 1) {
|
if (I.getNumOperands () == 1) {
|
||||||
unsigned RetValReg = getReg (I.getOperand (0));
|
unsigned RetValReg = getReg (I.getOperand (0));
|
||||||
switch (getClass (I.getOperand (0)->getType ())) {
|
switch (getClassB (I.getOperand (0)->getType ())) {
|
||||||
case cByte:
|
case cByte:
|
||||||
case cShort:
|
case cShort:
|
||||||
case cInt:
|
case cInt:
|
||||||
|
Reference in New Issue
Block a user