File: arguments-fp128.ll

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (51 lines) | stat: -rw-r--r-- 2,471 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
; RUN: llc -mtriple=mips64 -relocation-model=static -mattr=+soft-float -target-abi n32 < %s | FileCheck --check-prefixes=ALL,SYM32 %s
; RUN: llc -mtriple=mips64el -relocation-model=static -mattr=+soft-float -target-abi n32 < %s | FileCheck --check-prefixes=ALL,SYM32 %s

; RUN: llc -mtriple=mips64 -relocation-model=static -mattr=+soft-float -target-abi n64 < %s | FileCheck --check-prefixes=ALL,SYM64 %s
; RUN: llc -mtriple=mips64el -relocation-model=static -mattr=+soft-float -target-abi n64 < %s | FileCheck --check-prefixes=ALL,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], ptr @ldoubles, i32 0, i32 1
        store volatile fp128 %a, ptr %0
        %1 = getelementptr [11 x fp128], ptr @ldoubles, i32 0, i32 2
        store volatile fp128 %b, ptr %1
        %2 = getelementptr [11 x fp128], ptr @ldoubles, i32 0, i32 3
        store volatile fp128 %c, ptr %2
        %3 = getelementptr [11 x fp128], ptr @ldoubles, i32 0, i32 4
        store volatile fp128 %d, ptr %3
        %4 = getelementptr [11 x fp128], ptr @ldoubles, i32 0, i32 5
        store volatile fp128 %e, ptr %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:           daddiu [[R2:\$[0-9]]], ${{[0-9]+}}, %lo(ldoubles)

; The first four arguments are the same in N32/N64.
; The first argument is floating point but soft-float is enabled so floating
; point registers are not used.
; ALL-DAG:           sd $4, 16([[R2]])
; ALL-DAG:           sd $5, 24([[R2]])
; ALL-DAG:           sd $6, 32([[R2]])
; ALL-DAG:           sd $7, 40([[R2]])
; ALL-DAG:           sd $8, 48([[R2]])
; ALL-DAG:           sd $9, 56([[R2]])
; ALL-DAG:           sd $10, 64([[R2]])
; ALL-DAG:           sd $11, 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]])