[MSP430,0/2] Improve and extend MCU data handling

Message ID 20190808130944.680d25e8@jozef-kubuntu
Headers show
Series
  • Improve and extend MCU data handling
Related show

Message

Jozef Lawrynowicz Aug. 8, 2019, 12:09 p.m.
Each different MSP430 MCU has two properties that affect code generation, the
CPU ISA and the hardware multiply support. These can be manually specified with
the -mcpu= and -mhwmult= options, respectively.
The existing -mmcu= option takes an MCU name as an argument and uses the CPU
ISA and hardware multiply known to be supported for that MCU during code
generation, so the user does not have to provide the -mcpu and -mhwmult options.

The first patch improves the handling of MCU data by consolidating multiple
copies of hard-coded MCU data into a single location, and adds a new function
to be used as a single entry point for the extraction of MCU data for the
selected MCU.

The second patch extends the MCU data handling so that MCU data can be provided
in an external file (devices.csv). This means the compiler doesn't have to be
updated and rebuilt to support new devices when they are released.

Successfully regtested for msp430-elf on trunk.

Ok for trunk?

Thanks,
Jozef

Jozef Lawrynowicz (2):
  MSP430: Devices [1]: Consolidate handling of hard-coded MCU data
  MSP430: Devices [2]: Read MCU data from external devices.csv file, if
    it exists

 gcc/config.gcc                                |   3 +-
 gcc/config/msp430/driver-msp430.c             | 675 +-----------
 gcc/config/msp430/msp430-devices.c            | 971 ++++++++++++++++++
 gcc/config/msp430/msp430-devices.h            |  31 +
 gcc/config/msp430/msp430.c                    | 680 +-----------
 gcc/config/msp430/msp430.h                    |  18 +-
 gcc/config/msp430/msp430.opt                  |   9 +
 gcc/config/msp430/t-msp430                    | 236 +----
 gcc/doc/invoke.texi                           |  14 +-
 .../gcc.target/msp430/devices-main.c          |   6 +
 .../gcc.target/msp430/devices/README          |  17 +
 .../gcc.target/msp430/devices/bad-devices-1.c |   5 +
 .../msp430/devices/bad-devices-1.csv          |   3 +
 .../gcc.target/msp430/devices/bad-devices-2.c |   5 +
 .../msp430/devices/bad-devices-2.csv          |   3 +
 .../gcc.target/msp430/devices/bad-devices-3.c |   5 +
 .../msp430/devices/bad-devices-3.csv          |   3 +
 .../gcc.target/msp430/devices/bad-devices-4.c |   5 +
 .../msp430/devices/bad-devices-4.csv          |   3 +
 .../gcc.target/msp430/devices/bad-devices-5.c |   5 +
 .../msp430/devices/bad-devices-5.csv          |   3 +
 .../gcc.target/msp430/devices/bad-devices-6.c |   5 +
 .../msp430/devices/bad-devices-6.csv          |   3 +
 .../msp430/devices/csv-device-order.c         |  11 +
 .../gcc.target/msp430/devices/csv-msp430_00.c |   7 +
 .../gcc.target/msp430/devices/csv-msp430_01.c |   7 +
 .../gcc.target/msp430/devices/csv-msp430_02.c |   7 +
 .../gcc.target/msp430/devices/csv-msp430_04.c |   7 +
 .../gcc.target/msp430/devices/csv-msp430_08.c |   7 +
 .../gcc.target/msp430/devices/csv-msp430_10.c |   6 +
 .../gcc.target/msp430/devices/csv-msp430_11.c |   6 +
 .../gcc.target/msp430/devices/csv-msp430_12.c |   6 +
 .../gcc.target/msp430/devices/csv-msp430_14.c |   6 +
 .../gcc.target/msp430/devices/csv-msp430_18.c |   6 +
 .../gcc.target/msp430/devices/csv-msp430_20.c |   6 +
 .../gcc.target/msp430/devices/csv-msp430_21.c |   6 +
 .../gcc.target/msp430/devices/csv-msp430_22.c |   6 +
 .../gcc.target/msp430/devices/csv-msp430_24.c |   6 +
 .../gcc.target/msp430/devices/csv-msp430_28.c |   6 +
 .../msp430/devices/csv-msp430fr5969.c         |  11 +
 .../gcc.target/msp430/devices/devices.csv     |  22 +
 .../msp430/devices/hard-cc430f5123.c          |   7 +
 .../gcc.target/msp430/devices/hard-foo.c      |   6 +
 .../msp430/devices/hard-msp430afe253.c        |   8 +
 .../msp430/devices/hard-msp430cg4616.c        |   7 +
 .../msp430/devices/hard-msp430f4783.c         |   8 +
 .../msp430/devices/hard-rf430frl154h_rom.c    |   8 +
 gcc/testsuite/gcc.target/msp430/msp430.exp    |  96 +-
 48 files changed, 1476 insertions(+), 1511 deletions(-)
 create mode 100644 gcc/config/msp430/msp430-devices.c
 create mode 100644 gcc/config/msp430/msp430-devices.h
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices-main.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/README
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/bad-devices-1.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/bad-devices-1.csv
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/bad-devices-2.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/bad-devices-2.csv
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/bad-devices-3.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/bad-devices-3.csv
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/bad-devices-4.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/bad-devices-4.csv
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/bad-devices-5.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/bad-devices-5.csv
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/bad-devices-6.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/bad-devices-6.csv
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-device-order.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430_00.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430_01.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430_02.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430_04.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430_08.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430_10.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430_11.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430_12.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430_14.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430_18.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430_20.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430_21.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430_22.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430_24.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430_28.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/csv-msp430fr5969.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/devices.csv
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/hard-cc430f5123.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/hard-foo.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/hard-msp430afe253.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/hard-msp430cg4616.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/devices/hard-msp430f4783.c
 create mode 100644
 gcc/testsuite/gcc.target/msp430/devices/hard-rf430frl154h_rom.c