mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-25 22:38:56 -04:00

Most of the PowerPC64 code generation already creates PIC access. This changes to a full PIC default, similar to what GCC is doing. Overall, a monolithic clang binary shrinks by 600KB (about 1%). This can be a slight regression for TLS access and will use the TOC more aggressively instead of synthesizing immediates. It is expected to be performance neutral. Differential Revision: https://reviews.llvm.org/D26564 llvm-svn: 289744
34 lines
1.8 KiB
C
34 lines
1.8 KiB
C
// Check passing PowerPC ABI options to the backend.
|
|
|
|
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
|
|
// RUN: | FileCheck -check-prefix=CHECK-ELFv1 %s
|
|
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
|
|
// RUN: -mabi=elfv1 | FileCheck -check-prefix=CHECK-ELFv1 %s
|
|
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
|
|
// RUN: -mabi=elfv1-qpx | FileCheck -check-prefix=CHECK-ELFv1-QPX %s
|
|
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
|
|
// RUN: -mcpu=a2q | FileCheck -check-prefix=CHECK-ELFv1-QPX %s
|
|
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
|
|
// RUN: -mcpu=a2 -mqpx | FileCheck -check-prefix=CHECK-ELFv1-QPX %s
|
|
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
|
|
// RUN: -mcpu=a2q -mno-qpx | FileCheck -check-prefix=CHECK-ELFv1 %s
|
|
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
|
|
// RUN: -mabi=elfv2 | FileCheck -check-prefix=CHECK-ELFv2 %s
|
|
|
|
// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
|
|
// RUN: | FileCheck -check-prefix=CHECK-ELFv2 %s
|
|
// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
|
|
// RUN: -mabi=elfv1 | FileCheck -check-prefix=CHECK-ELFv1 %s
|
|
// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
|
|
// RUN: -mabi=elfv2 | FileCheck -check-prefix=CHECK-ELFv2 %s
|
|
// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
|
|
// RUN: -mabi=altivec | FileCheck -check-prefix=CHECK-ELFv2 %s
|
|
|
|
// CHECK-ELFv1: "-mrelocation-model" "pic" "-pic-level" "2"
|
|
// CHECK-ELFv1: "-target-abi" "elfv1"
|
|
// CHECK-ELFv1-QPX: "-mrelocation-model" "pic" "-pic-level" "2"
|
|
// CHECK-ELFv1-QPX: "-target-abi" "elfv1-qpx"
|
|
// CHECK-ELFv2: "-mrelocation-model" "pic" "-pic-level" "2"
|
|
// CHECK-ELFv2: "-target-abi" "elfv2"
|
|
|