1 ; RUN: llc < %s -march=sparc -relocation-model=static -code-model=small | FileCheck --check-prefix=abs32 %s 2 ; RUN: llc < %s -march=sparcv9 -relocation-model=static -code-model=small | FileCheck --check-prefix=abs32 %s 3 ; RUN: llc < %s -march=sparcv9 -relocation-model=static -code-model=medium | FileCheck --check-prefix=abs44 %s 4 ; RUN: llc < %s -march=sparcv9 -relocation-model=static -code-model=large | FileCheck --check-prefix=abs64 %s 5 ; RUN: llc < %s -march=sparc -relocation-model=pic -code-model=medium | FileCheck --check-prefix=v8pic32 %s 6 ; RUN: llc < %s -march=sparcv9 -relocation-model=pic -code-model=medium | FileCheck --check-prefix=v9pic32 %s 7 8 define float @floatCP() { 9 entry: 10 ret float 1.000000e+00 11 } 12 13 ; abs32: floatCP 14 ; abs32: sethi %hi(.LCPI0_0), %[[R:[gilo][0-7]]] 15 ; abs32: retl 16 ; abs32: ld [%[[R]]+%lo(.LCPI0_0)], %f 17 18 19 ; abs44: floatCP 20 ; abs44: sethi %h44(.LCPI0_0), %[[R1:[gilo][0-7]]] 21 ; abs44: add %[[R1]], %m44(.LCPI0_0), %[[R2:[gilo][0-7]]] 22 ; abs44: sllx %[[R2]], 12, %[[R3:[gilo][0-7]]] 23 ; abs44: retl 24 ; abs44: ld [%[[R3]]+%l44(.LCPI0_0)], %f0 25 26 27 ; abs64: floatCP 28 ; abs64: sethi %hi(.LCPI0_0), %[[R1:[gilo][0-7]]] 29 ; abs64: add %[[R1]], %lo(.LCPI0_0), %[[R2:[gilo][0-7]]] 30 ; abs64: sethi %hh(.LCPI0_0), %[[R3:[gilo][0-7]]] 31 ; abs64: add %[[R3]], %hm(.LCPI0_0), %[[R4:[gilo][0-7]]] 32 ; abs64: sllx %[[R4]], 32, %[[R5:[gilo][0-7]]] 33 ; abs64: retl 34 ; abs64: ld [%[[R5]]+%[[R2]]], %f0 35 36 37 ; v8pic32: floatCP 38 ; v8pic32: _GLOBAL_OFFSET_TABLE_ 39 ; v8pic32: sethi %hi(.LCPI0_0), %[[R1:[gilo][0-7]]] 40 ; v8pic32: add %[[R1]], %lo(.LCPI0_0), %[[Goffs:[gilo][0-7]]] 41 ; v8pic32: ld [%[[GOT:[gilo][0-7]]]+%[[Goffs]]], %[[Gaddr:[gilo][0-7]]] 42 ; v8pic32: ld [%[[Gaddr]]], %f0 43 ; v8pic32: ret 44 ; v8pic32: restore 45 46 47 48 ; v9pic32: floatCP 49 ; v9pic32: _GLOBAL_OFFSET_TABLE_ 50 ; v9pic32: sethi %hi(.LCPI0_0), %[[R1:[gilo][0-7]]] 51 ; v9pic32: add %[[R1]], %lo(.LCPI0_0), %[[Goffs:[gilo][0-7]]] 52 ; v9pic32: ldx [%[[GOT:[gilo][0-7]]]+%[[Goffs]]], %[[Gaddr:[gilo][0-7]]] 53 ; v9pic32: ld [%[[Gaddr]]], %f0 54 ; v9pic32: ret 55 ; v9pic32: restore 56 57 58