This commit is contained in:
Sleigh-InSPECtor 2024-11-21 11:22:15 +10:30 committed by GitHub
commit 4e80a78909
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 25 additions and 3 deletions

View File

@ -56,7 +56,7 @@
:fcvt.s.d frd,frs1D,FRM is frs1D & frd & FRM & op0001=0x3 & op0204=0x4 & op0506=0x2 & funct7=0x20 & op2024=0x1
{
local tmp:4 = float2float(frs1D);
frd = zext(tmp);
fassignS(frd, tmp);
}

View File

@ -81,11 +81,33 @@ frs1: fr1519 is fr1519 { export fr1519; }
frs2: fr2024 is fr2024 { export fr2024; }
frs3: fr2731 is fr2731 { export fr2731; }
#TODO dest may be bad, might need an assign macro
#frdS: fr0711 is fr0711 { local tmp = fr0711:$(SFLEN); export tmp; }
@if (FPSIZE == "32")
frs1S: fr1519 is fr1519 { local tmp = fr1519:$(SFLEN); export tmp; }
frs2S: fr2024 is fr2024 { local tmp = fr2024:$(SFLEN); export tmp; }
frs3S: fr2731 is fr2731 { local tmp = fr2731:$(SFLEN); export tmp; }
@else
frs1S: fr1519 is fr1519 {
local tmp:$(SFLEN) = fr1519:$(SFLEN);
if (fr1519 s>> 32 == ~0) goto <FR1519NOTNAN>;
tmp = 0x7FC00000;
<FR1519NOTNAN>
export tmp;
}
frs2S: fr2024 is fr2024 {
local tmp:$(SFLEN) = fr2024:$(SFLEN);
if (fr2024 s>> 32 == ~0) goto <fr2024NOTNAN>;
tmp = 0x7FC00000;
<fr2024NOTNAN>
export tmp;
}
frs3S: fr2731 is fr2731 {
local tmp:$(SFLEN) = fr2731:$(SFLEN);
if (fr2731 s>> 32 == ~0) goto <fr2731NOTNAN>;
tmp = 0x7FC00000;
<fr2731NOTNAN>
export tmp;
}
@endif
@if ((FPSIZE == "64") || (FPSIZE == "128"))
#TODO dest may be bad, might need an assign macro