[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.

Thanks, Reid!

Comment at: lib/Target/X86/X86CallingConv.td:603-604
@@ +602,4 @@
+  // The 'nest' parameter, if any, is passed in ECX.
+  CCIfNest<CCAssignToReg<[ECX]>>,
rnk wrote:
> 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.
Right, thanks.

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
rnk wrote:
> 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 mailing list