Path: utzoo!attcan!uunet!ccicpg!cci632!lab From: lab@cci632.UUCP (Leonard A. Bauer) Newsgroups: comp.sys.intel Subject: Re: function start address allignment Keywords: word alignment Message-ID: <27078@cci632.UUCP> Date: 12 Mar 89 17:05:42 GMT References: <311@ssp2.idca.tds.philips.nl> <687@pcrat.UUCP> <3018@uvacs.cs.Virginia.EDU> Reply-To: lab@op632.UUCP (Leonard A. Bauer) Organization: CCI, Communications Systems Division, Rochester, NY Lines: 17 In article <3018@uvacs.cs.Virginia.EDU> mac@uvacs.cs.Virginia.EDU (Alex Colvin) writes: >> >start of a function in a c program is always word alligned. If >> >My question is: Is this general for compilers/assemblers in unix environment > >For the same reason, it's often a good >practice to use a NOP where necessary to word align any jump target. >Similarly, words should be word aligned. If you've got a 32-bit memory >interface (and the high-end UN*X 382s may), you may want dword alignment, >so you pick up the first 4 bytes in one fetch. Rather than using NOP's and performing mental masturbation, use the 'WORD' and 'DWORD' compile/assemble directives and let the assembler do the work for which it is intended. Len Bauer lab@ccird2.UUCP Rochester NY