implement unsigned -> float casts
amd64 lacks an instruction for this so it has to be implemented with signed -> float casts: - Word casting is done by zero-extending the word to a long and then doing a regular signed cast. - Long casting is done by dividing by two with correct rounding if the highest bit is set and casting that to float, then adding 1 to mantissa with integer addition
This commit is contained in:
parent
b0d27d8a01
commit
74d022f975
6 changed files with 107 additions and 5 deletions
|
@ -91,7 +91,9 @@ static struct {
|
|||
{ Ostosi, Ka, "fcvtzs %=, %S0" },
|
||||
{ Odtosi, Ka, "fcvtzs %=, %D0" },
|
||||
{ Oswtof, Ka, "scvtf %=, %W0" },
|
||||
{ Ouwtof, Ka, "ucvtf %=, %W0" },
|
||||
{ Osltof, Ka, "scvtf %=, %L0" },
|
||||
{ Oultof, Ka, "ucvtf %=, %L0" },
|
||||
{ Ocall, Kw, "blr %L0" },
|
||||
|
||||
{ Oacmp, Ki, "cmp %0, %1" },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue