mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-22 13:29:44 +00:00
[fast-isel] The X86FastISel::FastLowerArguments function doesn't properly handle
the win64 calling convention. rdar://13423768 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177113 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1754aca83a
commit
d9b306a477
@ -1526,6 +1526,9 @@ bool X86FastISel::FastLowerArguments() {
|
|||||||
if (!FuncInfo.CanLowerReturn)
|
if (!FuncInfo.CanLowerReturn)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (Subtarget->isTargetWindows())
|
||||||
|
return false;
|
||||||
|
|
||||||
const Function *F = FuncInfo.Fn;
|
const Function *F = FuncInfo.Fn;
|
||||||
if (F->isVarArg())
|
if (F->isVarArg())
|
||||||
return false;
|
return false;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llc < %s -fast-isel -verify-machineinstrs -mtriple=x86_64-apple-darwin10
|
; RUN: llc < %s -fast-isel -verify-machineinstrs -mtriple=x86_64-apple-darwin10
|
||||||
|
; RUN: llc < %s -fast-isel -verify-machineinstrs -mtriple=x86_64-pc-win32 | FileCheck %s
|
||||||
; Requires: Asserts
|
; Requires: Asserts
|
||||||
|
|
||||||
; Previously, this would cause an assert.
|
; Previously, this would cause an assert.
|
||||||
@ -8,3 +9,12 @@ entry:
|
|||||||
%add1 = add nsw i31 %add, %c
|
%add1 = add nsw i31 %add, %c
|
||||||
ret i31 %add1
|
ret i31 %add1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; We don't handle the Windows CC, yet.
|
||||||
|
define i32 @foo(i32* %p) {
|
||||||
|
entry:
|
||||||
|
; CHECK: foo
|
||||||
|
; CHECK: movl (%rcx), %eax
|
||||||
|
%0 = load i32* %p, align 4
|
||||||
|
ret i32 %0
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user