This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH H8300] Added -mno-exr option in case of function with "monitor" attribute
- From: Jeff Law <law at redhat dot com>
- To: Sandeep Kumar Singh <Sandeep dot Singh2 at kpitcummins dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 02 Apr 2012 14:19:08 -0600
- Subject: Re: [PATCH H8300] Added -mno-exr option in case of function with "monitor" attribute
- References: <00D82FEA4EAEB64782676AD908D06E6F15C1F5D4@KCHJEXMB01.kpit.com>
On 03/30/2012 08:13 AM, Sandeep Kumar Singh wrote:
Hi,This looks pretty good. Just a couple minor issues.
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?
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