Subject: Re: stack growth
To: None <fredette@theory.lcs.mit.edu, tech-kern@netbsd.org>
From: None <eeh@netbsd.org>
List: tech-kern
Date: 06/12/2002 16:22:59
| Hi. Re: http://mail-index.netbsd.org/tech-kern/2002/02/03/0002.html ,
| about STACK_GROW, STACK_SHRINK, STACK_ALIGN, STACK_ALLOC and STACK_MAX.
|
| At least gdb likes to define its own (and different) STACK_ALIGN.
| Should I append __ to these macro names or wrap them in _KERNEL?
Should we consider moving the stack manipulation into MD code?
For instance, sparcs have a stack pointer bias of 2047 for 64-bit
stacks but no bias for 32-bit code, so you need to conditionally
add or subtract the bias properly when manipulating the stack
pointer or stack objects. Likewise 32-bit stacks require 8-byte
alignment and 64-bit stacks require 16-byte alignment. It's not
immediately apparent how your macros would address those issues.
Eduardo