mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
bb43600d6c
Follow-up for D74433 What the function returns are almost standard BFD names, except that "ELF" is in uppercase instead of lowercase. This patch changes "ELF" to "elf" and changes ARM/AArch64 to use their BFD names. MIPS and PPC64 have endianness differences as well, but this patch does not intend to address them. Advantages: * llvm-objdump: the "file format " line matches GNU objdump on ARM/AArch64 objects * "file format " line can be extracted and fed into llvm-objcopy -O literally. (https://github.com/ClangBuiltLinux/linux/issues/779 has such a use case) Affected tools: llvm-readobj, llvm-objdump, llvm-dwarfdump, MCJIT (internal implementation detail, not exposed) Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D76046
18 lines
576 B
LLVM
18 lines
576 B
LLVM
; RUN: llc < %s -march=r600 -mcpu=redwood -filetype=obj | llvm-readobj -S - | FileCheck --check-prefix=ELF %s
|
|
; RUN: llc < %s -march=r600 -mcpu=redwood -o - | FileCheck --check-prefix=CONFIG %s
|
|
|
|
; ELF: Format: elf32-amdgpu
|
|
; ELF: Name: .AMDGPU.config
|
|
|
|
; CONFIG: .section .AMDGPU.config
|
|
; CONFIG-NEXT: .long 166100
|
|
; CONFIG-NEXT: .long 2
|
|
; CONFIG-NEXT: .long 165900
|
|
; CONFIG-NEXT: .long 0
|
|
define amdgpu_kernel void @test(float addrspace(1)* %out, i32 %p) {
|
|
%i = add i32 %p, 2
|
|
%r = bitcast i32 %i to float
|
|
store float %r, float addrspace(1)* %out
|
|
ret void
|
|
}
|