[U-Boot] [PATCH] powerpc: fix register usage in some inline assembly code

Tabi Timur-B04825 B04825 at freescale.com
Wed Dec 15 13:32:42 CET 2010


Wolfgang Denk wrote:
> In message<1292368731-3819-1-git-send-email-timur at freescale.com>  you wrote:
>> >  In some usages of inline assembly, hard-coded registers were specified when a
>> >  scratch register should have been used instead.

> Is this just a cosmetic improvement, or are you fixing any real bug?
> If so, what exactly is the problem?

Well, I'm not a expert on inline assembly, so I could be missing something, but IMHO it is fixing a real bug, although the current code does technically work.

The problem is that the code was modifying registers and gcc was unaware of that.  So there is a possibility that gcc could have put something important in those registers.  It appears that the authors of that code knew which registers were unused, and just made sure to use those.

-- 
Timur Tabi
Linux kernel developer



More information about the U-Boot mailing list