1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

implement FLDD

llvm-svn: 30802
This commit is contained in:
Rafael Espindola 2006-10-07 14:03:39 +00:00
parent b8ce0f8bbd
commit 90a24709fb
3 changed files with 19 additions and 6 deletions

View File

@ -104,10 +104,6 @@ def ldr : InstARM<(ops IntRegs:$dst, memri:$addr),
"ldr $dst, $addr",
[(set IntRegs:$dst, (load iaddr:$addr))]>;
def FLDS : InstARM<(ops FPRegs:$dst, IntRegs:$addr),
"flds $dst, $addr",
[(set FPRegs:$dst, (load IntRegs:$addr))]>;
def str : InstARM<(ops IntRegs:$src, memri:$addr),
"str $src, $addr",
[(store IntRegs:$src, iaddr:$addr)]>;
@ -205,3 +201,13 @@ def FMULS : InstARM<(ops FPRegs:$dst, FPRegs:$a, FPRegs:$b),
def FMULD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b),
"fmuld $dst, $a, $b",
[(set DFPRegs:$dst, (fmul DFPRegs:$a, DFPRegs:$b))]>;
// Floating Point Load
def FLDS : InstARM<(ops FPRegs:$dst, IntRegs:$addr),
"flds $dst, $addr",
[(set FPRegs:$dst, (load IntRegs:$addr))]>;
def FLDD : InstARM<(ops DFPRegs:$dst, IntRegs:$addr),
"fldd $dst, $addr",
[(set DFPRegs:$dst, (load IntRegs:$addr))]>;

View File

@ -29,6 +29,6 @@ add r0, r1, r0
----------------------------------------------------------
add an offset to FLDS addressing mode
add an offset to FLDS/FLDD addressing mode
----------------------------------------------------------

View File

@ -3,8 +3,9 @@
; RUN: llvm-as < %s | llc -march=arm | grep fsitos &&
; RUN: llvm-as < %s | llc -march=arm | grep fmrs &&
; RUN: llvm-as < %s | llc -march=arm | grep fsitod &&
; RUN: llvm-as < %s | llc -march=arm | grep fmrrd | wc -l | grep 3 &&
; RUN: llvm-as < %s | llc -march=arm | grep fmrrd | wc -l | grep 4 &&
; RUN: llvm-as < %s | llc -march=arm | grep fmdrr | wc -l | grep 2 &&
; RUN: llvm-as < %s | llc -march=arm | grep fldd &&
; RUN: llvm-as < %s | llc -march=arm | grep flds &&
; RUN: llvm-as < %s | llc -march=arm | grep ".word.*1065353216"
@ -20,6 +21,12 @@ entry:
ret double %tmp
}
double %h(double* %v) {
entry:
%tmp = load double* %v ; <double> [#uses=1]
ret double %tmp
}
float %h() {
entry:
ret float 1.000000e+00