mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
fcd3c4065d
than on MipsSubtargetInfo. This required a bit of massaging in the MC level to handle this since MC is a) largely a collection of disparate classes with no hierarchy, and b) there's no overarching equivalent to the TargetMachine, instead only the subtarget via MCSubtargetInfo (which is the base class of TargetSubtargetInfo). We're now storing the ABI in both the TargetMachine level and in the MC level because the AsmParser and the TargetStreamer both need to know what ABI we have to parse assembly and emit objects. The target streamer has a pointer to the one in the asm parser and is updated when the asm parser is created. This is fragile as the FIXME comment notes, but shouldn't be a problem in practice since we always create an asm parser before attempting to emit object code via the assembler. The TargetMachine now contains the ABI so that the DataLayout can be constructed dependent upon ABI. All testcases have been updated to use the -target-abi command line flag so that we can set the ABI without using a subtarget feature. Should be no change visible externally here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227102 91177308-0d34-0410-b5e6-96231b3b80d8
50 lines
2.3 KiB
LLVM
50 lines
2.3 KiB
LLVM
; RUN: llc -march=mips64 -relocation-model=static -target-abi n32 < %s | FileCheck --check-prefix=ALL --check-prefix=SYM32 %s
|
|
; RUN: llc -march=mips64el -relocation-model=static -target-abi n32 < %s | FileCheck --check-prefix=ALL --check-prefix=SYM32 %s
|
|
|
|
; RUN: llc -march=mips64 -relocation-model=static -target-abi n64 < %s | FileCheck --check-prefix=ALL --check-prefix=SYM64 %s
|
|
; RUN: llc -march=mips64el -relocation-model=static -target-abi n64 < %s | FileCheck --check-prefix=ALL --check-prefix=SYM64 %s
|
|
|
|
; Test the fp128 arguments for all ABI's and byte orders as specified
|
|
; by section 2 of the MIPSpro N32 Handbook.
|
|
;
|
|
; O32 is not tested because long double is the same as double on O32.
|
|
|
|
@ldoubles = global [11 x fp128] zeroinitializer
|
|
|
|
define void @ldouble_args(fp128 %a, fp128 %b, fp128 %c, fp128 %d, fp128 %e) nounwind {
|
|
entry:
|
|
%0 = getelementptr [11 x fp128]* @ldoubles, i32 0, i32 1
|
|
store volatile fp128 %a, fp128* %0
|
|
%1 = getelementptr [11 x fp128]* @ldoubles, i32 0, i32 2
|
|
store volatile fp128 %b, fp128* %1
|
|
%2 = getelementptr [11 x fp128]* @ldoubles, i32 0, i32 3
|
|
store volatile fp128 %c, fp128* %2
|
|
%3 = getelementptr [11 x fp128]* @ldoubles, i32 0, i32 4
|
|
store volatile fp128 %d, fp128* %3
|
|
%4 = getelementptr [11 x fp128]* @ldoubles, i32 0, i32 5
|
|
store volatile fp128 %e, fp128* %4
|
|
ret void
|
|
}
|
|
|
|
; ALL-LABEL: ldouble_args:
|
|
; We won't test the way the global address is calculated in this test. This is
|
|
; just to get the register number for the other checks.
|
|
; SYM32-DAG: addiu [[R2:\$[0-9]+]], ${{[0-9]+}}, %lo(ldoubles)
|
|
; SYM64-DAG: ld [[R2:\$[0-9]]], %got_disp(ldoubles)(
|
|
|
|
; The first four arguments are the same in N32/N64.
|
|
; ALL-DAG: sdc1 $f12, 16([[R2]])
|
|
; ALL-DAG: sdc1 $f13, 24([[R2]])
|
|
; ALL-DAG: sdc1 $f14, 32([[R2]])
|
|
; ALL-DAG: sdc1 $f15, 40([[R2]])
|
|
; ALL-DAG: sdc1 $f16, 48([[R2]])
|
|
; ALL-DAG: sdc1 $f17, 56([[R2]])
|
|
; ALL-DAG: sdc1 $f18, 64([[R2]])
|
|
; ALL-DAG: sdc1 $f19, 72([[R2]])
|
|
|
|
; N32/N64 have run out of registers and starts using the stack too
|
|
; ALL-DAG: ld [[R3:\$[0-9]+]], 0($sp)
|
|
; ALL-DAG: ld [[R4:\$[0-9]+]], 8($sp)
|
|
; ALL-DAG: sd [[R3]], 80([[R2]])
|
|
; ALL-DAG: sd [[R4]], 88([[R2]])
|