delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/24/05:07:30

Date: Thu, 24 Jun 1999 12:04:50 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Daniel Eaton <deaton AT direct DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: Assembler/SIGSEGV questions
In-Reply-To: <VyUb3.11$G81.27@newsgate.direct.ca>
Message-ID: <Pine.SUN.3.91.990624120432.25071J-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 22 Jun 1999, Daniel Eaton wrote:

> I. Does GAS recognize MMX opcodes/registers?

It does, in version 2.8 and later.

> II. How do I detect SIGSEGV signals and have my program execute some free()s
> before the signal is handled (and the program crashes).

Use the library function `signal' to install a handler for SIGSEGV,
and do whatever it takes to orderly shut down the program from the
handler.  You need to make sure the handler touches as little memory
as you can, because some of the memory might be invalidated by the
reason for the original SIGSEGV.

I suggest to read the documentation for the function `signal' in the
library reference, since there are a few subtleties involved.

> III. How do I allocate/trash memory inline in AT&T syntax?

Call `malloc' from the library (it's `_malloc' in assembly).

- Raw text -


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