~ubuntu-branches/ubuntu/quantal/llvm-3.1/quantal

« back to all changes in this revision

Viewing changes to test/CodeGen/X86/win32_sret.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-03-29 19:09:51 UTC
  • Revision ID: package-import@ubuntu.com-20120329190951-aq83ivog4cg8bxun
Tags: upstream-3.1~svn153643
ImportĀ upstreamĀ versionĀ 3.1~svn153643

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc < %s -mtriple=i686-pc-win32 | FileCheck %s -check-prefix=WIN_X32
 
2
; RUN: llc < %s -mtriple=i686-pc-mingw32 | FileCheck %s -check-prefix=MINGW_X32
 
3
; RUN: llc < %s -mtriple=i386-pc-linux | FileCheck %s -check-prefix=LINUX
 
4
; RUN: llc < %s -O0 -mtriple=i686-pc-win32 | FileCheck %s -check-prefix=WIN_X32
 
5
; RUN: llc < %s -O0 -mtriple=i686-pc-mingw32 | FileCheck %s -check-prefix=MINGW_X32
 
6
; RUN: llc < %s -O0 -mtriple=i386-pc-linux | FileCheck %s -check-prefix=LINUX
 
7
 
 
8
; The SysV ABI used by most Unixes and Mingw on x86 specifies that an sret pointer
 
9
; is callee-cleanup. However, in MSVC's cdecl calling convention, sret pointer
 
10
; arguments are caller-cleanup like normal arguments.
 
11
 
 
12
define void @sret1(i8* sret) nounwind {
 
13
entry:
 
14
; WIN_X32:    {{ret$}}
 
15
; MINGW_X32:  ret $4
 
16
; LINUX:      ret $4
 
17
  ret void
 
18
}
 
19
 
 
20
define void @sret2(i32* sret %x, i32 %y) nounwind {
 
21
entry:
 
22
; WIN_X32:    {{ret$}}
 
23
; MINGW_X32:  ret $4
 
24
; LINUX:      ret $4
 
25
  store i32 %y, i32* %x
 
26
  ret void
 
27
}
 
28