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: Thu, 6 Mar 2014 19:07:08 +0400
- Subject: Re: [patch,avr] Device specific instructions support for avr
- Authentication-results: sourceware.org; auth=none
- References: <CAC140656783604CABA6AE60C2A6D5A46ADED714 at penmbx01> <CADOs=za1MDEXnqXo+LnMSHf0aqucTL-Y2YHe=vB4ije9Z40Mqg at mail dot gmail dot com> <CAC140656783604CABA6AE60C2A6D5A46ADEF7D0 at penmbx01>
2014-03-06 10:57 GMT+04:00 S, Pitchumani <Pitchumani.S@atmel.com>:
> Hi Denis,
>
>> -----Original Message-----
>> From: Denis Chertykov [mailto:chertykov@gmail.com]
>> Sent: Monday, March 03, 2014 10:45 PM
>> 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.
>
> New avr_arch can be added. But there are devices in avrxmega2, 4, 5, 6 and 7
> architectures which has rmw instructions. In this case, new architecture required
> for above variants as well. Also there is DES instruction which is available only
> for few avr devices. So, I thought adding an option will avoid creating many new
> architectures.
>
> Related binutils PR: http://sourceware.org/PR15043
> Related discussion: http://lists.nongnu.org/archive/html/avr-gcc-list/2014-03/msg00000.html
>
> Please suggest.
It seems you're right
Please, recreate patches against latest source tree.
Denis.