[U-Boot-Users] Re: what means this symbol "@"?

Wells, Charles Charles.Wells at NielsenMedia.com
Mon May 12 15:05:29 CEST 2003


>I've never figured out why someone would want to use addi instead of ori in

>the second instruction of the load sequence.
>
>gvb

Jerry,

The only authoritative explanation I've seen comes from IBM's
_The_PowerPC_Compiler_Writer's_Guide_; Steve Hoxey, et.al., 1/1996.  Section
3.2.3.1 (p. 48-49) is entitled Loading a Constant into a Register.  After
discussing the different techniques, they say:

 "The add instructions are preferred to logical instructions because future
PowerPC 
  implementations may have a three-input adder, which permits executing the
preceding 
  two instructions (and other forms of add-feeding-add) in parallel, even
though they 
  are not independent."

If your hand-crafted assembly language is being used to optimize an inner
loop, then it may make a difference.  If it's used in some one-time
initialization code, it doesn't matter.

BTW, the CWG is a wonderfully entertaining resource for folks that want to
better understand the PowerPC architecture.  It's available at:
 
<http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF77852
56996007558C6>

Regards,
Charlie




More information about the U-Boot mailing list