RE: [arm-gnu] Problem with u-boot compiled with 2006q1-3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [arm-gnu] Problem with u-boot compiled with 2006q1-3



> >> gd which it thinks is in r8. Is this a bug in u-boot code or in
gcc?
> >
> >This is a bug in uboot.
> >
> >int main()
> >{
> >  register volatile gd_t *gd asm("r8");
> >
> >Does not declare a global register.  It declares a local
> >variable in r8.

The u-boot compile does specify --fixed-r8 which as I've lightly
interpreted it should exclude the compiler from using r8 for automatic
variable assignment global & local.  Once you put something into R8 it
should be pretty safe.

The u-boot bug I've seen in the past which was fixed with a barrier, was
GCC starting using r8 to do pointer calculations before r8 was assigned
its value.  Once it has gotten the value all has been good from there.

Regards,
Richard W.