https://sourceware.org/bugzilla/show_bug.cgi?id=28342

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |avr
            Version|unspecified                 |2.46
           Assignee|unassigned at sourceware dot org   |gjl at gcc dot gnu.org

--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
When there is an AVR instruction in include/opcode/avr.h that is not supported
by a specific core, then gas will diagnose with the nmemonic of the next
instruction:

    mul 1,2
    mulsu 1,1
    lat

$ avr-as x.sx 
x.sx: Assembler messages:
x.sx:1: Error: illegal opcode or for mcu avr2
x.sx:2: Error: illegal opcode fmul for mcu avr2
x.sx:3: Error: illegal opcode movw for mcu avr2

The reason is that in gas/config/tc-avr.c::md_assemble() we have this loop:

   while ((opcode->isa & avr_mcu->isa) != opcode->isa)
     {
       opcode++;

       if (opcode->name && strcmp(op, opcode->name))
         {
           as_bad (_("illegal opcode %s for mcu %s"),
                   opcode->name, avr_mcu->name);
           return;
         }
     }

which in the as_bad case prints the next instruction's mnemonic due to the
opcode++ above.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to