]> git.ipfire.org Git - thirdparty/gcc.git/commit
AVR: Add support for a Compact Vector Table (-mcvt).
authorGeorg-Johann Lay <avr@gjlay.de>
Thu, 6 Feb 2025 10:28:28 +0000 (11:28 +0100)
committerGeorg-Johann Lay <avr@gjlay.de>
Thu, 6 Feb 2025 17:24:17 +0000 (18:24 +0100)
commitcb27337f9f4956e6eb634b26a7999ea68063f58a
tree54546a4bb921fa6ec90e318324fe8e428137f9d7
parenta03303b4d5b2ca58e5750a4d5bd735d85a091273
AVR: Add support for a Compact Vector Table (-mcvt).

Some AVR devices support a CVT:

-  Devices from the 0-series, 1-series, 2-series.
-  AVR16, AVR32, AVR64, AVR128 devices.

The support is provided by means of a startup code file
crt<mcu>-cvt.o from AVR-LibC v2.3 that can be linked instead
of the traditional crt<mcu>.o.

This patch adds a new command line option -mcvt that links
that CVT startup code (or issues an error when the device
doesn't support a CVT).

PR target/118764
gcc/
* config/avr/avr.opt (-mcvt): New target option.
* config/avr/avr-arch.h (AVR_CVT): New enum value.
* config/avr/avr-mcus.def: Add AVR_CVT flag for devices that
support it.
* config/avr/avr.cc (avr_handle_isr_attribute) [TARGET_CVT]: Issue
an error when a vector number larger that 3 is used.
* config/avr/gen-avr-mmcu-specs.cc (McuInfo.have_cvt): New property.
(print_mcu) <*avrlibc_startfile>: Use crt<mcu>-cvt.o depending
on -mcvt (or issue an error when the device doesn't support a CVT).
* doc/invoke.texi (AVR Options): Document -mcvt.
gcc/config/avr/avr-arch.h
gcc/config/avr/avr-mcus.def
gcc/config/avr/avr.cc
gcc/config/avr/avr.opt
gcc/config/avr/gen-avr-mmcu-specs.cc
gcc/doc/invoke.texi