This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: PPC GCC Inline assembly help
eija_flight <ajie.dirgantara@flightfocus.net> writes:
> I'm using the "i" constraint because I need to access specific registers
> respectively, so I need to modify and then pass the variable value to the
> asm codes to change the usage of each register dynamically. By using "r"
> constraint, the compiler will be use any available general register, How is
> my problem can be done by this method?
If I understand you correctly, you must force the function to always be
inlined. Otherwise there won't be an integer constant, so your asm will
fail. You can force it to always be inlined by using the always_inline
attribute which I already mentioned. Or you could use a preprocessor
macro instead of a function.
Ian