From: Dave R. <ld...@dr...> - 2005-01-21 05:14:09
|
I had a bit of time to look at this tonight. Took a look at the disassembly of SB-INT:MIX versus the repl MIX. The thing that stuck out was that SB-INT:MIX doesn't seem to use register EBX during its computation. It's used for something at the start of the function, but then basically isn't touched all the way through. Given that this function uses three intermediate values, it actually needs four registers to work with. One possible explanation is that without EBX it probably has to move things to stack temporaries. What are the register usage conventions for the x86 port? Perhaps the cross compiler is reserving a register for something and that's blowing the register allocator out. Also, what are the argument and return value passing conventions? More below... On Wed, 2005-01-19 at 20:48 +0300, Alexey Dejneka wrote: > There are some differences in processing of "top-level" functions by > target COMPILE and cross COMPILE-FILE on the one hand and by target > COMPILE-FILE on the other. Partcularly the former perform > LET-conversion of a main entry into a XEP; the latter does not. I'm probably not understanding LET conversion right, but wouldn't this make the COMPILE and cross COMPILE-FILE faster (but I'm seeing the reverse of that)? > Some optimizations, mostly related to floating point, are really > disabled during cross-compilation, but in this case I'd say that the > cross-compiler (at least, its IR1 part) optimizes more. > > In fact, I don't understand why the cross version is worse; Exactly. > I'm going > to look at it. Thanks. -- Dave Roberts <ld...@dr...> |