llvm.org GIT mirror llvm / 934a756
rename test, make more specific. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79712 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 11 years ago
2 changed file(s) with 21 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
+0
-19
test/CodeGen/X86/2009-08-19-inline-asm-a-modifier.ll less more
None ; RUN: llvm-as < %s | llc | FileCheck %s
1 ; ModuleID = 'asm.c'
2 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
3 target triple = "i386-apple-darwin9.6"
4
5 define i32 @main() nounwind {
6 entry:
7 ; CHECK: %gs:6
8 %asmtmp.i = tail call i16 asm "movw\09%gs:${1:a}, ${0:w}", "=r,ir,~{dirflag},~{fpsr},~{flags}"(i32 6) nounwind ; [#uses=1]
9 %0 = zext i16 %asmtmp.i to i32 ; [#uses=1]
10 ret i32 %0
11 }
12
13 define zeroext i16 @readgsword2(i32 %address) nounwind {
14 entry:
15 ; CHECK: %gs:(%eax)
16 %asmtmp = tail call i16 asm "movw\09%gs:${1:a}, ${0:w}", "=r,ir,~{dirflag},~{fpsr},~{flags}"(i32 %address) nounwind ; [#uses=1]
17 ret i16 %asmtmp
18 }
0 ; RUN: llvm-as < %s | llc | FileCheck %s
1 ; ModuleID = 'asm.c'
2 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
3 target triple = "i386-apple-darwin9.6"
4
5 define i32 @test1() nounwind {
6 entry:
7 ; CHECK: test1:
8 ; CHECK: movw %gs:6, %ax
9 %asmtmp.i = tail call i16 asm "movw\09%gs:${1:a}, ${0:w}", "=r,ir,~{dirflag},~{fpsr},~{flags}"(i32 6) nounwind ; [#uses=1]
10 %0 = zext i16 %asmtmp.i to i32 ; [#uses=1]
11 ret i32 %0
12 }
13
14 define zeroext i16 @test2(i32 %address) nounwind {
15 entry:
16 ; CHECK: test2:
17 ; CHECK: movw %gs:(%eax), %ax
18 %asmtmp = tail call i16 asm "movw\09%gs:${1:a}, ${0:w}", "=r,ir,~{dirflag},~{fpsr},~{flags}"(i32 %address) nounwind ; [#uses=1]
19 ret i16 %asmtmp
20 }