Closed elnv closed 4 years ago
Hm. This assembly file has more than 1/2 million lines. A small example would have been more useful...
I found a minimal example:
and!! (load1 d) 0x1
exit
d:
data1 [2]
### EXPECTED STACK:
###
### 0
Until I have fixed this bug, you should use the -n / --noopt option.
We have found a bug when executing some codes using the ivm as-run utility. It works correctly by disabling the optimization (--noopt).
Attached you can find a snapshot showing three executions. The first one is the wrong execution without "--noopt". The second is the right one with "--noopt". The third one is execution on the host, which is the reference.
Observe the numerical values printed by the program.
The code is one of the examples in the compiler project: /tests/examples/12-floats.c
We attach the assembly file. 12-floats.zip