llvm.org GIT mirror llvm / 5a4c26e
Use the integrated assembler as default on PowerPC This was already done in clang, this commit now uses the integrated assembler as default when using LLVM tools directly. A number of test cases using inline asm had to be adapted, either by updating the expected output, or by using -no-integrated-as (for such tests that deliberately use an invalid instruction in inline asm). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225819 91177308-0d34-0410-b5e6-96231b3b80d8 Ulrich Weigand 4 years ago
7 changed file(s) with 13 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
7373 AssemblerDialect = 1; // New-Style mnemonics.
7474 LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment;
7575
76 if (T.isOSFreeBSD() || ((T.isOSNetBSD() || T.isOSOpenBSD()) && !is64Bit))
77 UseIntegratedAssembler = true;
76 UseIntegratedAssembler = true;
7877 }
7978
2929 }
3030
3131 ; CHECK-LABEL: @foo
32 ; CHECK: ld [[REG:[0-9]+]],0(4)
33 ; CHECK-NEXT: cmpw [[REG]],[[REG]]
34 ; CHECK-NEXT: bne- 1f
35 ; CHECK-NEXT: 1: isync
32 ; CHECK: ld [[REG:[0-9]+]], 0(4)
33 ; CHECK: cmpw 0, [[REG]], [[REG]]
34 ; CHECK: bne- 0, .Ltmp[[TMP:[0-9]+]]
35 ; CHECK: .Ltmp[[TMP]]:
36 ; CHECK: isync
3637
3738 attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
3839 attributes #1 = { nounwind }
55 define i32 @test_cr2() nounwind uwtable {
66 entry:
77 %ret = alloca i32, align 4
8 %0 = call i32 asm sideeffect "\0A\09mtcr $4\0A\09cmp 2,$2,$1\0A\09mfcr $0", "=r,r,r,r,r,~{cr2}"(i32 1, i32 2, i32 3, i32 0) nounwind
8 %0 = call i32 asm sideeffect "\0A\09mtcr $4\0A\09cmpw 2,$2,$1\0A\09mfcr $0", "=r,r,r,r,r,~{cr2}"(i32 1, i32 2, i32 3, i32 0) nounwind
99 store i32 %0, i32* %ret, align 4
1010 call void @foo()
1111 %1 = load i32* %ret, align 4
3434 define i32 @test_cr234() nounwind {
3535 entry:
3636 %ret = alloca i32, align 4
37 %0 = call i32 asm sideeffect "\0A\09mtcr $4\0A\09cmp 2,$2,$1\0A\09cmp 3,$2,$2\0A\09cmp 4,$2,$3\0A\09mfcr $0", "=r,r,r,r,r,~{cr2},~{cr3},~{cr4}"(i32 1, i32 2, i32 3, i32 0) nounwind
37 %0 = call i32 asm sideeffect "\0A\09mtcr $4\0A\09cmpw 2,$2,$1\0A\09cmpw 3,$2,$2\0A\09cmpw 4,$2,$3\0A\09mfcr $0", "=r,r,r,r,r,~{cr2},~{cr3},~{cr4}"(i32 1, i32 2, i32 3, i32 0) nounwind
3838 store i32 %0, i32* %ret, align 4
3939 call void @foo()
4040 %1 = load i32* %ret, align 4
1313 }
1414
1515 ; CHECK: ld
16 ; CHECK-NOT: addi 3,3,4294967295
17 ; CHECK: addi 3,3,-1
16 ; CHECK-NOT: addi 3, 3, 4294967295
17 ; CHECK: addi 3, 3, -1
1818 ; CHECK: blr
1919
2020 ; Function Attrs: nounwind
None ; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s
0 ; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -no-integrated-as | FileCheck %s
11
22 define void @f() {
33 ; CHECK: @f
None ; RUN: llc < %s -march=ppc32
0 ; RUN: llc < %s -march=ppc32 -no-integrated-as
11 ; ModuleID = 'mult-alt-generic.c'
22 target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32"
33 target triple = "powerpc"
None ; RUN: llc < %s -march=ppc64
0 ; RUN: llc < %s -march=ppc64 -no-integrated-as
11 ; ModuleID = 'mult-alt-generic.c'
22 target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32:64"
33 target triple = "powerpc64"