add FABSS and FABSD

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31012 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2006-10-17 20:33:13 +00:00
parent b7188b1684
commit c01c87c8ba
2 changed files with 24 additions and 0 deletions

View File

@ -288,6 +288,14 @@ def FNEGD : InstARM<(ops DFPRegs:$dst, DFPRegs:$src),
"fnegd $dst, $src",
[(set DFPRegs:$dst, (fneg DFPRegs:$src))]>;
def FABSS : InstARM<(ops FPRegs:$dst, FPRegs:$src),
"fabss $dst, $src",
[(set FPRegs:$dst, (fabs FPRegs:$src))]>;
def FABSD : InstARM<(ops DFPRegs:$dst, DFPRegs:$src),
"fabsd $dst, $src",
[(set DFPRegs:$dst, (fabs DFPRegs:$src))]>;
def FMULS : FPBinOp<"fmuls", fmul>;
def FMULD : DFPBinOp<"fmuld", fmul>;
def FDIVS : FPBinOp<"fdivs", fdiv>;

View File

@ -67,3 +67,19 @@ entry:
%tmp1 = div double %a, %b
ret double %tmp1
}
float %f11(float %a) {
entry:
%tmp1 = call float %fabsf(float %a)
ret float %tmp1
}
declare float %fabsf(float)
double %f12(double %a) {
entry:
%tmp1 = call double %fabs(double %a)
ret double %tmp1
}
declare double %fabs(double)