MSP430: Consolidate handling of hard-coded MCU data

Programming / Compilers / GCC - jozefl [138bc75d-0d04-0410-961f-82ee72b054a4] - 13 August 2019 10:05 EDT

gcc/ChangeLog:

2019-08-13 Jozef Lawrynowicz

- 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

- 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.

bb4cc462076 MSP430: Consolidate handling of hard-coded MCU data
gcc/ChangeLog | 24 +
gcc/config.gcc | 3 +-
gcc/config/msp430/driver-msp430.c | 654 +------------------
gcc/config/msp430/msp430-devices.c | 697 +++++++++++++++++++++
gcc/config/msp430/msp430-devices.h | 31 +
gcc/config/msp430/msp430.c | 680 +-------------------
gcc/config/msp430/msp430.h | 10 +-
gcc/config/msp430/t-msp430 | 236 +------
gcc/testsuite/ChangeLog | 21 +
gcc/testsuite/gcc.target/msp430/devices-main.c | 6 +
gcc/testsuite/gcc.target/msp430/devices/README | 12 +
.../gcc.target/msp430/devices/hard-cc430f5123.c | 7 +
gcc/testsuite/gcc.target/msp430/devices/hard-foo.c | 5 +
.../gcc.target/msp430/devices/hard-msp430afe253.c | 8 +
.../gcc.target/msp430/devices/hard-msp430cg4616.c | 7 +
.../gcc.target/msp430/devices/hard-msp430f4783.c | 8 +
.../msp430/devices/hard-rf430frl154h_rom.c | 8 +
gcc/testsuite/gcc.target/msp430/msp430.exp | 82 ++-
18 files changed, 988 insertions(+), 1511 deletions(-)

Upstream: gcc.gnu.org


  • Share