mirror of
https://github.com/frida/tinycc
synced 2024-12-25 06:26:49 +03:00
Fix float conversion in arm64 backend
This commit is contained in:
parent
f420259ee5
commit
25781e4552
@ -1775,7 +1775,7 @@ ST_FUNC void gen_cvt_ftoi(int t)
|
||||
|
||||
ST_FUNC void gen_cvt_ftof(int t)
|
||||
{
|
||||
int f = vtop[0].type.t;
|
||||
int f = vtop[0].type.t & VT_BTYPE;
|
||||
assert(t == VT_FLOAT || t == VT_DOUBLE || t == VT_LDOUBLE);
|
||||
assert(f == VT_FLOAT || f == VT_DOUBLE || f == VT_LDOUBLE);
|
||||
if (t == f)
|
||||
|
@ -1,6 +1,19 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
float fd;
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
// was an internal tcc compiler error with arm64 backend until 2019-11-08
|
||||
if (fd < 5.5) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
// variables
|
||||
|
Loading…
Reference in New Issue
Block a user