diff options
| author | Dale Johannesen <dalej@apple.com> | 2008-09-25 20:47:45 +0000 |
|---|---|---|
| committer | Dale Johannesen <dalej@apple.com> | 2008-09-25 20:47:45 +0000 |
| commit | c50ada2f5678d8745b115d9a5de51309094845f0 (patch) | |
| tree | 666bcf7623da63d6001f0bb59643f4a3b30409ef /llvm/lib/Target/X86 | |
| parent | 15146a56e1a1d7cd661c4a557e167627ec695696 (diff) | |
| download | bcm5719-llvm-c50ada2f5678d8745b115d9a5de51309094845f0.tar.gz bcm5719-llvm-c50ada2f5678d8745b115d9a5de51309094845f0.zip | |
Accept 'inreg' attribute on x86 functions as
meaning sse_regparm (i.e. float/double values go
in XMM0 instead of ST0). Update documentation
to reflect reality.
llvm-svn: 56619
Diffstat (limited to 'llvm/lib/Target/X86')
| -rw-r--r-- | llvm/lib/Target/X86/X86CallingConv.td | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86CallingConv.td b/llvm/lib/Target/X86/X86CallingConv.td index b98b5d9b495..590bc1015a9 100644 --- a/llvm/lib/Target/X86/X86CallingConv.td +++ b/llvm/lib/Target/X86/X86CallingConv.td @@ -43,10 +43,14 @@ def RetCC_X86Common : CallingConv<[ // X86-32 C return-value convention. def RetCC_X86_32_C : CallingConv<[ - // The X86-32 calling convention returns FP values in ST0, otherwise it is the - // same as the common X86 calling conv. - CCIfType<[f32], CCAssignToReg<[ST0, ST1]>>, - CCIfType<[f64], CCAssignToReg<[ST0, ST1]>>, + // The X86-32 calling convention returns FP values in ST0, unless marked + // with "inreg" (used here to distinguish one kind of reg from another, + // weirdly; this is really the sse-regparm calling convention) in which + // case they use XMM0, otherwise it is the same as the common X86 calling + // conv. + CCIfInReg<CCIfSubtarget<"hasSSE2()", + CCIfType<[f32, f64], CCAssignToReg<[XMM0,XMM1,XMM2]>>>>, + CCIfType<[f32,f64], CCAssignToReg<[ST0, ST1]>>, CCDelegateTo<RetCC_X86Common> ]>; |

