|Page 1 of 1|
|Author:||cindy [ Tue Oct 21, 2014 10:50 pm ]|
|Post subject:||-ffixed-reg option|
Treat the register named reg as a fixed register; generated code should never refer to it (except perhaps as a stack pointer, frame pointer or in some other fixed role).
GCC Manual § 3.18 Options for Code Generation Conventions
http://stackoverflow.com/questions/2114 ... c-variable
Please import the attachment which have 2 samples test0 and test1.
test0_1.zip [28.26 KiB]
Downloaded 373 times
test0: original project
test1: with compiler options -ffixed-$r1 -ffixed-$r2
Becuase $r0 is the return value. We can avoid to use $r0.
In the the following sample, we use option "-ffixed-$r0".
But the return value is still in $r0.
3.png [ 16.85 KiB | Viewed 5167 times ]
test2.zip [14.09 KiB]
Downloaded 351 times
|Page 1 of 1||All times are UTC + 8 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group