Forum Discussion
Altera_Forum
Honored Contributor
21 years agoUnnecessary instructions
Hello, it's my first post. I have question about GCC generated code. We can find several unnecessary instructions. --- sample code --- unsigned short uh; uh = IORD_16DIRECT(base,ofst)...
Altera_Forum
Honored Contributor
21 years agoScott,
If no "volatile", sign-extending operations (andi, slli+sari) are eliminated. If "volatile" exists, sign-extending is used. Similar code as MACRO will be generated. I must use volatile because target address is shared-memory. It seems there is less way to avoid this issue... assembler?