MSP430: Disallow use of code/data regions in the small memory model
authorJozef Lawrynowicz <jozef.l@mittosystems.com>
Mon, 29 Jul 2019 20:23:44 +0000 (20:23 +0000)
committerJozef Lawrynowicz <jozefl@gcc.gnu.org>
Mon, 29 Jul 2019 20:23:44 +0000 (20:23 +0000)
commit49c432df666bdb3b680246c94735274a1b39cfc8
tree5cbfa54f367e75b1911830bfba3159243508605e
parent37816988909ba2b10722aff56d7cbd8ff48bf21d
MSP430: Disallow use of code/data regions in the small memory model

gcc/ChangeLog:

2019-07-29  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-29  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.

From-SVN: r273884
gcc/ChangeLog
gcc/config/msp430/msp430.c
gcc/config/msp430/msp430.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/msp430/pr78818-data-region.c
gcc/testsuite/gcc.target/msp430/region-attribute-misuse.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/region-misuse-code-data.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/region-misuse-code.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/region-misuse-data.c [new file with mode: 0644]