[PATCH] Add explicit Win64 and System V calling conventions to the x86_64 backend

Charles Davis cdavis5x at gmail.com
Tue Apr 30 21:34:41 PDT 2013



================
Comment at: lib/Target/X86/X86FastISel.cpp:724
@@ -722,3 +723,3 @@
 
-  if (Subtarget->isTargetWin64())
+  if (Subtarget->isTargetWin64() && CC != CallingConv::X86_64_C)
     return false;
----------------
Anton Korobeynikov wrote:
> Maybe we can introduce the notion of "native" CC given a subtarget and make use of checks here?
Hmm... I wasn't so sure about that at first, but I can see how other targets could use something like that. ARM, for example. Every ARM sub-target wants to use a different CC--most want AAPCS now, but Darwin still wants APCS (does it?), and CPUs with VFP want AAPCS-VFP, etc.

I think that introducing "native" calling conventions should be a separate patch, though. It's only tangential to what this patch does. What do you think?


http://llvm-reviews.chandlerc.com/D729



More information about the llvm-commits mailing list