Hi, I need some info in regard to 64-bit process' stack layout. 1) Below is a daigram of how I think the stack looks like. Can anyone tell me if this is correct, and if not, what's missing, etc.
2) As I understand stack bias serves two purposes: one - to allow trap handlers to distinguis between 64-bit and 32-bit register window. two - to allow access a larger stack area with 13-bit signed constants. Can someone show me an example how stack bias in a 64-bit process allows to access larger stack area vs. 32-bit process with no stack bias? Also, on the diagram below, there is an area of 2046 bytes between %sp and %sp+BIAS, what is that area used for? Is it reserved for something? Does is serve a purpose? ## High Address ## --------------------------------------------------------- %fp+BIAS <-- start of previous stack frame --------------------------------------------------------- %fp+BIAS-1 1st local variable --------------------------------------------------------- %fp+BIAS-N 2nd local variable, etc. --------------------------------------------------------- ~~~ variable size --------------------------------------------------------- %sp+BIAS+186 if needed, outgoing arguments 6 to ... --------------------------------------------------------- %sp+BIAS+138 space for arguments 0 to 5 (6*8=48 bytes) --------------------------------------------------------- %sp+BIAS+128 struct/union return pointer (8 bytes) --------------------------------------------------------- window save area for 16 registers %sp+BIAS (16*8=128 bytes) --------------------------------------------------------- | 2047-1 bytes %sp | --------------------------------------------------------- ## Low Address ## _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code