From: David P G. <gr...@us...> - 2002-01-22 16:27:22
|
Steve and I rewrote this code in late November. I believe in the current system you would not have this problem (redefining the two constants in VM_StackFrameLayoutConstants should now be sufficient to add another header word below the framepointer in an IA32 stackframe....let us know if in fact it isn't). --dave |---------+--------------------------------------------------------> | | Feng QIAN <fq...@sa...> | | | Sent by: | | | jik...@ww...uthbury.| | | usf.ibm.com | | | | | | | | | 01/21/2002 09:45 PM | | | Please respond to jikesrvm-researchers | | | | |---------+--------------------------------------------------------> >------------------------------------------------------------------------------------------| | | | To: <jik...@ww...> | | cc: | | Subject: Re: [Jikesrvm-researchers] One more question in OPT_StackManager.java | | | | | >------------------------------------------------------------------------------------------| I got it, and actually I found that it is pretty tricky to add more stuff in the prologue, the method assumes that the difference of ESP and EBP after "mir_esp_prologue" is one word for CMID, but my code used another slot, so in addition to increase the STACKFRAME_BODY_OFFSET, the line in OPT_StackManager also needs adjustment. Probably that's only my case requires such changes. private void rewriteStackLocations(OPT_BasicBlock bb) { OPT_Register ESP = ir.regpool.getPhysicalRegisterSet().getESP(); for (Enumeration e = bb.forwardInstrEnumerator(); e.hasMoreElements();) { OPT_Instruction s = (OPT_Instruction)e.nextElement(); // After the prologue, ESP is set to the top of the frame. if (s.operator() == MIR_ESP_PROLOGUE) { ESPOffset = getFrameFixedSize() - STACKFRAME_ESP_FP_OFFSET; // ESPOffset = getFrameFixedSize() - WORDSIZE; continue; } New prologue: -1 ia32_push ebp(int) -1 ia32_mov ebp(int) = esp(int) -1 ia32_push 6474 -1 ia32_push -1 -1 mir_esp_prologue Cheers, ==================== Feng Qian fq...@sa... On Mon, 21 Jan 2002, David P Grove wrote: > > If you change STACKFRAME_HEADER_SIZE, you also need to change > STACKFRAME_BODY_OFFSET. Steve and I think that is probably what is going > wrong (STACKFRAME_BODY_OFFSET is used in VM_OptGCMapiterator, so if you > changed one but not the other than the first GC with an opt compiled frame > on a thread stack is very likely to die). > > --dave > > _______________________________________________ > Jikesrvm-researchers mailing list > Jik...@ww... > http://www-124.ibm.com/developerworks/oss/mailman/listinfo/jikesrvm-researchers > _______________________________________________ Jikesrvm-researchers mailing list Jik...@ww... http://www-124.ibm.com/developerworks/oss/mailman/listinfo/jikesrvm-researchers |