blob: 526ff17990fca568b676ac3a6172a8ad2400ac62 [file] [log] [blame]
Petar Jovanovice578e972016-04-11 15:24:23 +00001; RUN: llc -march=mips64 -mcpu=mips64 -target-abi=n32 -relocation-model=pic < \
Zlatko Buljanfba68932016-03-14 12:50:23 +00002; RUN: %s | FileCheck %s -check-prefix=ALL -check-prefix=N32 \
Petar Jovanovice578e972016-04-11 15:24:23 +00003; RUN: -check-prefix=HARD-FLOAT
4; RUN: llc -march=mips64el -mcpu=mips64 -target-abi=n32 -relocation-model=pic < \
5; RUN: %s | FileCheck %s -check-prefix=ALL -check-prefix=N32 \
6; RUN: -check-prefix=HARD-FLOAT
7
8; RUN: llc -march=mips64 -mcpu=mips64 -target-abi=n64 -relocation-model=pic < \
9; RUN: %s | FileCheck %s -check-prefix=ALL -check-prefix=N64 \
10; RUN: -check-prefix=HARD-FLOAT
11; RUN: llc -march=mips64el -mcpu=mips64 -target-abi=n64 -relocation-model=pic < \
12; RUN: %s | FileCheck %s -check-prefix=ALL -check-prefix=N64 \
13; RUN: -check-prefix=HARD-FLOAT
14
15; RUN: llc -march=mips64 -mcpu=mips64 -mattr=+soft-float -target-abi=n32 \
16; RUN: -relocation-model=pic < %s | FileCheck %s -check-prefix=ALL \
17; RUN: -check-prefix=N32 -check-prefix=SOFT-FLOAT
18; RUN: llc -march=mips64el -mcpu=mips64 -mattr=+soft-float -target-abi=n32 \
19; RUN: -relocation-model=pic < %s | FileCheck %s -check-prefix=ALL \
20; RUN: -check-prefix=N32 -check-prefix=SOFT-FLOAT
Zlatko Buljanfba68932016-03-14 12:50:23 +000021
22; RUN: llc -march=mips64 -mcpu=mips64 -mattr=+soft-float -target-abi=n64 < %s \
23; RUN: | FileCheck %s -check-prefix=ALL -check-prefix=N64 \
24; RUN: -check-prefix=SOFT-FLOAT
25; RUN: llc -march=mips64el -mcpu=mips64 -mattr=+soft-float -target-abi=n64 < \
26; RUN: %s | FileCheck %s -check-prefix=ALL -check-prefix=N64 \
27; RUN: -check-prefix=SOFT-FLOAT
28
29@fp128 = global fp128 zeroinitializer
30
31define void @roundl_call(fp128 %value) {
32entry:
33; ALL-LABEL: roundl_call:
34; N32: lw $25, %call16(roundl)($gp)
35; N64: ld $25, %call16(roundl)($gp)
36
37; SOFT-FLOAT: sd $4, 8(${{[0-9]+}})
38; SOFT-FLOAT: sd $2, 0(${{[0-9]+}})
39
40; HARD-FLOAT: sdc1 $f2, 8(${{[0-9]+}})
41; HARD-FLOAT: sdc1 $f0, 0(${{[0-9]+}})
42
43 %call = call fp128 @roundl(fp128 %value)
44 store fp128 %call, fp128* @fp128
45 ret void
46}
47
48declare fp128 @roundl(fp128) nounwind readnone