[PATCH] D15054: [X86] Better support for the MCU psABI
Michael Kuperstein via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 28 04:27:58 PST 2015
mkuper added a comment.
Comment at: lib/Target/X86/X86CallingConv.td:603-604
@@ +602,4 @@
+ // The 'nest' parameter, if any, is passed in ECX.
> ECX is an allocatable argument register, so this will not implement 'nest' properly. Either ignoring 'nest' completely or giving a fatal error seems like better behavior than having code that looks like it's trying to implement something.
Comment at: test/CodeGen/X86/mcu-abi.ll:64-66
@@ +63,5 @@
+; CHECK-NEXT: movl $48, %ecx
+; CHECK-NEXT: calll memcpy
+; CHECK-NEXT: movl %esi, %eax
+; CHECK-NEXT: popl %esi
+; CHECK-NOT: retl $4
> Idle thought: We should teach LLVM that memcpy returns its first argument, so that we don't have to spill in this kind of situation. :)
Yeah. Interesting. :-)
More information about the llvm-commits