PPCCallingConv.td (195340) | PPCCallingConv.td (203954) |
---|---|
1//===- PPCCallingConv.td - Calling Conventions for PowerPC ------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 52 unchanged lines hidden (view full) --- 61]>; 62 63*/ 64 65//===----------------------------------------------------------------------===// 66// PowerPC System V Release 4 ABI 67//===----------------------------------------------------------------------===// 68 | 1//===- PPCCallingConv.td - Calling Conventions for PowerPC ------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 52 unchanged lines hidden (view full) --- 61]>; 62 63*/ 64 65//===----------------------------------------------------------------------===// 66// PowerPC System V Release 4 ABI 67//===----------------------------------------------------------------------===// 68 |
69// _Complex arguments are never split, thus their two scalars are either 70// passed both in argument registers or both on the stack. Also _Complex 71// arguments are always passed in general purpose registers, never in 72// Floating-point registers or vector registers. Arguments which should go 73// on the stack are marked with the inreg parameter attribute. 74// Giving inreg this target-dependent (and counter-intuitive) meaning 75// simplifies things, because functions calls are not always coming from the 76// frontend but are also created implicitly e.g. for libcalls. If inreg would 77// actually mean that the argument is passed in a register, then all places 78// which create function calls/function definitions implicitly would need to 79// be aware of this fact and would need to mark arguments accordingly. With 80// inreg meaning that the argument is passed on the stack, this is not an 81// issue, except for calls which involve _Complex types. 82 | |
83def CC_PPC_SVR4_Common : CallingConv<[ 84 // The ABI requires i64 to be passed in two adjacent registers with the first 85 // register having an odd register number. 86 CCIfType<[i32], CCIfSplit<CCCustom<"CC_PPC_SVR4_Custom_AlignArgRegs">>>, 87 88 // The first 8 integer arguments are passed in integer registers. | 69def CC_PPC_SVR4_Common : CallingConv<[ 70 // The ABI requires i64 to be passed in two adjacent registers with the first 71 // register having an odd register number. 72 CCIfType<[i32], CCIfSplit<CCCustom<"CC_PPC_SVR4_Custom_AlignArgRegs">>>, 73 74 // The first 8 integer arguments are passed in integer registers. |
89 CCIfType<[i32], CCIf<"!ArgFlags.isInReg()", 90 CCAssignToReg<[R3, R4, R5, R6, R7, R8, R9, R10]>>>, | 75 CCIfType<[i32], CCAssignToReg<[R3, R4, R5, R6, R7, R8, R9, R10]>>, |
91 92 // Make sure the i64 words from a long double are either both passed in 93 // registers or both passed on the stack. 94 CCIfType<[f64], CCIfSplit<CCCustom<"CC_PPC_SVR4_Custom_AlignFPArgRegs">>>, 95 96 // FP values are passed in F1 - F8. 97 CCIfType<[f32, f64], CCAssignToReg<[F1, F2, F3, F4, F5, F6, F7, F8]>>, 98 --- 49 unchanged lines hidden --- | 76 77 // Make sure the i64 words from a long double are either both passed in 78 // registers or both passed on the stack. 79 CCIfType<[f64], CCIfSplit<CCCustom<"CC_PPC_SVR4_Custom_AlignFPArgRegs">>>, 80 81 // FP values are passed in F1 - F8. 82 CCIfType<[f32, f64], CCAssignToReg<[F1, F2, F3, F4, F5, F6, F7, F8]>>, 83 --- 49 unchanged lines hidden --- |