Re: Assembly macro with parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

  Maciej


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux