This is the mail archive of the binutils@sourceware.org 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]

[patch,avr] device specific instruction support for avr devices


Hi,

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.

I have attached a patch to address this issue in assembler. 
- It adds a option '-mrmw' to assembler.
- Based on -mrmw option device specific instructions are added to current
  instruction set (mcu_types[i].isa | AVR_ISA_RMW)
Now assembler can recognize rmw instructions for respective devices.

It is necessary to update gcc to pass -mrmw option to assembler if the
selected device has rmw instructions. I'll send a patch for gcc as well.

Please review the attached patch and give your suggestions.

Thanks,
Pitchumani

gas/ChangeLog
2014-02-25 Pitchumani Sivanupandi <pitchumani.s@atmel.com>

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

gas/testsuite/ChangeLog
2014-02-25 Pitchumani Sivanupandi <pitchumani.s@atmel.com>

    * 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-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]