This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: GCC asm register clobber
- From: DJ Delorie <dj at redhat dot com>
- To: "Jonathan S. Shapiro" <shap at eros-os dot com>
- Cc: newlib at redhat dot com
- Date: 18 Jul 2007 17:46:50 -0400
- Subject: Re: GCC asm register clobber
- References: <1184793558.28331.3.camel@shap.om-md.eros-os.com>
Specify it as an output operand, with a matching input operand. I.e.:
"=r" (out) "0" (in)
Use a temporary variable for out, that's all. It doesn't have to be
volatile.