llvm.org GIT mirror llvm / 5aca927
implement FLDD git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30802 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 13 years ago
3 changed file(s) with 19 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
102102 def ldr : InstARM<(ops IntRegs:$dst, memri:$addr),
103103 "ldr $dst, $addr",
104104 [(set IntRegs:$dst, (load iaddr:$addr))]>;
105
106 def FLDS : InstARM<(ops FPRegs:$dst, IntRegs:$addr),
107 "flds $dst, $addr",
108 [(set FPRegs:$dst, (load IntRegs:$addr))]>;
109105
110106 def str : InstARM<(ops IntRegs:$src, memri:$addr),
111107 "str $src, $addr",
204200 def FMULD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b),
205201 "fmuld $dst, $a, $b",
206202 [(set DFPRegs:$dst, (fmul DFPRegs:$a, DFPRegs:$b))]>;
203
204
205 // Floating Point Load
206 def FLDS : InstARM<(ops FPRegs:$dst, IntRegs:$addr),
207 "flds $dst, $addr",
208 [(set FPRegs:$dst, (load IntRegs:$addr))]>;
209
210 def FLDD : InstARM<(ops DFPRegs:$dst, IntRegs:$addr),
211 "fldd $dst, $addr",
212 [(set DFPRegs:$dst, (load IntRegs:$addr))]>;
2828
2929 ----------------------------------------------------------
3030
31 add an offset to FLDS addressing mode
31 add an offset to FLDS/FLDD addressing mode
3232
3333 ----------------------------------------------------------
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 | wc -l | grep 3 &&
5 ; RUN: llvm-as < %s | llc -march=arm | grep fmrrd | wc -l | grep 4 &&
66 ; RUN: llvm-as < %s | llc -march=arm | grep fmdrr | wc -l | grep 2 &&
7 ; RUN: llvm-as < %s | llc -march=arm | grep fldd &&
78 ; RUN: llvm-as < %s | llc -march=arm | grep flds &&
89 ; RUN: llvm-as < %s | llc -march=arm | grep ".word.*1065353216"
910
1718 entry:
1819 %tmp = cast int %a to double ; [#uses=1]
1920 ret double %tmp
21 }
22
23 double %h(double* %v) {
24 entry:
25 %tmp = load double* %v ; [#uses=1]
26 ret double %tmp
2027 }
2128
2229 float %h() {