This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch,avr] Device specific instructions support for avr
- From: Denis Chertykov <chertykov at gmail dot com>
- To: "S, Pitchumani" <Pitchumani dot S at atmel dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Georg-Johann Lay <avr at gjlay dot de>
- Date: Mon, 3 Mar 2014 21:15:06 +0400
- Subject: Re: [patch,avr] Device specific instructions support for avr
- Authentication-results: sourceware.org; auth=none
- References: <CAC140656783604CABA6AE60C2A6D5A46ADED714 at penmbx01>
2014-03-03 13:34 GMT+04:00 S, Pitchumani <Pitchumani.S@atmel.com>:
> 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.
>
> 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.
>
> device-specific-isa-avr-gcc.patch:
> * Device specific ISA information is added to device details.
> * avr-gcc passes -mrmw option to assembler if the selected device
> has RMW instruction support.
I don't like additional option '-mrmw' because we already have a way
for passing device specific ISA.
IMHO better to add new avr_arch (ie atxmega128b1 is ARCH_AVRXMEGA6U)
GAS already have AVR_ISA_XMEGAU for RMW instructions.
Denis.