This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Device specific ISA support in AVR


Few AVR Xmega devices have specific instruction support than the architecture
it belongs to. For example atxmega128b1 device has RMW instructions (XCH,LAC,
LAS and LAT) support, but not all avrxmega6 devices have.

Now, avr-gcc passes architecture name to assembler instead of device name. So,
RMW instructions are not recognized (illegal opcode error) by assembler.

To address this issue, we could add device specific ISA to device details 
in GCC. Driver can pass additional option based on specific ISA that a device
has. Assembler can add device specific ISA to architecture ISA based on the
option it receives.

I have attached patches for avr-gcc and avr-as to address this issue.

* Device specific ISA information is added to device details. 
* avr-gcc passes -mrmw option to assembler if the selected device
has RMW instruction support.

* Add option -mrmw.
* Add AVR_ISA_RMW to current architecture ISA if -mrmw option specified.

Please review the patches and comment.


2014-02-25  Pitchumani Sivanupandi  <>

    * config/avr/avr-arch.h: Add avr_additional_isa enum to have device
    specific ISA information.
    (avr_mcu_t): Add additional_isa field for device specific ISA.
    * config/avr/avr-devices.c (avr_mcu_types): Update AVR_MCU macro to
    include additional isa field.
    * config/avr/avr-mcus.def: Update device details with corresponding
    additional isa info.
    * config/avr/driver-avr.c (avr_device_to_as): Pass -mrmw option to
    assembler if RMW isa supported by current device.
    * config/avr/genmultilib.awk: Update as device info structure changed.

2014-02-25 Pitchumani Sivanupandi  <>

    * New test.

2014-02-25 Pitchumani Sivanupandi <>

    * config/tc-avr.c: Add specified_mcu variable for selected mcu.
    (enum options): add OPTION_RMW_ISA for -mrmw option.
    (struct option md_longopts): Add mrmw option.
    (md_show_usage): add -mrmw option description.
    (md_parse_option): Update isa details if -mrmw option specified.
    * doc/c-avr.texi: Add doc for new option -mrmw.

2014-02-25 Pitchumani Sivanupandi <>

    * gas/avr/avr.exp: Run new tests.
    * gas/avr/rmw.d: Add test for additional ISA support.
    * gas/avr/rmw.s: Ditto.

Attachment: device-specific-isa-avr-gcc.patch
Description: device-specific-isa-avr-gcc.patch

Attachment: device-specific-isa-avr-as.patch
Description: device-specific-isa-avr-as.patch

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]