Andes Workshop http://forum.andestech.com/ |
|
-ffixed-reg option http://forum.andestech.com/viewtopic.php?f=16&t=896 |
Page 1 of 1 |
Author: | cindy [ Tue Oct 21, 2014 10:50 pm ] |
Post subject: | -ffixed-reg option |
-ffixed-reg 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 Reference: http://stackoverflow.com/questions/2114 ... c-variable Please import the attachment which have 2 samples test0 and test1. Attachment: test0: original project test1: with compiler options -ffixed-$r1 -ffixed-$r2 Attachment: Result: Attachment: Note: 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. Attachment: 3.png [ 16.85 KiB | Viewed 11876 times ] Attachment:
|
Page 1 of 1 | All times are UTC + 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |