This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Fwd: Re: ARM Cortex M3 Macro Limitation]


On 04/20/2010 01:45 AM, Thomas M. Alldread wrote:
RAMBBTEST(varName,bit) (uint32_t)&varName-SRAM_BASE*32+4*bit+SRAM_BB_BASE

I noticed that there is no "( )" around "&varName-SRAM_BASE" compared to your original code. This might be the cause that you got better code since symbol + constant can be handled well while symbol * constant + constant cannot.



-- Jie Zhang CodeSourcery (650) 331-3385 x735


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]