llvm.org GIT mirror llvm / cd71da5
Implement floating point constants git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30704 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 13 years ago
4 changed file(s) with 19 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
5959
6060 setOperationAction(ISD::VASTART, MVT::Other, Custom);
6161 setOperationAction(ISD::VAEND, MVT::Other, Expand);
62
63 setOperationAction(ISD::ConstantFP, MVT::f64, Expand);
64 setOperationAction(ISD::ConstantFP, MVT::f32, Expand);
6265
6366 setSchedulingPreference(SchedulingForRegPressure);
6467 computeRegisterProperties();
9999 "ldr $dst, $addr",
100100 [(set IntRegs:$dst, (load iaddr:$addr))]>;
101101
102 def FLDS : InstARM<(ops FPRegs:$dst, IntRegs:$addr),
103 "flds $dst, $addr",
104 [(set FPRegs:$dst, (load IntRegs:$addr))]>;
105
102106 def str : InstARM<(ops IntRegs:$src, memri:$addr),
103107 "str $src, $addr",
104108 [(store IntRegs:$src, iaddr:$addr)]>;
2727 add r0, r1, r0
2828
2929 ----------------------------------------------------------
30
31 add an offset to FLDS addressing mode
32
33 ----------------------------------------------------------
22 ; RUN: llvm-as < %s | llc -march=arm | grep fsitos &&
33 ; RUN: llvm-as < %s | llc -march=arm | grep fmrs &&
44 ; RUN: llvm-as < %s | llc -march=arm | grep fsitod &&
5 ; RUN: llvm-as < %s | llc -march=arm | grep fmrrd
5 ; RUN: llvm-as < %s | llc -march=arm | grep fmrrd &&
6 ; RUN: llvm-as < %s | llc -march=arm | grep flds &&
7 ; RUN: llvm-as < %s | llc -march=arm | grep ".word.*1065353216"
68
79 float %f(int %a) {
810 entry:
1517 %tmp = cast int %a to double ; [#uses=1]
1618 ret double %tmp
1719 }
20
21 float %h() {
22 entry:
23 ret float 1.000000e+00
24 }