[PATCH][MSP430] Reject -m{code,data}-region options unless large memory model is selected

Jozef Lawrynowicz jozef.l@mittosystems.com
Mon Jul 29 20:56:00 GMT 2019


On Wed, 24 Jul 2019 09:31:11 -0600
Jeff Law <law@redhat.com> wrote:

> On 7/23/19 7:22 AM, Jozef Lawrynowicz wrote:
> > 
> > gcc/ChangeLog:
> > 
> > 2019-07-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
> > 
> > 	* config/msp430/msp430.h (DRIVER_SELF_SPECS): Define and emit errors
> > 	when -m{code,data}-region are used without -mlarge.
> > 	* config/msp430/msp430.c (msp430_option_override): Error when a
> > 	non-default code or data region is used without -mlarge.
> > 	(msp430_section_attr): Emit a warning and do not add upper/lower/either
> > 	attributes when they are used without -mlarge.
> > 
> > gcc/testsuite/ChangeLog:
> > 
> > 2019-07-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
> > 
> > 	* gcc.target/msp430/pr78818-data-region.c: Add -mlarge to dg-options.
> > 	* gcc.target/msp430/region-misuse-code.c: New test.
> > 	* gcc.target/msp430/region-misuse-data.c: Likewise.
> > 	* gcc.target/msp430/region-misuse-code-data.c: Likewise.
> > 	* gcc.target/msp430/region-attribute-misuse.c: Likewise.  
> OK.  I didn't check all the formatting directives in the error messages.
>  You might consider building a native compiler and using that to then
> build your msp cross to ensure those formatting directives pass the
> checker.  Reasonable adjustments to the error messages to address any
> such issues found should be considered pre-approved.
> 
> jeff

Thanks for the tip, I checked for any format warnings emitted when building
the cross using native trunk and there weren't any issues with my patch.

There are problems with some of the other strings in the msp430 backend though,
I'll make a note to fix them.

Applied.

Jozef




More information about the Gcc-patches mailing list