Forum Discussion
Altera_Forum
Honored Contributor
16 years agogcc generates bad code for volatile data
If you look at the generated code for reads of volatile char and short data, it seems that gcc assumes that the high bits of the register are undefined. For instance: int fubar(volatile char...
Altera_Forum
Honored Contributor
16 years agoSome further info:
With 'volatile unsigned char *bar' both the 'ldbu' and 'andi rx,rx,0xff' instructions come from the 'zero_extendqisi2' pattern. David