Forum Discussion
Altera_Forum
Honored Contributor
21 years agoBug in NIOS2 GCC ?
Could this be a bug in the NIOS2-GCC ? char testsub(void) {
return __builtin_ldbio (0x1000);
} Generates the following Assembly code (Using -O2 and -fomit-frame-pointer): movi r3...
Altera_Forum
Honored Contributor
21 years agoWell, the Subroutine testfunc above at least returns the correct result, because of the shifts... BUT look at this:
long testsub(void) {
return __builtin_ldbio (0x1000);
} When you compile this code, you can be sure that you get wrong results... the generated assembly code looks like this: movhi r3, 4096
ldhio r2, 0(r3)
ret With this code, you can be sure you get wrong results... Simon