Index: binutils/opcodes/avr32-opc.c =================================================================== --- binutils/opcodes/avr32-opc.c (revision 6632) +++ binutils/opcodes/avr32-opc.c (working copy) @@ -4252,7 +4252,7 @@ { { 0, PICO_CPNO }, { 1, 0 }, { 1, 1 }, { 1, 2 }, - { 0, 0x0e }, + { 0, 0x0c }, }, }, { @@ -4270,16 +4270,25 @@ { { 0, PICO_CPNO }, { 1, 0 }, { 1, 1 }, { 1, 2 }, - { 0, 0x0c }, + { 0, 0x0e }, }, }, { + AVR32_ALIAS_PICOSVMAC3, + &avr32_opc_table[AVR32_OPC_COP], + { + { 0, PICO_CPNO }, + { 1, 0 }, { 1, 1 }, { 1, 2 }, + { 0, 0x0f }, + }, + }, + { AVR32_ALIAS_PICOSVMUL0, &avr32_opc_table[AVR32_OPC_COP], { { 0, PICO_CPNO }, { 1, 0 }, { 1, 1 }, { 1, 2 }, - { 0, 0x0a }, + { 0, 0x08 }, }, }, { @@ -4297,16 +4306,25 @@ { { 0, PICO_CPNO }, { 1, 0 }, { 1, 1 }, { 1, 2 }, - { 0, 0x08 }, + { 0, 0x0a }, }, }, { + AVR32_ALIAS_PICOSVMUL3, + &avr32_opc_table[AVR32_OPC_COP], + { + { 0, PICO_CPNO }, + { 1, 0 }, { 1, 1 }, { 1, 2 }, + { 0, 0x0b }, + }, + }, + { AVR32_ALIAS_PICOVMAC0, &avr32_opc_table[AVR32_OPC_COP], { { 0, PICO_CPNO }, { 1, 0 }, { 1, 1 }, { 1, 2 }, - { 0, 0x06 }, + { 0, 0x04 }, }, }, { @@ -4324,16 +4342,25 @@ { { 0, PICO_CPNO }, { 1, 0 }, { 1, 1 }, { 1, 2 }, - { 0, 0x04 }, + { 0, 0x06 }, }, }, { + AVR32_ALIAS_PICOVMAC3, + &avr32_opc_table[AVR32_OPC_COP], + { + { 0, PICO_CPNO }, + { 1, 0 }, { 1, 1 }, { 1, 2 }, + { 0, 0x07 }, + }, + }, + { AVR32_ALIAS_PICOVMUL0, &avr32_opc_table[AVR32_OPC_COP], { { 0, PICO_CPNO }, { 1, 0 }, { 1, 1 }, { 1, 2 }, - { 0, 0x02 }, + { 0, 0x00 }, }, }, { @@ -4351,10 +4378,19 @@ { { 0, PICO_CPNO }, { 1, 0 }, { 1, 1 }, { 1, 2 }, - { 0, 0x00 }, + { 0, 0x02 }, }, }, { + AVR32_ALIAS_PICOVMUL3, + &avr32_opc_table[AVR32_OPC_COP], + { + { 0, PICO_CPNO }, + { 1, 0 }, { 1, 1 }, { 1, 2 }, + { 0, 0x03 }, + }, + }, + { AVR32_ALIAS_PICOLD_D1, &avr32_opc_table[AVR32_OPC_LDC_D1], { @@ -5305,9 +5341,9 @@ &avr32_syntax_table[AVR32_SYNTAX_PICOSVMAC1], 4, { AVR32_OPERAND_PICO_OUT0, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, }, }, { @@ -5317,33 +5353,45 @@ &avr32_syntax_table[AVR32_SYNTAX_PICOSVMAC2], 4, { AVR32_OPERAND_PICO_OUT1, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, }, }, { AVR32_SYNTAX_PICOSVMAC2, AVR32_PICO, &avr32_mnemonic_table[AVR32_MNEMONIC_PICOSVMAC], AVR32_PARSER_ALIAS, { .alias = &avr32_alias_table[AVR32_ALIAS_PICOSVMAC2] }, - NULL, 4, + &avr32_syntax_table[AVR32_SYNTAX_PICOSVMAC3], 4, { AVR32_OPERAND_PICO_OUT2, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, }, }, { + AVR32_SYNTAX_PICOSVMAC3, + AVR32_PICO, &avr32_mnemonic_table[AVR32_MNEMONIC_PICOSVMAC], AVR32_PARSER_ALIAS, + { .alias = &avr32_alias_table[AVR32_ALIAS_PICOSVMAC3] }, + NULL, 4, + { + AVR32_OPERAND_PICO_OUT3, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + }, + }, + { AVR32_SYNTAX_PICOSVMUL0, AVR32_PICO, &avr32_mnemonic_table[AVR32_MNEMONIC_PICOSVMUL], AVR32_PARSER_ALIAS, { .alias = &avr32_alias_table[AVR32_ALIAS_PICOSVMUL0] }, &avr32_syntax_table[AVR32_SYNTAX_PICOSVMUL1], 4, { AVR32_OPERAND_PICO_OUT0, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, }, }, { @@ -5353,33 +5401,45 @@ &avr32_syntax_table[AVR32_SYNTAX_PICOSVMUL2], 4, { AVR32_OPERAND_PICO_OUT1, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, }, }, { AVR32_SYNTAX_PICOSVMUL2, AVR32_PICO, &avr32_mnemonic_table[AVR32_MNEMONIC_PICOSVMUL], AVR32_PARSER_ALIAS, { .alias = &avr32_alias_table[AVR32_ALIAS_PICOSVMUL2] }, - NULL, 4, + &avr32_syntax_table[AVR32_SYNTAX_PICOSVMUL3], 4, { AVR32_OPERAND_PICO_OUT2, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, }, }, { + AVR32_SYNTAX_PICOSVMUL3, + AVR32_PICO, &avr32_mnemonic_table[AVR32_MNEMONIC_PICOSVMUL], AVR32_PARSER_ALIAS, + { .alias = &avr32_alias_table[AVR32_ALIAS_PICOSVMUL3] }, + NULL, 4, + { + AVR32_OPERAND_PICO_OUT3, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + }, + }, + { AVR32_SYNTAX_PICOVMAC0, AVR32_PICO, &avr32_mnemonic_table[AVR32_MNEMONIC_PICOVMAC], AVR32_PARSER_ALIAS, { .alias = &avr32_alias_table[AVR32_ALIAS_PICOVMAC0] }, &avr32_syntax_table[AVR32_SYNTAX_PICOVMAC1], 4, { AVR32_OPERAND_PICO_OUT0, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, }, }, { @@ -5389,33 +5449,45 @@ &avr32_syntax_table[AVR32_SYNTAX_PICOVMAC2], 4, { AVR32_OPERAND_PICO_OUT1, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, }, }, { AVR32_SYNTAX_PICOVMAC2, AVR32_PICO, &avr32_mnemonic_table[AVR32_MNEMONIC_PICOVMAC], AVR32_PARSER_ALIAS, { .alias = &avr32_alias_table[AVR32_ALIAS_PICOVMAC2] }, - NULL, 4, + &avr32_syntax_table[AVR32_SYNTAX_PICOVMAC3], 4, { AVR32_OPERAND_PICO_OUT2, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, }, }, { + AVR32_SYNTAX_PICOVMAC3, + AVR32_PICO, &avr32_mnemonic_table[AVR32_MNEMONIC_PICOVMAC], AVR32_PARSER_ALIAS, + { .alias = &avr32_alias_table[AVR32_ALIAS_PICOVMAC3] }, + NULL, 4, + { + AVR32_OPERAND_PICO_OUT3, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + }, + }, + { AVR32_SYNTAX_PICOVMUL0, AVR32_PICO, &avr32_mnemonic_table[AVR32_MNEMONIC_PICOVMUL], AVR32_PARSER_ALIAS, { .alias = &avr32_alias_table[AVR32_ALIAS_PICOVMUL0] }, &avr32_syntax_table[AVR32_SYNTAX_PICOVMUL1], 4, { AVR32_OPERAND_PICO_OUT0, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, }, }, { @@ -5425,24 +5497,36 @@ &avr32_syntax_table[AVR32_SYNTAX_PICOVMUL2], 4, { AVR32_OPERAND_PICO_OUT1, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, }, }, { AVR32_SYNTAX_PICOVMUL2, AVR32_PICO, &avr32_mnemonic_table[AVR32_MNEMONIC_PICOVMUL], AVR32_PARSER_ALIAS, { .alias = &avr32_alias_table[AVR32_ALIAS_PICOVMUL2] }, - NULL, 4, + &avr32_syntax_table[AVR32_SYNTAX_PICOVMUL3], 4, { AVR32_OPERAND_PICO_OUT2, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, - AVR32_OPERAND_PICO_REG_W, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, }, }, { + AVR32_SYNTAX_PICOVMUL3, + AVR32_PICO, &avr32_mnemonic_table[AVR32_MNEMONIC_PICOVMUL], AVR32_PARSER_ALIAS, + { .alias = &avr32_alias_table[AVR32_ALIAS_PICOVMUL3] }, + NULL, 4, + { + AVR32_OPERAND_PICO_OUT3, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + AVR32_OPERAND_PICO_IN, + }, + }, + { AVR32_SYNTAX_PICOLD_D2, AVR32_PICO, &avr32_mnemonic_table[AVR32_MNEMONIC_PICOLD_D], AVR32_PARSER_ALIAS, { .alias = &avr32_alias_table[AVR32_ALIAS_PICOLD_D2] }, Index: binutils/opcodes/avr32-opc.h =================================================================== --- binutils/opcodes/avr32-opc.h (revision 6632) +++ binutils/opcodes/avr32-opc.h (working copy) @@ -182,9 +182,11 @@ AVR32_OPERAND_PICO_REG_D, AVR32_OPERAND_PICO_REGLIST_W, AVR32_OPERAND_PICO_REGLIST_D, + AVR32_OPERAND_PICO_IN, AVR32_OPERAND_PICO_OUT0, AVR32_OPERAND_PICO_OUT1, AVR32_OPERAND_PICO_OUT2, + AVR32_OPERAND_PICO_OUT3, AVR32_OPERAND__END_ }; #define AVR32_OPERAND_UNKNOWN AVR32_OPERAND__END_ @@ -1148,15 +1150,19 @@ AVR32_SYNTAX_PICOSVMAC0, AVR32_SYNTAX_PICOSVMAC1, AVR32_SYNTAX_PICOSVMAC2, + AVR32_SYNTAX_PICOSVMAC3, AVR32_SYNTAX_PICOSVMUL0, AVR32_SYNTAX_PICOSVMUL1, AVR32_SYNTAX_PICOSVMUL2, + AVR32_SYNTAX_PICOSVMUL3, AVR32_SYNTAX_PICOVMAC0, AVR32_SYNTAX_PICOVMAC1, AVR32_SYNTAX_PICOVMAC2, + AVR32_SYNTAX_PICOVMAC3, AVR32_SYNTAX_PICOVMUL0, AVR32_SYNTAX_PICOVMUL1, AVR32_SYNTAX_PICOVMUL2, + AVR32_SYNTAX_PICOVMUL3, AVR32_SYNTAX_PICOLD_D2, AVR32_SYNTAX_PICOLD_D3, AVR32_SYNTAX_PICOLD_D1, @@ -1220,15 +1226,19 @@ AVR32_ALIAS_PICOSVMAC0, AVR32_ALIAS_PICOSVMAC1, AVR32_ALIAS_PICOSVMAC2, + AVR32_ALIAS_PICOSVMAC3, AVR32_ALIAS_PICOSVMUL0, AVR32_ALIAS_PICOSVMUL1, AVR32_ALIAS_PICOSVMUL2, + AVR32_ALIAS_PICOSVMUL3, AVR32_ALIAS_PICOVMAC0, AVR32_ALIAS_PICOVMAC1, AVR32_ALIAS_PICOVMAC2, + AVR32_ALIAS_PICOVMAC3, AVR32_ALIAS_PICOVMUL0, AVR32_ALIAS_PICOVMUL1, AVR32_ALIAS_PICOVMUL2, + AVR32_ALIAS_PICOVMUL3, AVR32_ALIAS_PICOLD_D1, AVR32_ALIAS_PICOLD_D2, AVR32_ALIAS_PICOLD_D3, Index: binutils/gas/config/tc-avr32.c =================================================================== --- binutils/gas/config/tc-avr32.c (revision 6632) +++ binutils/gas/config/tc-avr32.c (working copy) @@ -860,30 +860,50 @@ #define match_pico_reglist_d match_anything static int -match_pico_out0(char *str) +match_pico_in(char *str) { - if (strncasecmp(str, "outpix", 6) != 0) + unsigned long regid; + char *end; + + if (strncasecmp(str, "in", 2) != 0) return 0; - if (str[6] != '0' || str[7]) + + str += 2; + regid = strtoul(str, &end, 10); + if (!*str || *end) return 0; + return 1; } static int +match_pico_out0(char *str) +{ + if (strcasecmp(str, "out0") != 0) + return 0; + return 1; +} + +static int match_pico_out1(char *str) { - if (strncasecmp(str, "outpix", 6) != 0) + if (strcasecmp(str, "out1") != 0) return 0; - if (str[6] != '1' || str[7]) - return 0; return 1; } + static int match_pico_out2(char *str) { - if (strncasecmp(str, "outpix", 6) != 0) + if (strcasecmp(str, "out2") != 0) return 0; - if (str[6] != '2' || str[7]) + return 1; +} + +static int +match_pico_out3(char *str) +{ + if (strcasecmp(str, "out3") != 0) return 0; return 1; } @@ -1921,9 +1941,27 @@ current_insn.field_value[slot].value = regmask_d; } +static void +parse_pico_in(const struct avr32_operand *op ATTRIBUTE_UNUSED, + char *str, int opindex ATTRIBUTE_UNUSED) +{ + unsigned long regid; + int slot; + + regid = strtoul(str + 2, NULL, 10); + + if (regid >= 12) + as_bad(_("invalid PiCo IN register `%s'"), str); + + slot = current_insn.next_slot++; + current_insn.field_value[slot].value = regid; + current_insn.field_value[slot].align_order = 0; +} + #define parse_pico_out0 parse_nothing #define parse_pico_out1 parse_nothing #define parse_pico_out2 parse_nothing +#define parse_pico_out3 parse_nothing #define OP(name, sgn, pcrel, align, func) \ { AVR32_OPERAND_##name, sgn, pcrel, align, match_##func, parse_##func } @@ -1974,9 +2012,11 @@ OP(PICO_REG_D, 0, 0, 1, picoreg), OP(PICO_REGLIST_W, 0, 0, 0, pico_reglist_w), OP(PICO_REGLIST_D, 0, 0, 0, pico_reglist_d), + OP(PICO_IN, 0, 0, 0, pico_in), OP(PICO_OUT0, 0, 0, 0, pico_out0), OP(PICO_OUT1, 0, 0, 0, pico_out1), OP(PICO_OUT2, 0, 0, 0, pico_out2), + OP(PICO_OUT3, 0, 0, 0, pico_out3), }; symbolS * Index: binutils/gas/testsuite/gas/avr32/pico.d =================================================================== --- binutils/gas/testsuite/gas/avr32/pico.d (revision 6632) +++ binutils/gas/testsuite/gas/avr32/pico.d (working copy) @@ -7,28 +7,28 @@ Disassembly of section \.text: [0-9a-f]* : - *[0-9a-f]*: e1 a7 22 22 cop cp1,cr2,cr2,cr2,0xe *[0-9a-f]*: e1 a6 20 00 cop cp1,cr0,cr0,cr0,0xc - *[0-9a-f]*: e1 a6 30 21 cop cp1,cr0,cr2,cr1,0xd - *[0-9a-f]*: e1 a7 21 02 cop cp1,cr1,cr0,cr2,0xe + *[0-9a-f]*: e1 a7 2b bb cop cp1,cr11,cr11,cr11,0xe + *[0-9a-f]*: e1 a6 3a 05 cop cp1,cr10,cr0,cr5,0xd + *[0-9a-f]*: e1 a7 36 90 cop cp1,cr6,cr9,cr0,0xf [0-9a-f]* : - *[0-9a-f]*: e1 a5 22 22 cop cp1,cr2,cr2,cr2,0xa *[0-9a-f]*: e1 a4 20 00 cop cp1,cr0,cr0,cr0,0x8 - *[0-9a-f]*: e1 a4 30 21 cop cp1,cr0,cr2,cr1,0x9 - *[0-9a-f]*: e1 a5 21 02 cop cp1,cr1,cr0,cr2,0xa + *[0-9a-f]*: e1 a5 2b bb cop cp1,cr11,cr11,cr11,0xa + *[0-9a-f]*: e1 a4 3a 05 cop cp1,cr10,cr0,cr5,0x9 + *[0-9a-f]*: e1 a5 36 90 cop cp1,cr6,cr9,cr0,0xb [0-9a-f]* : - *[0-9a-f]*: e1 a3 22 22 cop cp1,cr2,cr2,cr2,0x6 *[0-9a-f]*: e1 a2 20 00 cop cp1,cr0,cr0,cr0,0x4 - *[0-9a-f]*: e1 a2 30 21 cop cp1,cr0,cr2,cr1,0x5 - *[0-9a-f]*: e1 a3 21 02 cop cp1,cr1,cr0,cr2,0x6 + *[0-9a-f]*: e1 a3 2b bb cop cp1,cr11,cr11,cr11,0x6 + *[0-9a-f]*: e1 a2 3a 05 cop cp1,cr10,cr0,cr5,0x5 + *[0-9a-f]*: e1 a3 36 90 cop cp1,cr6,cr9,cr0,0x7 [0-9a-f]* : - *[0-9a-f]*: e1 a1 22 22 cop cp1,cr2,cr2,cr2,0x2 *[0-9a-f]*: e1 a0 20 00 cop cp1,cr0,cr0,cr0,0x0 - *[0-9a-f]*: e1 a0 30 21 cop cp1,cr0,cr2,cr1,0x1 - *[0-9a-f]*: e1 a1 21 02 cop cp1,cr1,cr0,cr2,0x2 + *[0-9a-f]*: e1 a1 2b bb cop cp1,cr11,cr11,cr11,0x2 + *[0-9a-f]*: e1 a0 3a 05 cop cp1,cr10,cr0,cr5,0x1 + *[0-9a-f]*: e1 a1 36 90 cop cp1,cr6,cr9,cr0,0x3 [0-9a-f]* : *[0-9a-f]*: e9 af 3e ff ldc\.d cp1,cr14,pc\[0x3fc\] Index: binutils/gas/testsuite/gas/avr32/pico.s =================================================================== --- binutils/gas/testsuite/gas/avr32/pico.s (revision 6632) +++ binutils/gas/testsuite/gas/avr32/pico.s (working copy) @@ -2,28 +2,28 @@ .text .global picosvmac picosvmac: - picosvmac outpix0, inpix0, inpix0, inpix0 - picosvmac outpix2, inpix2, inpix2, inpix2 - picosvmac outpix1, inpix2, inpix0, inpix1 - picosvmac outpix0, inpix1, inpix2, inpix0 + picosvmac out0, in0, in0, in0 + picosvmac out2, in11, in11, in11 + picosvmac out1, in10, in0, in5 + picosvmac out3, in6, in9, in0 .global picosvmul picosvmul: - picosvmul outpix0, inpix0, inpix0, inpix0 - picosvmul outpix2, inpix2, inpix2, inpix2 - picosvmul outpix1, inpix2, inpix0, inpix1 - picosvmul outpix0, inpix1, inpix2, inpix0 + picosvmul out0, in0, in0, in0 + picosvmul out2, in11, in11, in11 + picosvmul out1, in10, in0, in5 + picosvmul out3, in6, in9, in0 .global picovmac picovmac: - picovmac outpix0, inpix0, inpix0, inpix0 - picovmac outpix2, inpix2, inpix2, inpix2 - picovmac outpix1, inpix2, inpix0, inpix1 - picovmac outpix0, inpix1, inpix2, inpix0 + picovmac out0, in0, in0, in0 + picovmac out2, in11, in11, in11 + picovmac out1, in10, in0, in5 + picovmac out3, in6, in9, in0 .global picovmul picovmul: - picovmul outpix0, inpix0, inpix0, inpix0 - picovmul outpix2, inpix2, inpix2, inpix2 - picovmul outpix1, inpix2, inpix0, inpix1 - picovmul outpix0, inpix1, inpix2, inpix0 + picovmul out0, in0, in0, in0 + picovmul out2, in11, in11, in11 + picovmul out1, in10, in0, in5 + picovmul out3, in6, in9, in0 .global picold_d picold_d: picold.d vmu2_out, pc[1020]