From: Gwenole B. <gbe...@ma...> - 2002-10-02 18:46:11
|
Hi, >> 001: e9c5 565147 BFEXTU > > Interesting that this gets used so much. It's probably just a benchmark > thing, > not worth bothering about. Yes, I looked again at the generated code for the interpreter and that's awful. :-/ >> 018: a873 62307 ILLEGAL > > SetPort()... As a general note, what about a native implementation of the trap dispatcher? To me, A-Traps look rather like function call to perform a certain operation. That is, we are good at chaining translated blocks or even inlining them if no event came in the trace (spcflags), so that would be a pity to have to save everything and possibly go the slow interpreter way. Well, I don't know how much time is really spent in the traps dispatcher but I believe that a native implementation could be beneficial for non-JIT targets as well. Did MACE people/guy have something in that direction yet? >> For those, I don't remember whether the OS is supposed to save >> registers >> itself or not. > > According to my notes, traps >=A800 save all registers. Traps A000..A7FF > save at least d3-d7/a3-a6, sometimes more (I don't remember whether > there > are any clear API conventions here; e.g. there is code that expects > A0BD (vCacheFlush) to save all registers). Just to make sure, traps >= 0xA800 are Toolbox traps thus residing in ROM? Those pass arguments through stack if I remember correctly. And those don't actually peek at values in registers but use them as scratch data for whatever operation, thus saving them prior to any use, right? i.e. that would imply we wouldn't have to bother spilling values in host registers back to their home. Hmm, some more TODO? :-) Bye, Gwenole. |