tricore: implement ftou

Implemented based on

    TriCore® 1 User’s Manual, V1.3.8, January 2008
    Volume 2 Instruction Set V1.3 & V1.3.1 Architecture
This commit is contained in:
Serge Bazanski 2023-12-27 03:53:36 +01:00
parent fa8eff4d33
commit 9099415cca

View File

@ -2503,9 +2503,21 @@ SC: [a10]const0815Z10zz is PCPMode=0 & a10 & const0815Z10zz & op0003=8 & op0404=
# FTOU D[c], D[a] (RR)
:ftou Rd2831,Rd0811 is PCPMode=0 & Rd0811 & op0007=0x4b & op1215=0x0 ; Rd2831 & op1627=0x121
{
#TODO float
local res:4 = 0;
# 0.0
local min:4 = 0;
# 2**32-1
local max:4 = 1333788672;
if (nan(Rd0811)) goto <done>;
if (Rd0811 f< min) goto <done>;
res = 0xffffffff;
if (Rd0811 f>= max) goto <done>;
res = trunc(Rd0811);
<done>
Rd2831 = zext(res);
#TODO flags
#TODO unsigned
}
@endif