On 03/30/2012 08:13 AM, Sandeep Kumar Singh wrote:
Please find the attached patch to avoid saving of EXR register for
By default, in prologue code of a monitor function, EXR register is
pushed onto the stack. This implementation is not required for H8S/224x
and 21xx variants of H8S controllers. The behavior can be controlled
with option "-mno-exr".
Built compiler is only for compiling C language source code. No
regression found with this patch.
Compiler behavior with different command line options used for
compilation of code after applying this patch is given below:
* h8300-elf-gcc -mn -S test.c
test.c:1:0: error: -mn is used without -mh or -ms or -msx
* h8300-elf-gcc -mh -mexr -S test.c
test.c:1:0: error: -mexr is used without -ms
* h8300-elf-gcc -mh -mno-exr -S test.c
test.c:1:0: warning: -mno-exr valid only with -ms or -msx
- Option ignored! [-mno-exr]
* Generated assembly without option '-mno-exr':
* Generated assembly with option '-mno-exr':
Please review the patch and let me know if there should be any
modifications in it?
This looks pretty good. Just a couple minor issues.
First, do you have an assignment on file with the FSF. I note several
other engineers at KPIT have assignments, but I'm not aware of one for
you. That will need to be taken care of before we can accept the code.
My recollection was -mint32 was supported on the original H8/300; is
there something in particular that makes you want to issue an error for
that case? Or is my memory incorrect?
In h8300.opt, rather than say "Push exr on stack", would it make more
sense to say "[Do not] Push extended registers on stack in monitor