Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hp-pcd!hpfcso!mev From: mev@hpfcso.HP.COM (Mike Vermeulen) Newsgroups: comp.sys.hp Subject: Re: alloca() on the HP9000/300 Message-ID: <7370198@hpfcso.HP.COM> Date: 27 Aug 90 15:07:36 GMT References: <1455@tub.UUCP> Organization: Hewlett-Packard, Fort Collins, CO, USA Lines: 25 > Recent versions of GNU Emacs include both Gwyn's package and > assembly-level hacks for some specific machines, one of which is the 300 > series. The 300 series assembly alloca in the GNU emacs distribution works by: 1) bumping SP and 2) copying the old stack top so that all SP based addresses now refer to the copies of objects on top of the stack. > I believe it stops working with the HPUX 7.0 cc if you turn optimization up > past +O1 I believe it stopped working at HPUX 6.5/+O2 because the potential addition of the save/restore of floating point registers meant that a larger stack top had to be copied. Increasing the stack top size to 88 bytes (6 data registers, 4 address registers, 6 floating point registers), makes emacs work witho ut complaint. This alloca method is still fragile because if the peephole optimizer were to change frame pointer based addressing of locals/parameters to stack pointer based addressing; then the size of the stack top still may not be adequate when given too many locals/parameters. --mev standard disclaimer: this is not an official HP response.