From: David P G. <gr...@us...> - 2002-01-20 22:06:43
|
> I've seen that a method compiled by OPT compiler may not buy a stack > frame. I was missed in the code to figure out all situations that may or > may not need a stack frame. I want to use a stack slot if the method has > any allocation site in it. It seems I do not have to worry about that > since the allocation site is a GC point, is it correct? Yes, the allocation sequence contains a call (on the off branch) and thus will not be a leaf method. Therefore the opt compiler will buy a stackframe for the method. > My second question to confirm the use of the scratch register ECX. Is it > safe to use it in method prologue and epilogue? > ( using ECX in > OPT_StackManager.insertNormalPrologue, and > OPT_StackManager.insertEpilogue > ) ECX does not contain a live value on entry or exit from a method, so in that sense it is fine to use. The current prologue sequence does use ECX for a few purposes, but as long as you fit in your new uses around the already existing ones, it should be fine. --dave |