We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04bf1a4 commit ce678ecCopy full SHA for ce678ec
llvm/lib/Target/X86/X86CallingConv.td
@@ -1063,11 +1063,13 @@ def CC_X86_64_Preserve_None : CallingConv<[
1063
// - R10 'nest' parameter
1064
// - RBX base pointer
1065
// - R16 - R31 these are not available everywhere
1066
- CCIfType<[i32], CCAssignToReg<[EDI, ESI, EDX, ECX, R8D, R9D,
1067
- R11D, R12D, R13D, R14D, R15D, EAX]>>,
+ // Use non-volatile registers first, so functions using this convention can
+ // call "normal" functions without saving and restoring incoming values:
1068
+ CCIfType<[i32], CCAssignToReg<[R12D, R13D, R14D, R15D, EDI, ESI,
1069
+ EDX, ECX, R8D, R9D, R11D, EAX]>>,
1070
- CCIfType<[i64], CCAssignToReg<[RDI, RSI, RDX, RCX, R8, R9,
- R11, R12, R13, R14, R15, RAX]>>,
1071
+ CCIfType<[i64], CCAssignToReg<[R12, R13, R14, R15, RDI, RSI,
1072
+ RDX, RCX, R8, R9, R11, RAX]>>,
1073
1074
// Otherwise it's the same as the regular C calling convention.
1075
CCDelegateTo<CC_X86_64_C>
0 commit comments