I need to test 32-bit subtract constant to see if it's correct. Seems OK during code inspection.
I also need to look at multiply, it doesn't seem to be handling type conversion and register allocation correctly.
Of course, divide will likely be broken too...
32-bit negate also looks shady.
int-to-long conversion: (r1 -> r2, r3)
mov r1, r3 4+14 2
seto r2 4+10 2
jlt $+4 4+(10..8) 2
clr r2 (0..4+10) 2
Total: (46..58) 8
Looks costly, let's try this:
mov r1, r3 4+14 2
mov r1, r2 4+14 2
sar r2, 15 4+12+2*15 2
Total: 82 6
Ugh, no. I'm sticking to what I had before.
So, after all that testing, I'm left with four problems (32-bit subtract, 32-bit negate, multiply, divide). That seems doable.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment