From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Meissner To: baford@cs.utah.edu Cc: gas2@cygnus.com Subject: .align behavior in gas Date: Wed, 26 Apr 1995 07:03:00 -0000 Message-id: <199504261403.KAA00551@tiktok.cygnus.com> References: <199504252316.RAA09079@schirf.cs.utah.edu> <199504252316.RAA09079@schirf.cs.utah.edu> X-SW-Source: 1995/msg00076.html | In recent gas snapshots, it seems that for some i386 targets | (e.g. i386-mach, i386-gnu), gas interprets the .align directive | as a number of bytes; whereas for other targets (e.g. i386-linux) | it is interpreted as log2(nbytes). Has this always been the case? Yes. At least it was the case for i386-mach 6 years ago when we used that version of gas for the i486 on OSF/1. Elf assemblers interpretted as log2 bytes. I believe that in either case, gas is attempting to be compatible with the native assembler. | Are there any other directives that perform the same function but | have a consistent behavior? (I looked at gas/read.c, but couldn't | find anything.) If not, it would be very useful to have a new directive | called, say, '.balign' that always takes a number of bytes, and/or a new | directive called something like '.p2align' that always takes a power of | two. (I don't care what it is, as long as it's consistent!) This | should be trivial to do; just a matter of adding a new line or two | to read.c, right? Yep. -- Michael Meissner, Cygnus Support (East Coast) Suite 105, 48 Grove Street, Somerville, MA 02144, USA meissner@cygnus.com, 617-629-3016 (office), 617-629-3010 (fax)