mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 17:33:24 +00:00
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:
parent
b7188b1684
commit
c01c87c8ba
@ -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>;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user