delorie.com/archives/browse.cgi | search |
Delivered-To: | listarch-cygwin AT sourceware DOT cygnus DOT com |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
Message-ID: | <19990208223512.36113@murlibobo.cs.mu.OZ.AU> |
Date: | Mon, 8 Feb 1999 22:35:12 +1100 |
From: | Fergus Henderson <fjh AT cs DOT mu DOT OZ DOT AU> |
To: | OSKAR BERRETEAGA <oskarb AT fagorautomation DOT es> |
Cc: | "'cygwin AT sourceware DOT cygnus DOT com'" <cygwin AT sourceware DOT cygnus DOT com> |
Subject: | Re: Double alignment trouble |
References: | <c=ES%a=_%p=FAGOR?AUTOMATION%l=NTCORREO-990208092125Z-1442 AT ntcorreo DOT fagorautomation DOT es> |
Mime-Version: | 1.0 |
X-Mailer: | Mutt 0.88 |
In-Reply-To: | <c=ES%a=_%p=FAGOR?AUTOMATION%l=NTCORREO-990208092125Z-1442@ntcorreo.fagorautomation.es>; from OSKAR BERRETEAGA on Mon, Feb 08, 1999 at 10:21:25AM +0100 |
On 08-Feb-1999, OSKAR BERRETEAGA <oskarb AT fagorautomation DOT es> wrote: > > I've been trying to change the way gcc aligns double type variables but > with no possitive result. The newsgroup gnu.gcc.help might be a more appropriate forum for this question. > These are the options I've set with gcc: -malign-double (alone or with > one of the following -march='pentium' -m386 -m486) and the full command > line is: gcc -c test.c -malign-double -o test.o `-malign-double' is the default. If you want to disable it, you need to use `-mno-align-double'. However, this will typically have a negative effect on performance, and may cause binary compatibility problems, so I don't recommend using this option. > I've even used the __attribute__((aligned(2))) for both the struct and > the double var but, again, it seems it has no effect on double > alignment. Please RTFM. The documentation of the `aligned' attribute is quite clear: | This attribute specifies a minimum alignment ... ... ^^^^^^^^ | The `aligned' attribute can only increase the alignment; | but you can decrease it by specifying `packed' as well. -- Fergus Henderson <fjh AT cs DOT mu DOT oz DOT au> | "Binaries may die WWW: <http://www.cs.mu.oz.au/~fjh> | but source code lives forever" PGP: finger fjh AT 128 DOT 250 DOT 37 DOT 3 | -- leaked Microsoft memo. -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |