This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GCC asm register clobber


This is properly a question for the GCC list, but I am hoping somebody
here will know the answer.

I need to write an inline asm where a particular register is required as
an input, but has been clobbered to an undefined state at the output.
The question is: how do I express this? Is there a way to do it without
adding a dummy volatile output variable?

GCC will not let me add the register to the clobbered list, because it
is used as an input. GCC also will not let me annotate an input
constraint using '&', '+', or '='.

I'm sure there is a way to do this, and I'm just not seeing it. Can
anybody help me out?


shap


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]