Date: Thu, 24 Jun 1999 12:04:50 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Daniel Eaton cc: djgpp AT delorie DOT com Subject: Re: Assembler/SIGSEGV questions In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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).