add FABSS and FABSD

llvm-svn: 31012
This commit is contained in:
Rafael Espindola 2006-10-17 20:33:13 +00:00
parent c86485a397
commit fe0a9a6fe2
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)