brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · d65cc75 Raw
50 lines · plain
1; RUN: llc -mtriple=mips64 -relocation-model=static -target-abi n32 < %s | FileCheck --check-prefixes=ALL,SYM32 %s2; RUN: llc -mtriple=mips64el -relocation-model=static -target-abi n32 < %s | FileCheck --check-prefixes=ALL,SYM32 %s3 4; RUN: llc -mtriple=mips64 -relocation-model=static -target-abi n64 < %s | FileCheck --check-prefixes=ALL,SYM64 %s5; RUN: llc -mtriple=mips64el -relocation-model=static -target-abi n64 < %s | FileCheck --check-prefixes=ALL,SYM64 %s6 7; Test the fp128 arguments for all ABI's and byte orders as specified8; by section 2 of the MIPSpro N32 Handbook.9;10; O32 is not tested because long double is the same as double on O32.11 12@ldoubles = global [11 x fp128] zeroinitializer13 14define void @ldouble_args(fp128 %a, fp128 %b, fp128 %c, fp128 %d, fp128 %e) nounwind {15entry:16        %0 = getelementptr [11 x fp128], ptr @ldoubles, i32 0, i32 117        store volatile fp128 %a, ptr %018        %1 = getelementptr [11 x fp128], ptr @ldoubles, i32 0, i32 219        store volatile fp128 %b, ptr %120        %2 = getelementptr [11 x fp128], ptr @ldoubles, i32 0, i32 321        store volatile fp128 %c, ptr %222        %3 = getelementptr [11 x fp128], ptr @ldoubles, i32 0, i32 423        store volatile fp128 %d, ptr %324        %4 = getelementptr [11 x fp128], ptr @ldoubles, i32 0, i32 525        store volatile fp128 %e, ptr %426        ret void27}28 29; ALL-LABEL: ldouble_args:30; We won't test the way the global address is calculated in this test. This is31; just to get the register number for the other checks.32; SYM32-DAG:           addiu [[R2:\$[0-9]+]], ${{[0-9]+}}, %lo(ldoubles)33; SYM64-DAG:           daddiu [[R2:\$[0-9]]], ${{[0-9]+}}, %lo(ldoubles)34 35; The first four arguments are the same in N32/N64.36; ALL-DAG:           sdc1 $f12, 16([[R2]])37; ALL-DAG:           sdc1 $f13, 24([[R2]])38; ALL-DAG:           sdc1 $f14, 32([[R2]])39; ALL-DAG:           sdc1 $f15, 40([[R2]])40; ALL-DAG:           sdc1 $f16, 48([[R2]])41; ALL-DAG:           sdc1 $f17, 56([[R2]])42; ALL-DAG:           sdc1 $f18, 64([[R2]])43; ALL-DAG:           sdc1 $f19, 72([[R2]])44 45; N32/N64 have run out of registers and starts using the stack too46; ALL-DAG:           ld [[R3:\$[0-9]+]], 0($sp)47; ALL-DAG:           ld [[R4:\$[0-9]+]], 8($sp)48; ALL-DAG:           sd [[R3]], 80([[R2]])49; ALL-DAG:           sd [[R4]], 88([[R2]])50