www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/07/04/08:47:15

Date: Sun, 4 Jul 1999 15:45:10 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: salvador <salvador AT inti DOT gov DOT ar>
cc: djgpp-workers AT delorie DOT com
Subject: Re: .align directives in libc.a
In-Reply-To: <377CB4A1.BB72A3EA@inti.gov.ar>
Message-ID: <Pine.SUN.3.91.990704154444.13333J-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Fri, 2 Jul 1999, salvador wrote:

> Yes, most processors uses 32, but that's also a waste if you routine
> is around 32 bytes  and you pad it with 60 bytes ;-) (30+30).

Gas can be told to not align more than a certain amount.  See below.

> I think Gas should have conditional aligment instructions, like:
> "align it if all the references are at 64 or more bytes of distance"

Gas from Binutils 2.8 and later can do this.  For example:

    .p2align 4,0x90,7

This will align on 16-byte boundaries, but only if the amount of
padding is less than 8 bytes.  Accidentally, this is what Intel
recommends for alignment of targets of jumps and function entry
points.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019