[Top] [All Lists]

Re: Assembly macro with parameters

To: Fabrizio Fazzino <>
Subject: Re: Assembly macro with parameters
From: "Maciej W. Rozycki" <>
Date: Mon, 4 Jul 2005 13:12:48 +0100 (BST)
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <> <> <> <>
On Sun, 3 Jul 2005, Fabrizio Fazzino wrote:

> By the way, is there any quick way of writing a setreg(reg_num,reg_val)
> C macro to set the value of a register?

 It would make no sense as GCC would still be free to use this register
for something else, therefore either destroying your "explicitly" assigned 
data or getting data already there destroyed.  You are really after asm 
constraints and explicit register variables as outlined in my previous 
response.  See GCC documentation for how to make use of these.

 BTW, how about adding support for opcodes you are interested in to 
binutils instead?  It would make interfacing them to GCC much easier.


<Prev in Thread] Current Thread [Next in Thread>