public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bruno Haible <haible@ilog.fr>
To: egcs@cygnus.com, Ian Lance Taylor <ian@cygnus.com>
Subject: Reducing eh_frame table size
Date: Mon, 17 Nov 1997 13:49:00 -0000	[thread overview]
Message-ID: <199711172039.VAA16642@halles.ilog.fr> (raw)

Hi,

The size of exception handling tables emitted by g++ in DWARF2 format
could be reduced by about 20% if the following modification was made in
the assembler, for the targets supporting the ELF object format.

A new pseudo-opcode ".dwarf_advance" is introduced. Its argument its
a difference between two labels in the same segmemt (like the 2nd argument
of the ".size" pseudo-op). It expands as follows:

        .dwarf_advance Label2-Label1
==>
        .if Label2-Label1 < 0x10000
        .if Label2-Label1 < 0x100
        .if Label2-Label1 < 0x40
        .byte   Label2-Label1+0x40
        .else
        .byte   0x2
        .byte   Label2-Label1
        .endif
        .else
        .byte   0x3
        .2byte  Label2-Label1
        .endif
        .else
        .byte   0x4
        .4byte  Label2-Label1
        .endif

Unfortunately, the .if expansion doesn't work as is, because Label2-Label1
is not a constant expression; its value is only at the end of the assembly.
One can assume that Label1 and Label2 are in the same segment, and that the
segment containing the .dwarf_advance op is different from this.

As I see it, gas would need just a few modifications to write.c:relax_segment()
in order to support this.

Can we hope that this will be implemented in gas in the near future?

Bruno

             reply	other threads:[~1997-11-17 13:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-17 13:49 Bruno Haible [this message]
1997-11-17 14:21 ` Ian Lance Taylor
1997-11-17 14:21 Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199711172039.VAA16642@halles.ilog.fr \
    --to=haible@ilog.fr \
    --cc=egcs@cygnus.com \
    --cc=ian@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).