> > > Hello , > I am carrying out certain runtime optimisations on the code generated > by the Kaffe JIT on SPARC port..The version which I am using is 1.0b4.. > .. > For certain reasons I need to store some (additional)temporaries onto > the stack .. > But I have failed to understand the relationship between the > frame-pointer(%fp),stack-pointer(%sp) and the basicslot structure .. > ( basicslot is the base address of the memory area of size maxTemp + > maxStack + maxLocal) > > The only explanation which is given on the above is > in jit.h file in a dgm where %fp is pointing at the bottom of the stack > and sp at stack top.. > > -- But the SLOT2LOCALOFFSET is calculated as > -((WINDOWEXTRA + SLOTSIZE * ((maxLocal+maxStack+maxTemp) - (_n)))) .. > with > #define WINDOWSIZE (16*SLOTSIZE) > #define INARGSIZE (6*SLOTSIZE) > #define WINDOWEXTRA (5*SLOTSIZE) > > > The above mathematics I am not able to pick up given the diagram.... > > - Why WINDOWEXTRA is required ..? > If I remember it right, it's for window overflow traps. > I want to know where exactly %fp would be pointing to when %sp is the > top of stack.. > (I understand that using save instruction the callee stack would be > incremented by the amount framesize which is calculated in the same > jit.h file)But according to the sparc convention fp will become the > previous sp ..then how this is reflected in the above calculations . > > And secondly does Kaffe use sparc register window facility here.. Yes. It uses the "save" instruction. Basically, Kaffe uses exactly the frame layout that is conformant to the ABI (or so we hope) > > In my case I want 128 additional slots after maxTemp boundry is crossed > ...So > how do I access that using %fp. > It sounds to me what you really want is to increase maxTemp (?) > > Can anyone throw light on the above ...Any feedback would be a great > help.. > I recommend that you grab a copy of the Sparc ABI and instruction set manuals; it explains most of these things. See http://www.cs.utah.edu/~cs5470/current/links.html for some links. - Godmar