[U-Boot-Users] possible ELDK4 gcc compiler bug

Timur Tabi timur at freescale.com
Thu Dec 7 18:25:16 CET 2006


Matthias Fuchs wrote:

> 
> Do so with accessors result in code like this (still missing some casts):
> 
> out32(&(fpga->fifo[i].ctrl), in32(&(fpga->fifo[i].ctrl)) | 0x8000);
> 
> Is this really recommended?

That's how I would do it.  You could use a temporary variable:

u32 ctrl;

ctrl = in32(&(fpga->fifo[i].ctrl));
out32(&(fpga->fifo[i].ctrl), ctrl | 0x8000);

-- 
Timur Tabi
Linux Kernel Developer @ Freescale




More information about the U-Boot mailing list