Path: utzoo!attcan!uunet!wyse!mips!mash From: mash@mips.COM (John Mashey) Newsgroups: comp.sys.m68k Subject: Re: quad-aligning the 68020 stack Keywords: 68020 stack longword alignment quad Message-ID: <2727@winchester.mips.COM> Date: 7 Aug 88 01:28:57 GMT References: <2194@uhccux.uhcc.hawaii.edu> <4431@cbmvax.UUCP> Reply-To: mash@winchester.UUCP (John Mashey) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 20 In article <4431@cbmvax.UUCP> ditto@cbmvax.UUCP (Mike "Ford" Ditto) writes: .... >For real 32-bit 68020 systems, I am a firm believer in keeping all >stacks and structures longword aligned at all times. This means the >C compiler should promote all function arguments to a multiple of 32 >bits and pad structures so that longword elements are at aligned >offsets. Malloc() and similar functions should return longword aligned >storage.... Right philosophy, but consider thinking further ahead to 64-bit objects, at least. Structures should be aligned to doublewords, especially, or you may later run into the same problem that 68K compilers did, if they started aligning longwords on 16-bit boundaries, and then had incompatible structures when shifting to 68020-preferred alginment, or to RISC machines that really want objects aligned properly. -- -john mashey DISCLAIMER: UUCP: {ames,decwrl,prls,pyramid}!mips!mash OR mash@mips.com DDD: 408-991-0253 or 408-720-1700, x253 USPS: MIPS Computer Systems, 930 E. Arques, Sunnyvale, CA 94086