mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
Add comments explaining why there's only one register for
i8 return values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67502 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a38ff646bc
commit
82f84159e0
@ -22,7 +22,12 @@ class CCIfSubtarget<string F, CCAction A>
|
|||||||
|
|
||||||
// Return-value conventions common to all X86 CC's.
|
// Return-value conventions common to all X86 CC's.
|
||||||
def RetCC_X86Common : CallingConv<[
|
def RetCC_X86Common : CallingConv<[
|
||||||
// Scalar values are returned in AX first, then DX.
|
// Scalar values are returned in AX first, then DX, except for i8 where
|
||||||
|
// the convention is to return values in AL and AH. However, using AL and
|
||||||
|
// is AH problematic -- a return of {i16,i8} would end up using AX and AH,
|
||||||
|
// and one value would clobber the other. C front-ends are currently expected
|
||||||
|
// to pack two i8 values into an i16 in the rare situations where this
|
||||||
|
// is necessary.
|
||||||
CCIfType<[i8] , CCAssignToReg<[AL]>>,
|
CCIfType<[i8] , CCAssignToReg<[AL]>>,
|
||||||
CCIfType<[i16], CCAssignToReg<[AX, DX]>>,
|
CCIfType<[i16], CCAssignToReg<[AX, DX]>>,
|
||||||
CCIfType<[i32], CCAssignToReg<[EAX, EDX]>>,
|
CCIfType<[i32], CCAssignToReg<[EAX, EDX]>>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user