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

add fp sub

llvm-svn: 30859
This commit is contained in:
Rafael Espindola 2006-10-10 19:35:01 +00:00
parent 27d68a3c22
commit 0112351e9a
2 changed files with 24 additions and 4 deletions

View File

@ -235,6 +235,14 @@ def FADDD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b),
"faddd $dst, $a, $b",
[(set DFPRegs:$dst, (fadd DFPRegs:$a, DFPRegs:$b))]>;
def FSUBS : InstARM<(ops FPRegs:$dst, FPRegs:$a, FPRegs:$b),
"fsubs $dst, $a, $b",
[(set FPRegs:$dst, (fsub FPRegs:$a, FPRegs:$b))]>;
def FSUBD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b),
"fsubd $dst, $a, $b",
[(set DFPRegs:$dst, (fsub DFPRegs:$a, DFPRegs:$b))]>;
def FMULS : InstARM<(ops FPRegs:$dst, FPRegs:$a, FPRegs:$b),
"fmuls $dst, $a, $b",
[(set FPRegs:$dst, (fmul FPRegs:$a, FPRegs:$b))]>;

View File

@ -4,26 +4,38 @@
; RUN: llvm-as < %s | llc -march=arm | grep fmuls &&
; RUN: llvm-as < %s | llc -march=arm | grep fmuld
float %f(float %a, float %b) {
float %f1(float %a, float %b) {
entry:
%tmp = add float %a, %b
ret float %tmp
}
double %g(double %a, double %b) {
double %f2(double %a, double %b) {
entry:
%tmp = add double %a, %b
ret double %tmp
}
float %h(float %a, float %b) {
float %f3(float %a, float %b) {
entry:
%tmp = mul float %a, %b
ret float %tmp
}
double %i(double %a, double %b) {
double %f4(double %a, double %b) {
entry:
%tmp = mul double %a, %b
ret double %tmp
}
float %f5(float %a, float %b) {
entry:
%tmp = sub float %a, %b
ret float %tmp
}
double %f6(double %a, double %b) {
entry:
%tmp = sub double %a, %b
ret double %tmp
}