MSP430: Consolidate handling of hard-coded MCU data
authorJozef Lawrynowicz <jozef.l@mittosystems.com>
Tue, 13 Aug 2019 10:05:53 +0000 (10:05 +0000)
committerJozef Lawrynowicz <jozefl@gcc.gnu.org>
Tue, 13 Aug 2019 10:05:53 +0000 (10:05 +0000)
commite37e2bb100135e4d4afa2f4ae6445ac1201f01fa
treec54af3eabb7667016b5ba28d390176b8454d7ae7
parent806f69cd68c18399e8e54b1a0913ae57beabbe69
MSP430: Consolidate handling of hard-coded MCU data

gcc/ChangeLog:

2019-08-13  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* gcc/config.gcc (msp430*-*-*): Add msp430-devices.o to extra_objs and
extra_gcc_objs.
* gcc/config/msp430/driver-msp430.c: Remove msp430_mcu_data.
(msp430_select_cpu): New spec function.
(msp430_select_hwmult_lib): Use msp430_extract_mcu_data to extract
MCU data.
* gcc/config/msp430/msp430-devices.c: New file.
* gcc/config/msp430/msp430-devices.h: New file.
* gcc/config/msp430/msp430.c: Remove msp430_mcu_data.
(msp430_option_override): Use msp430_extract_mcu_data to extract
MCU data.
(msp430_use_f5_series_hwmult): Likewise.
(use_32bit_hwmult): Likewise.
(msp430_no_hwmult): Likewise.
* gcc/config/msp430/msp430.h (ASM_SPEC): Don't pass -mmcu to the
assembler.
(DRIVER_SELF_SPECS): Call msp430_select_cpu if -mmcu is used without
and -mcpu option.
(EXTRA_SPEC_FUNCTIONS): Add msp430_select_cpu.
* gcc/config/msp430/t-msp430: Add rule to build msp430-devices.o.
Remove hard-coded MCU multilib data.

gcc/testsuite/ChangeLog:

2019-08-13  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* gcc.target/msp430/msp430.exp
(check_effective_target_msp430_430_selected): New.
(check_effective_target_msp430_430x_selected): New.
(check_effective_target_msp430_mlarge_selected): New.
(check_effective_target_msp430_hwmul_not_none): New.
(check_effective_target_msp430_hwmul_not_16bit): New.
(check_effective_target_msp430_hwmul_not_32bit): New.
(check_effective_target_msp430_hwmul_not_f5): New.
(msp430_get_opts): New.
(msp430_device_permutations_runtest): New.
* gcc.target/msp430/devices/README: New file.
* gcc.target/msp430/devices-main.c: New test.
* gcc.target/msp430/devices/hard-cc430f5123.c: Likewise.
* gcc.target/msp430/devices/hard-foo.c: Likewise.
* gcc.target/msp430/devices/hard-msp430afe253.c: Likewise.
* gcc.target/msp430/devices/hard-msp430cg4616.c: Likewise.
* gcc.target/msp430/devices/hard-msp430f4783.c: Likewise.
* gcc.target/msp430/devices/hard-rf430frl154h_rom.c: Likewise.

From-SVN: r274370
18 files changed:
gcc/ChangeLog
gcc/config.gcc
gcc/config/msp430/driver-msp430.c
gcc/config/msp430/msp430-devices.c [new file with mode: 0644]
gcc/config/msp430/msp430-devices.h [new file with mode: 0644]
gcc/config/msp430/msp430.c
gcc/config/msp430/msp430.h
gcc/config/msp430/t-msp430
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/msp430/devices-main.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/devices/README [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/devices/hard-cc430f5123.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/devices/hard-foo.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/devices/hard-msp430afe253.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/devices/hard-msp430cg4616.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/devices/hard-msp430f4783.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/devices/hard-rf430frl154h_rom.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/msp430.exp