Closed pd0wm closed 4 years ago
Willem, thanks a lot for your work!
Unfortunately, firmware on which I checked my work (vehicle engine controller), have only few functions with float-point operations. I will try to check your enhancements later.
Some questions:
xRs2731 = (11,15) signed
opcode? As I know, signed/unsigned is not a propery of variable (or register), it determined by operation.fcond
and fcbit
means something else...What's your email? I'll send you a few snippets.
Those signed values still need to be removed, they are currently unused. When I added them I thought that was how you signaled that the register needed to be treated as signed, but that is not true.
See page 343 for the explanation of fcond
and fcbit
for the CMPF.S
instruction. fcond
is the type of comparison (less than, equal, etc.). You can store the result in any of 8 slots of FPSR
. This fcbit
determine which result slot to use. After the comparison you use the TRFSR fcbit
instruction to move the result from one of the 8 slots into the zero flag. Then you can use the normal jump instructions.
This PR wasn't really ready to be merged yet, but I'll submit another one to your floating_point
branch to do some cleanup.
This is very much work in progress, but wanted to let you know I'm also working on this.
This is the first time writing a sleigh definition, so let me know if you have any comments/tips!