[M3commit] CVS Update: cm3
Jay Krell
jkrell at elego.de
Wed Mar 10 16:12:31 CET 2010
CVSROOT: /usr/cvs
Changes by: jkrell at birch. 10/03/10 16:12:31
Modified files:
cm3/m3-sys/m3back/src/: Stackx86.m3
Log message:
Now that I finally think enough, a nice little fix to the
register allocator to handle when a multi register operand
is partly in the right registers, but with the part mixed up.
It yields us at the end of Long__Insert this:
000003C6: 8B4D08 MOV ECX tv.65[_x]
000003C9: 8B450C MOV EAX tv.65[_x]+4
000003CC: 23CB AND ECX EBX
000003CE: 23C2 AND EAX EDX
000003D0: 0BCE OR ECX ESI
000003D2: 0BC7 OR EAX EDI
exit_proc Int.64
000003D4: 91 XCHG ECX EAX
000003D5: 8BD0 MOV EDX EAX
000003D7: E900000000 JMP L.39
end_procedure p.24[_Long__Insert]
again it'd be nice if we had ECX:EAX in the first place
instead of EAX:ECX, or even EDX:EAX.
And then, a roundabout but understandable way to eliminate
the unnecessary stores in insert/extract.
The extra checking under -debug forces to rearrange the
virtual stack and discard(), rather than just say dealloc_reg.
If "location" could be "nowhere" that might help, but
we have to chose between immediate, register, float stack, memory_variable.
And then Modula-3 WITH either because of how it behaves or
because of my confusion -- I think actually for reasons related
to "safety", we have to "reevaluate" a few times -- each time
we discard anything from the stack. Leading to a bit extra code
but it is fairly clear.
More information about the M3commit
mailing list