implement float -> unsigned casts

amd64 lacks instruction for this so it has to be implemented with
float -> signed casts. The approach is borrowed from llvm.
This commit is contained in:
Bor Grošelj Simić 2022-01-28 02:06:18 +01:00 committed by Quentin Carbonneaux
parent 74d022f975
commit 3964574a83
6 changed files with 93 additions and 6 deletions

View file

@ -89,7 +89,9 @@ static struct {
{ Ocast, Ks, "fmov %=, %W0" },
{ Ocast, Kd, "fmov %=, %L0" },
{ Ostosi, Ka, "fcvtzs %=, %S0" },
{ Ostoui, Ka, "fcvtzu %=, %S0" },
{ Odtosi, Ka, "fcvtzs %=, %D0" },
{ Odtoui, Ka, "fcvtzu %=, %D0" },
{ Oswtof, Ka, "scvtf %=, %W0" },
{ Ouwtof, Ka, "ucvtf %=, %W0" },
{ Osltof, Ka, "scvtf %=, %L0" },