Fix the calling convention for return values. I believe the way this works is that you specify the width of the single register and a list of registers to return values in for anything bigger. By having a return convention for [i32], I seem to have been telling LLVM that it can return a 32-bit value in X which it cannot do.

This commit is contained in:
Jeremy Rand 2015-08-31 23:30:50 -04:00
parent c09c887891
commit 74cb03d2f6

View File

@ -17,8 +17,7 @@
// WDC C return-value convention.
def RetCC_WDC : CallingConv<[
CCIfType<[i16], CCAssignToReg<[A]>>,
CCIfType<[i32], CCAssignToReg<[X, A]>>
CCIfType<[i16], CCAssignToReg<[A, X]>>
]>;
// WDC C Calling convention.