This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Re: strange compiling problem


Andrew Pinski wrote:
> >	:"=m"(*&ra)
> >	:"0"(*&ra), "m"(*&rb)
> 
> 
> Even better, I think this is where the problem is any way:
> 	:"+m"(*&ra)
> 	: "m"(*&rb)
> 
> And change all %2 to %1 and %1 to %0.
> Note the + means that ra is being read from and written to.
> Almost every one wants to write it as the way you had it
> though for some reason.

It's because older GCC didn't support the "+" syntax in asms, and
current GCC supports either and automatically converts the first form
into the second one, in an asm.

-- Jamie


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