1 ; RUN: llc -march=mips -soft-float -relocation-model=static < %s | FileCheck --check-prefix=ALL --check-prefix=O32 %s
2 ; RUN: llc -march=mipsel -soft-float -relocation-model=static < %s | FileCheck --check-prefix=ALL --check-prefix=O32 %s
4 ; RUN-TODO: llc -march=mips64 -soft-float -relocation-model=static -mattr=-n64,+o32 < %s | FileCheck --check-prefix=ALL --check-prefix=O32 %s
5 ; RUN-TODO: llc -march=mips64el -soft-float -relocation-model=static -mattr=-n64,+o32 < %s | FileCheck --check-prefix=ALL --check-prefix=O32 %s
7 ; RUN: llc -march=mips64 -soft-float -relocation-model=static -mattr=-n64,+n32 < %s | FileCheck --check-prefix=ALL --check-prefix=N32 %s
8 ; RUN: llc -march=mips64el -soft-float -relocation-model=static -mattr=-n64,+n32 < %s | FileCheck --check-prefix=ALL --check-prefix=N32 %s
10 ; RUN: llc -march=mips64 -soft-float -relocation-model=static -mattr=-n64,+n64 < %s | FileCheck --check-prefix=ALL --check-prefix=N64 %s
11 ; RUN: llc -march=mips64el -soft-float -relocation-model=static -mattr=-n64,+n64 < %s | FileCheck --check-prefix=ALL --check-prefix=N64 %s
13 ; Test the float returns for all ABI's and byte orders as specified by
14 ; section 5 of MD00305 (MIPS ABIs Described).
16 @float = global float zeroinitializer
17 @double = global double zeroinitializer
19 define float @retfloat() nounwind {
21 %0 = load volatile float* @float
25 ; ALL-LABEL: retfloat:
26 ; O32-DAG: lui [[R1:\$[0-9]+]], %hi(float)
27 ; O32-DAG: lw $2, %lo(float)([[R1]])
28 ; N32-DAG: lui [[R1:\$[0-9]+]], %hi(float)
29 ; N32-DAG: lw $2, %lo(float)([[R1]])
30 ; N64-DAG: ld [[R1:\$[0-9]+]], %got_disp(float)($1)
31 ; N64-DAG: lw $2, 0([[R1]])
33 define double @retdouble() nounwind {
35 %0 = load volatile double* @double
39 ; ALL-LABEL: retdouble:
40 ; O32-DAG: lw $2, %lo(double)([[R1:\$[0-9]+]])
41 ; O32-DAG: addiu [[R2:\$[0-9]+]], [[R1]], %lo(double)
42 ; O32-DAG: lw $3, 4([[R2]])
43 ; N32-DAG: ld $2, %lo(double)([[R1:\$[0-9]+]])
44 ; N64-DAG: ld [[R1:\$[0-9]+]], %got_disp(double)($1)
45 ; N64-DAG: ld $2, 0([[R1]])