--- In lpc2000@yahoogroups.com, Jan Thogersen <jan@...> wrote: > E3A0220E mov r2, #0xE0000000 > E2822901 add r2, r2, #0x00004000 > E2822018 add r2, r2, #0x00000018 ... > How come it takes 3 instruction to load the correct address into r2. My guess is that you are generating 16-bit code with and compiler is minimising code size. The above three instructions then would occupy three 16-bit locations in memory, while the replacement > ldr r2 #e0004018 would require one 32-bit instruction and another 32-bit to store the constant. Jaya
Message
Re: Strange GCC compiler assembler output
2006-05-03 by jayasooriah