From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Haertel Message-Id: <200107130626.f6D6QPC01961@ducky.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] partial-Plan9ification question In-Reply-To: <20010713055804.8EB76199C0@mail.cse.psu.edu> Date: Thu, 12 Jul 2001 23:26:25 -0700 Topicbox-Message-UUID: c9060d38-eac9-11e9-9e20-41e7f4b1d025 >the plan 9 compilers are strictly caller-saves, for all architectures. other details vary. >on some platforms, a few useful constants are reserved in floating-point registers. > >gcc varies between architectures, and even from platform to platform, >but i think even on the x86 with hardly any registers, some registers are callee-saved. On x86 unix systems, eax, edx, and ecx are callee-saves, and the rest are caller-saves. eax and edx are used for return values. For AMD's forthcoming x86-64, the gcc folks actually had the luxury of being able to invent their own convention, rather than having to follow a convention dictated to them by existing tools and libraries. They did some studies and ended up choosing about half and half caller and callee saves. I think there are slightly more caller-saves registers. They also went to some effort to pass a few arguments in registers. The down side is their conventions appear hairy. Just to keep this from drifting off Plan 9 entirely: any luck on the 8c sign extension bug?