mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
9e8b1c8ad9
So far, support for x86_64-linux-gnux32 has been handled by explicit comparisons of Triple.getEnvironment() to GNUX32. This worked as long as x86_64-linux-gnux32 was the only X32 environment to worry about, but we now have x86_64-linux-muslx32 as well. To support this, this change adds an isX32() function and uses it. It replaces all checks for GNUX32 or MuslX32 by isX32(), except for the following: - Triple::isGNUEnvironment() and Triple::isMusl() are supposed to treat GNUX32 and MuslX32 differently. - computeTargetTriple() needs to be able to transform triples to add or remove X32 from the environment and needs to map GNU to GNUX32, and Musl to MuslX32. - getMultiarchTriple() completely lacks any Musl support and retains the explicit check for GNUX32 as it can only return x86_64-linux-gnux32. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D103777
18 lines
529 B
LLVM
18 lines
529 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc < %s -mtriple=x86_64-linux-gnux32 -O0 | FileCheck %s
|
|
; RUN: llc < %s -mtriple=x86_64-linux-muslx32 -O0 | FileCheck %s
|
|
|
|
define void @foo(i32** %p) {
|
|
; CHECK-LABEL: foo:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: leal -{{[0-9]+}}(%rsp), %eax
|
|
; CHECK-NEXT: addl $16, %eax
|
|
; CHECK-NEXT: movl %eax, (%edi)
|
|
; CHECK-NEXT: retq
|
|
%a = alloca i32, i32 10
|
|
%addr = getelementptr i32, i32* %a, i32 4
|
|
store i32* %addr, i32** %p
|
|
ret void
|
|
}
|
|
|