mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-23 05:29:23 +00:00
Add encodings for VNMUL[SD].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
caa3d467ab
commit
5a1fd8cf68
@ -239,13 +239,15 @@ def VMULS : ASbIn_Encode<0b11100, 0b10, 0, 0,
|
|||||||
IIC_fpMUL32, "vmul", ".f32\t$Sd, $Sn, $Sm",
|
IIC_fpMUL32, "vmul", ".f32\t$Sd, $Sn, $Sm",
|
||||||
[(set SPR:$Sd, (fmul SPR:$Sn, SPR:$Sm))]>;
|
[(set SPR:$Sd, (fmul SPR:$Sn, SPR:$Sm))]>;
|
||||||
|
|
||||||
def VNMULD : ADbI<0b11100, 0b10, 1, 0, (outs DPR:$dst), (ins DPR:$a, DPR:$b),
|
def VNMULD : ADbI_Encode<0b11100, 0b10, 1, 0,
|
||||||
IIC_fpMUL64, "vnmul", ".f64\t$dst, $a, $b",
|
(outs DPR:$Dd), (ins DPR:$Dn, DPR:$Dm),
|
||||||
[(set DPR:$dst, (fneg (fmul DPR:$a, (f64 DPR:$b))))]>;
|
IIC_fpMUL64, "vnmul", ".f64\t$Dd, $Dn, $Dm",
|
||||||
|
[(set DPR:$Dd, (fneg (fmul DPR:$Dn, (f64 DPR:$Dm))))]>;
|
||||||
|
|
||||||
def VNMULS : ASbI<0b11100, 0b10, 1, 0, (outs SPR:$dst), (ins SPR:$a, SPR:$b),
|
def VNMULS : ASbI_Encode<0b11100, 0b10, 1, 0,
|
||||||
IIC_fpMUL32, "vnmul", ".f32\t$dst, $a, $b",
|
(outs SPR:$Sd), (ins SPR:$Sn, SPR:$Sm),
|
||||||
[(set SPR:$dst, (fneg (fmul SPR:$a, SPR:$b)))]>;
|
IIC_fpMUL32, "vnmul", ".f32\t$Sd, $Sn, $Sm",
|
||||||
|
[(set SPR:$Sd, (fneg (fmul SPR:$Sn, SPR:$Sm)))]>;
|
||||||
|
|
||||||
// Match reassociated forms only if not sign dependent rounding.
|
// Match reassociated forms only if not sign dependent rounding.
|
||||||
def : Pat<(fmul (fneg DPR:$a), (f64 DPR:$b)),
|
def : Pat<(fmul (fneg DPR:$a), (f64 DPR:$b)),
|
||||||
|
@ -70,6 +70,25 @@ entry:
|
|||||||
ret float %mul
|
ret float %mul
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define double @f9(double %a, double %b) nounwind readnone {
|
||||||
|
entry:
|
||||||
|
; CHECK: f9
|
||||||
|
; CHECK: vnmul.f64 d16, d17, d16 @ encoding: [0xe0,0x0b,0x61,0xee]
|
||||||
|
%mul = fmul double %a, %b
|
||||||
|
%sub = fsub double -0.000000e+00, %mul
|
||||||
|
ret double %sub
|
||||||
|
}
|
||||||
|
|
||||||
|
define void @f10(float %a, float %b, float* %c) nounwind readnone {
|
||||||
|
entry:
|
||||||
|
; CHECK: f10
|
||||||
|
; CHECK: vnmul.f32 s0, s1, s0 @ encoding: [0xc0,0x0a,0x20,0xee]
|
||||||
|
%mul = fmul float %a, %b
|
||||||
|
%sub = fsub float -0.000000e+00, %mul
|
||||||
|
store float %sub, float* %c, align 4
|
||||||
|
ret void
|
||||||
|
}
|
||||||
|
|
||||||
define i1 @f100(double %a, double %b) nounwind readnone {
|
define i1 @f100(double %a, double %b) nounwind readnone {
|
||||||
entry:
|
entry:
|
||||||
; CHECK: f100
|
; CHECK: f100
|
||||||
|
Loading…
x
Reference in New Issue
Block a user