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