aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2016-12-23MIPS16: Add ASMACRO instruction supportMaciej W. Rozycki5-0/+71
Add ASMACRO instruction support as per the MIPS16e ASE architecture specifications [1][2], completing MIPS16e instruction set support. [1] "MIPS32 Architecture for Programmers, Volume IV-a: The MIPS16e Application-Specific Extension to the MIPS32 Architecture", MIPS Technologies, Inc., Document Number: MD00076, Revision 2.63, July 16, 2013, Section 4.1 "MIPS16e Instruction Descriptions", p. 65 [2] "MIPS64 Architecture for Programmers, Volume IV-a: The MIPS16e Application-Specific Extension to the MIPS64 Architecture", MIPS Technologies, Inc., Document Number: MD00077, Revision 2.60, June 25, 2008, Section 1.1 "MIPS16e Instruction Descriptions", p. 66 include/ * opcode/mips.h: Document `0', `1', `2', `3', `4' and `s' operand codes. opcodes/ * mips16-opc.c (decode_mips16_operand): Add `0', `1', `2', `3', `4' and `s' operand codes. (mips16_opcodes): Add "asmacro" entry. binutils/ * testsuite/binutils-all/mips/mips16-extend-insn.d: Update for ASMACRO support. gas/ * testsuite/gas/mips/mips16-asmacro.d: New test. * testsuite/gas/mips/mips16-32@mips16-asmacro.d: New test. * testsuite/gas/mips/mips16-64@mips16-asmacro.d: New test. * testsuite/gas/mips/mips16-asmacro.s: New test source. * testsuite/gas/mips/mips.exp: Run the new tests.
2016-12-23MIPS16/GAS: Clean up invalid unextended operand handlingMaciej W. Rozycki7-0/+222
Bail out right away when an unextended instruction encoding is required either with the use of a `.t' suffix or by means of `.set noautoextend', however an operand supplied requires the extended instruction form to be used. This is to avoid messing up with the internal state of the assembler, even though no actual failures are known to happen as a result. Add test cases for the situation concerned. gas/ * config/tc-mips.c (match_mips16_insn): Don't update `forced_insn_length' or the instruction opcode if an operand requires an extended instruction form, but an unextended one has been requested. * testsuite/gas/mips/mips16-relax-unextended-1.d: New test. * testsuite/gas/mips/mips16-relax-unextended-2.d: New test. * testsuite/gas/mips/mips16-relax-unextended-1.l: New stderr output. * testsuite/gas/mips/mips16-relax-unextended-2.l: New stderr output. * testsuite/gas/mips/mips16-relax-unextended-1.s: New test source. * testsuite/gas/mips/mips16-relax-unextended-2.s: New test source. * testsuite/gas/mips/mips.exp: Run the new tests.
2016-12-23MIPS16: Handle non-extensible instructions correctlyMaciej W. Rozycki23-43/+1096
Identify non-extensible instructions in the MIPS16 opcode table and disallow their use with the `.e' instruction size suffix in assembly and do not interpret any EXTEND prefix present as a part of the instruction in disassembly. According to all versions of the MIPS16 ASE specifications the following instructions encodings are not extensible [1][2][3][4][5][6]: I8/MOV32R, I8/MOVR32, all RRR minor opcodes, all RR minor opcodes except from DSRA and DSRL, and EXTEND itself, and as from revision 2.50 of the MIPS16e ASE specifications it has been further clarified what was previously implied, that non-extesiable instructions when preceded with an EXTEND prefix must cause a Reserved Instruction exception [3][5]. Therefore in the presence of an EXTEND prefix none of these instructions are supposed to be handled as extended instructions and supporting these forms in disassembly causes confusion, and in the case of the RRR major opcode it also clashes with the ASMACRO encoding. References: [1] "Product Description, MIPS16 Application-Specific Extension", Version 1.3, MIPS Technologies, Inc., 970130, Table 3. "MIPS16 Instruction Set Summary", p. 5 [2] same, Table 5 "RR Minor Opcodes (RR-type instructions)", p.10 [3] "MIPS32 Architecture for Programmers, Volume IV-a: The MIPS16e Application-Specific Extension to the MIPS32 Architecture", MIPS Technologies, Inc., Document Number: MD00076, Revision 2.63, July 16, 2013, Section 3.9 "MIPS16e Instruction Summaries", pp. 37-39 [4] same, Section 3.15 "Instruction Bit Encoding", pp. 46-49 [5] "MIPS64 Architecture for Programmers, Volume IV-a: The MIPS16e Application-Specific Extension to the MIPS64 Architecture", MIPS Technologies, Inc., Document Number: MD00077, Revision 2.60, June 25, 2008, Section 1.9 "MIPS16e Instruction Summaries", pp. 38-41 [6] same, Section 1.15 "Instruction Bit Encoding", pp. 48-51 include/ * opcode/mips.h (INSN2_SHORT_ONLY): New macro. gas/ * config/tc-mips.c (is_size_valid_16): Disallow a `.e' suffix instruction size override for INSN2_SHORT_ONLY opcode table entries. * testsuite/gas/mips/mips16-extend-swap.d: Adjust output. * testsuite/gas/mips/mips16-macro-e.l: Adjust error messages. * testsuite/gas/mips/mips16-32@mips16-macro-e.l: Adjust error messages. * testsuite/gas/mips/mips16e-32@mips16-macro-e.l: Adjust error messages. * testsuite/gas/mips/mips16-insn-e.d: New test. * testsuite/gas/mips/mips16-insn-t.d: New test. * testsuite/gas/mips/mips16-32@mips16-insn-e.d: New test. * testsuite/gas/mips/mips16-64@mips16-insn-e.d: New test. * testsuite/gas/mips/mips16e-32@mips16-insn-e.d: New test. * testsuite/gas/mips/mips16-32@mips16-insn-t.d: New test. * testsuite/gas/mips/mips16-64@mips16-insn-t.d: New test. * testsuite/gas/mips/mips16e-32@mips16-insn-t.d: New test. * testsuite/gas/mips/mips16-insn-e.l: New stderr output. * testsuite/gas/mips/mips16-insn-t.l: New stderr output. * testsuite/gas/mips/mips16-32@mips16-insn-e.l: New stderr output. * testsuite/gas/mips/mips16-64@mips16-insn-e.l: New stderr output. * testsuite/gas/mips/mips16e-32@mips16-insn-e.l: New stderr output. * testsuite/gas/mips/mips16-32@mips16-insn-t.l: New stderr output. * testsuite/gas/mips/mips16-64@mips16-insn-t.l: New stderr output. * testsuite/gas/mips/mips16e-32@mips16-insn-t.l: New stderr output. * testsuite/gas/mips/mips16-insn-e.s: New test source. * testsuite/gas/mips/mips16-insn-t.s: New test source. * testsuite/gas/mips/mips.exp: Run the new tests. opcodes/ * mips-dis.c (print_insn_mips16): Disallow EXTEND prefix matching for INSN2_SHORT_ONLY opcode table entries. * mips16-opc.c (SH): New macro. (mips16_opcodes): Set SH in `pinfo2' for non-extensible instruction entries: "nop", "addu", "and", "break", "cmp", "daddu", "ddiv", "ddivu", "div", "divu", "dmult", "dmultu", "drem", "dremu", "dsllv", "dsll", "dsrav", "dsra", "dsrlv", "dsrl", "dsubu", "exit", "entry", "jalr", "jal", "jr", "j", "jalrc", "jrc", "mfhi", "mflo", "move", "mult", "multu", "neg", "not", "or", "rem", "remu", "sllv", "sll", "slt", "sltu", "srav", "sra", "srlv", "srl", "subu", "xor", "sdbbp", "seb", "seh", "sew", "zeb", "zeh", "zew" and "extend". binutils/ * testsuite/binutils-all/mips/mips16-extend-insn.d: New test. * testsuite/binutils-all/mips/mips16-extend-insn.s: New test source. * testsuite/binutils-all/mips/mips.exp: Run the new tests.
2016-12-23MIPS16/GAS: Fix forced size suffixes with argumentless instructionsMaciej W. Rozycki3-0/+27
Correct the handling of `.e' and `.t' instruction size suffixes with instruction mnemonics which are not followed by any text on the same line, such as arguments or white space, e.g.: $ cat test.s .set mips16 foo: entry.t # comment entry.t exit.t # comment exit.t nop.t # comment nop.t $ as -32 -o test.o test.s test.s: Assembler messages: test.s:4: Error: unrecognized opcode `entry.t' test.s:6: Error: unrecognized opcode `exit.t' test.s:8: Error: unrecognized opcode `nop.t' $ gas/ * config/tc-mips.c (mips16_ip): Handle `.e' and `.t' instruction suffixes followed by a null character rather than a space too. * testsuite/gas/mips/mips16-insn-length-noargs.d: New test. * testsuite/gas/mips/mips16-insn-length-noargs.s: New test source. * testsuite/gas/mips/mips.exp: Run the new test.
2016-12-23MIPS16/GAS: Disallow EXTEND delay-slot schedulingMaciej W. Rozycki3-0/+44
Do not allow any explicitly coded EXTEND instruction to be automatically scheduled into a jump delay slot, as an EXTEND prefix is coupled with the next regular MIPS16 instruction and therefore swapping it with a jump would change program's semantics; EXTEND is not architecturally allowed to be present in a jump delay slot anyway. opcodes/ * mips16-opc.c (mips16_opcodes): Set NODS in `pinfo' for "extend". gas/ * testsuite/gas/mips/mips16-extend-swap.d: New test. * testsuite/gas/mips/mips16-extend-swap.s: New test source. * testsuite/gas/mips/mips.exp: Run the new test.
2016-12-21Remove high bit set charactersAlan Modra1-5/+5
gas/ * doc/c-lm32.texi: Fix chars with high bit set. * testsuite/gas/bfin/vector2.s: Likewise. gold/ * arm.cc: Fix comment chars with high bit set. include/ * coff/pe.h: Fix comment chars with high bit set. * opcode/xgate.h: Likewise. ld/ * testsuite/ld-scripts/sysroot-prefix.exp: Fix chars with high bit set.
2016-12-20MIPS16/opcodes: Respect ISA and ASE in disassemblyMaciej W. Rozycki14-0/+1664
Limit MIPS16 instruction disassembly according to the ISA level and ASE set selected, as with the regular MIPS and microMIPS instruction sets. Retain the property of `objdump -m mips:16' disassembling all MIPS16 instructions however, regardless of any ISA level recorded in the binary examined. To validate the disassembler use the GAS test suite for its convenience of running tests across multiple ISAs, even though placing the tests in the binutils test suite would be more appropriate. Adjust the single binutils test which depends on 64-bit instruction disassembly to have the ISA level required actually recorded in the binary examined. opcodes/ * mips-dis.c (mips_arch_choices): Use ISA_MIPS64 rather than ISA_MIPS3 as the `isa' selection in the `bfd_mach_mips16' entry. (print_insn_mips16): Check opcode entries for validity against the ISA level and ASE set selected. binutils/ * testsuite/binutils-all/mips/mips16-undecoded.s: Use `.module' rather than `.set' to set the ISA level. gas/ * testsuite/gas/mips/mips16-sub.d: New test. * testsuite/gas/mips/mips16-32@mips16-sub.d: New test. * testsuite/gas/mips/mips16e-32@mips16-sub.d: New test. * testsuite/gas/mips/mips16e-sub.d: New test. * testsuite/gas/mips/mips16-32@mips16e-sub.d: New test. * testsuite/gas/mips/mips16-64@mips16e-sub.d: New test. * testsuite/gas/mips/mips16e-64-sub.d: New test. * testsuite/gas/mips/mips16-32@mips16e-64-sub.d: New test. * testsuite/gas/mips/mips16-64@mips16e-64-sub.d: New test. * testsuite/gas/mips/mips16e-32@mips16e-64-sub.d: New test. * testsuite/gas/mips/mips16-sub.s: New test source. * testsuite/gas/mips/mips16e-sub.s: New test source. * testsuite/gas/mips/mips16e-64-sub.s: New test source. * testsuite/gas/mips/mips.exp: Run the new tests.
2016-12-20MIPS/GAS/testsuite: Add RESTORE instruction to `mips16e' testMaciej W. Rozycki2-1/+3
Add a RESTORE instruction smoke test to the `mips16e' GAS test. gas/ * testsuite/gas/mips/mips16e.s: Add a RESTORE instruction. * testsuite/gas/mips/mips16e.d: Adjust accordingly.
2016-12-20MIPS/GAS/testsuite: Extend MIPS16 testing over multiple ISAsMaciej W. Rozycki23-167/+1948
Run the `mips16', `mips16-64', `mips16e-64', `mips16-macro', `mips16-macro-e' and `mips16-macro-t' GAS tests over multiple MIPS16 ISAs. gas/ * testsuite/gas/mips/mips16.d: Adjust test for multiple MIPS16 ISA testing. * testsuite/gas/mips/mips16-64.d: Adjust test for multiple MIPS16 ISA testing. * testsuite/gas/mips/mips16e-64.d: Adjust test for multiple MIPS16 ISA testing. * testsuite/gas/mips/mips16-macro.d: Adjust test for multiple MIPS16 ISA testing. * testsuite/gas/mips/mips16e-64.s: Ensure MIPS16 ISA annotation. * testsuite/gas/mips/mips16e-64.l: Rename to... * testsuite/gas/mips/mips16e-32@mips16e-64.l: ... this. * testsuite/gas/mips/mips16-64@mips16.d: New test. * testsuite/gas/mips/mips16-64@mips16-64.d: New test. * testsuite/gas/mips/mips16e-32@mips16e-64.d: New test. * testsuite/gas/mips/mips16-32@mips16-macro.d: New test. * testsuite/gas/mips/mips16-64@mips16-macro.d: New test. * testsuite/gas/mips/mips16e-32@mips16-macro.d: New test. * testsuite/gas/mips/mips16-32@mips16-macro-e.d: New test. * testsuite/gas/mips/mips16e-32@mips16-macro-e.d: New test. * testsuite/gas/mips/mips16-32@mips16-macro-t.d: New test. * testsuite/gas/mips/mips16e-32@mips16-macro-t.d: New test. * testsuite/gas/mips/mips16e-32@mips16e-64.l: New stderr output. * testsuite/gas/mips/mips16-32@mips16-macro.l: New stderr output. * testsuite/gas/mips/mips16e-32@mips16-macro.l: New stderr output. * testsuite/gas/mips/mips16-32@mips16-macro-e.l: New stderr output. * testsuite/gas/mips/mips16e-32@mips16-macro-e.l: New stderr output. * testsuite/gas/mips/mips16-32@mips16-macro-t.l: New stderr output. * testsuite/gas/mips/mips16e-32@mips16-macro-t.l: New stderr output. * testsuite/gas/mips/mips.exp: Run `mips16', `mips16-64', `mips16-macro', `mips16-macro-t', `mips16-macro-e' and `mips16e-64' testing across multiple MIPS16 ISAs. Fold `mips16-macro' and `mips16e-64' list test invocations into corresponding dump tests.
2016-12-20MIPS/GAS/testsuite: Implement individual MIPS16 ISA testingMaciej W. Rozycki5-7/+163
Implement individual MIPS16 ISA GAS testing for the 32-bit and 64-bit variants of the base MIPS16 and the MIPS16e ISA each. gas/ * testsuite/gas/mips/mips.exp (run_dump_test_arch): Add `mips16e' and `mips16' prefixes. (run_list_test_arch): Likewise. Rename `mips16' architecture to `mips16-32'. Add `mips16-64', `mips16e-32' and `mips16e-64' architectures. Update `rol64', `mips16e', `elf${el}-rel2' and `elf-rel4' test invocations accordingly. * testsuite/gas/mips/mips16e@branch-swap-3.d: New test. * testsuite/gas/mips/mips16e@branch-swap-4.d: New test. * testsuite/gas/mips/mips16e@loc-swap-dis.d: New test. * testsuite/gas/mips/mips16e@loc-swap.d: New test.
2016-12-20MIPS/GAS/testsuite: Fix trailing padding in `loc-swap.s'Maciej W. Rozycki4-4/+3
Pad alignment with zeros rather than NOP instructions, for sensible multi-ISA MIPS16 testing. gas/ * testsuite/gas/mips/loc-swap.s: Use zeros rather than NOPs for trailing alignment padding. * testsuite/gas/mips/loc-swap.d: Adjust accordingly. * testsuite/gas/mips/micromips@loc-swap.d: Likewise. * testsuite/gas/mips/mips16@loc-swap-dis.d: Likewise.
2016-12-20MIPS16: Switch to 32-bit opcode table interpretationMaciej W. Rozycki12-0/+274
Switch to 32-bit MIPS16 opcode table entry interpretation, similar to how the microMIPS opcode table is handled, for both the `match' and `mask' fields, removing special casing for JAL and JALX instructions and their `a' and `i' operand codes throughout, while retaining automatic processing of extendable opcodes in assembly and disassembly. In assembly disallow size enforcement suffixes as appropriate: `.t' for both 32-bit instructions and macros and `.e' for macros only, making macro handling consistent with the microMIPS instruction set. In disassembly fully decode EXTEND prefixes prepended to unsupported instruction encodings (according to the ISA selection) rather than dumping them as hexadecimal data along with the following instruction, removing all special casing for the EXTEND prefix and making its handling rely on its opcode table entry, except where it is considered a part of an extendable instruction. include/ * opcode/mips.h (mips_opcode_32bit_p): New inline function. gas/ * config/tc-mips.c (micromips_insn_length): Use `mips_opcode_32bit_p'. (is_size_valid): Adjust description. (is_size_valid_16): New function. (validate_mips_insn): Use `mips_opcode_32bit_p' in MIPS16 operand decoding. (validate_mips16_insn): Remove `a' and `i' operand code special casing, use `mips_opcode_32bit_p' to determine instruction width. (append_insn): Adjust forced MIPS16 instruction size determination. (match_mips16_insn): Likewise. Don't shift the instruction's opcode with the `a' and `i' operand codes. Use `mips_opcode_32bit_p' in operand decoding. (match_mips16_insns): Check for forced instruction size's validity. (mips16_ip): Don't force instruction size in the `noautoextend' mode. * testsuite/gas/mips/mips16-jal-e.d: New test. * testsuite/gas/mips/mips16-jal-t.d: New test. * testsuite/gas/mips/mips16-macro-e.d: New test. * testsuite/gas/mips/mips16-macro-t.d: New test. * testsuite/gas/mips/mips16-jal-t.l: New stderr output. * testsuite/gas/mips/mips16-macro-e.l: New stderr output. * testsuite/gas/mips/mips16-macro-t.l: New stderr output. * testsuite/gas/mips/mips16-jal-e.s: New test source. * testsuite/gas/mips/mips16-jal-t.s: New test source. * testsuite/gas/mips/mips16-macro-e.s: New test source. * testsuite/gas/mips/mips16-macro-t.s: New test source. * testsuite/gas/mips/mips.exp: Run the new tests. opcodes/ * mips-dis.c (print_mips16_insn_arg): Always handle `extend' and `insn' together, with `extend' as the high-order 16 bits. (match_kind): New enum. (print_insn_mips16): Rework for 32-bit instruction matching. Do not dump EXTEND prefixes here. * mips16-opc.c (mips16_opcodes): Move "extend" entry to the end. Recode `match' and `mask' fields as 32-bit in absolute "jal" and "jalx" entries. binutils/ * testsuite/binutils-all/mips/mips16-extend-noinsn.d: Adjust test for separate EXTEND prefix disassembly.
2016-12-20MIPS16/opcodes: Correct 64-bit macros' ISA membershipMaciej W. Rozycki2-0/+13
Limit the DDIV, DDIVU, DREM, DREMU and DSUBU macros to the MIPS III rather than MIPS I ISA. These macros expand to machine code sequences including 64-bit instructions which require a 64-bit ISA. Entries for those instructions are already correctly marked, however the marking is ignored if entries are used in the process of macro expansion rather than directly, making it possible to indirectly produce 64-bit machine code even when output requested has been limited to a 32-bit ISA. opcodes/ * mips16-opc.c (mips16_opcodes): Set membership to I3 rather than I1 for the "ddiv", "ddivu", "drem", "dremu" and "dsubu" INSN_MACRO entries. gas/ * testsuite/gas/mips/mips16-macro.l: New list test. * testsuite/gas/mips/mips.exp: Run the new test.
2016-12-20MIPS16/opcodes: Correct I64/SDRASP opcode's ISA membershipMaciej W. Rozycki4-0/+13
Limit the `SD ra, offset(sp)' instruction (I64/SDRASP major/minor opcode) to the MIPS III rather than MIPS I ISA. This is a 64-bit instruction requiring a 64-bit ISA. This bug has been there since forever. opcodes/ * mips16-opc.c (mips16_opcodes): Set membership to I3 rather than I1 for the SP-relative "sd"/$ra entry (SDRASP minor opcode). gas/ * testsuite/gas/mips/mips16-sdrasp.d: New test. * testsuite/gas/mips/mips16-sdrasp.l: New stderr output. * testsuite/gas/mips/mips16-sdrasp.s: New test source. * testsuite/gas/mips/mips.exp: Run the new test.
2016-12-20MIPS/GAS/testsuite: Correct NewABI test selectionMaciej W. Rozycki1-27/+79
Make sure all tests that require NewABI support are only run with `has_newabi' targets, removing numerous `mips-sgi-irix5' failures. gas/ * testsuite/gas/mips/mips.exp: Limit remaining tests that require NewABI support to `has_newabi' targets.
2016-12-14MIPS16/GAS: Fix assertion failures with relocations on 16-bit instructionsMaciej W. Rozycki6-0/+31
Complement commit c9775dde3277 ("MIPS16: Add R_MIPS16_PC16_S1 branch relocation support)" and report an assembly error when a relocation is required for an instruction, currently a branch only, that has been forced to use its unextended encoding, either with the use of an explicit `.t' mnemonic suffix, or by means of `.set noautoextend' being active, fixing an assertion failure currently caused instead. gas/ * config/tc-mips.c (md_convert_frag): Report an error instead of asserting on `ext'. * testsuite/gas/mips/mips16-branch-unextended-1.d: New test. * testsuite/gas/mips/mips16-branch-unextended-2.d: New test. * testsuite/gas/mips/mips16-branch-unextended-1.s: New test source. * testsuite/gas/mips/mips16-branch-unextended-2.s: New test. * testsuite/gas/mips/mips16-branch-unextended.l: New stderr output. * testsuite/gas/mips/mips.exp: Run the new tests.
2016-12-14MIPS16: Fix SP-relative SD instruction annotationMaciej W. Rozycki3-0/+45
Fix the annotation of SP-relative SD instructions incorrectly marked as reading from the PC rather than SP, which in turn prevented their 16-bit forms from being scheduled into jump delay slots. This bug has been there since forever. opcodes/ * mips16-opc.c (mips16_opcodes): Set RD_SP rather than RD_PC in `pinfo2' with SP-relative "sd" entries. gas/ * testsuite/gas/mips/mips16-sprel-swap.d: New test. * testsuite/gas/mips/mips16-sprel-swap.s: New test source. * testsuite/gas/mips/mips.exp: Run the new test.
2016-12-13[Binutils][AARCH64]Remove Cn register for coprocessor CRn, CRm fieldRenlin Li2-108/+110
The internal CN register representation for coprocessor fields used in aarch64 sys, sysl instructions are removed in this patch. After the change, those fields are represented as immediate. Related checks are added as well. opcodes/ * aarch64-opc.c (aarch64_opnd_qualifiers): New CR value range qualifier. (operand_general_constraint_met_p): Remove case for CP_REG. (aarch64_print_operand): Print CRn, CRm operand using imm field. * aarch64-tbl.h (QL_SYS): Use CR qualifier. (QL_SYSL): Likewise. (aarch64_opcode_table): Change CRn, CRm operand class and type. * aarch64-opc-2.c : Regenerate. * aarch64-asm-2.c : Likewise. * aarch64-dis-2.c : Likewise. include/ * opcode/aarch64.h (aarch64_operand_class): Remove AARCH64_OPND_CLASS_CP_REG. (enum aarch64_opnd): Change AARCH64_OPND_Cn to AARCH64_OPND_CRn, AARCH64_OPND_Cm to AARCH64_OPND_CRm. (aarch64_opnd_qualifier): Define AARCH64_OPND_QLF_CR qualifier. gas/ * config/tc-aarch64.c (AARCH64_REG_TYPES): Remove CN register. (get_reg_expected_msg): Remove CN register case. (parse_operands): rewrite parser for CRn, CRm operand. (reg_names): Remove CN register. * testsuite/gas/aarch64/diagnostic.s: Add a new test case. * testsuite/gas/aarch64/diagnostic.l: Adjust error message.
2016-12-13[AArch64] Make GAS testcases support ILP32 modeJiong Wang109-210/+234
gas/ * gas/testsuite/gas/aarch64/addsub.d: Support ILP32 mode. * gas/testsuite/gas/aarch64/advsimd-across.d: Likewise. * gas/testsuite/gas/aarch64/advsimd-armv8_3.d: Likewise. * gas/testsuite/gas/aarch64/advsimd-fp16.d: Likewise. * gas/testsuite/gas/aarch64/advsimd-misc.d: Likewise. * gas/testsuite/gas/aarch64/advsisd-copy.d: Likewise. * gas/testsuite/gas/aarch64/advsisd-misc.d: Likewise. * gas/testsuite/gas/aarch64/alias.d: Likewise. * gas/testsuite/gas/aarch64/armv8-ras-1.d: Likewise. * gas/testsuite/gas/aarch64/b_1.d: Likewise. * gas/testsuite/gas/aarch64/beq_1.d: Likewise. * gas/testsuite/gas/aarch64/bitfield-dump: Likewise. * gas/testsuite/gas/aarch64/bitfield-no-aliases.d: Likewise. * gas/testsuite/gas/aarch64/codealign.d: Likewise. * gas/testsuite/gas/aarch64/codealign_1.d: Likewise. * gas/testsuite/gas/aarch64/crc32-directive.d: Likewise. * gas/testsuite/gas/aarch64/crc32.d: Likewise. * gas/testsuite/gas/aarch64/crypto-directive.d: Likewise. * gas/testsuite/gas/aarch64/crypto.d: Likewise. * gas/testsuite/gas/aarch64/dwarf.d: Likewise. * gas/testsuite/gas/aarch64/float-fp16.d: Likewise. * gas/testsuite/gas/aarch64/floatdp2.d: Likewise. * gas/testsuite/gas/aarch64/fp-armv8_3.d: Likewise. * gas/testsuite/gas/aarch64/fp-const0-parse.d: Likewise. * gas/testsuite/gas/aarch64/fp_cvt_int.d: Likewise. * gas/testsuite/gas/aarch64/fpmov.d: Likewise. * gas/testsuite/gas/aarch64/inst-directive.d: Likewise. * gas/testsuite/gas/aarch64/ldr_1.d: Likewise. * gas/testsuite/gas/aarch64/ldst-exclusive-armv8_3.d: Likewise. * gas/testsuite/gas/aarch64/ldst-exclusive.d: Likewise. * gas/testsuite/gas/aarch64/ldst-reg-imm-post-ind.d: Likewise. * gas/testsuite/gas/aarch64/ldst-reg-imm-pre-ind.d: Likewise. * gas/testsuite/gas/aarch64/ldst-reg-pair.d: Likewise. * gas/testsuite/gas/aarch64/ldst-reg-reg-offset.d: Likewise. * gas/testsuite/gas/aarch64/ldst-reg-uns-imm.d: Likewise. * gas/testsuite/gas/aarch64/ldst-reg-unscaled-imm.d: Likewise. * gas/testsuite/gas/aarch64/lor-directive.d: Likewise. * gas/testsuite/gas/aarch64/lor.d: Likewise. * gas/testsuite/gas/aarch64/lse-atomic.d: Likewise. * gas/testsuite/gas/aarch64/mapmisc.d: Likewise. * gas/testsuite/gas/aarch64/mov-no-aliases.d: Likewise. * gas/testsuite/gas/aarch64/mov.d: Likewise. * gas/testsuite/gas/aarch64/movi.d: Likewise. * gas/testsuite/gas/aarch64/movw_label.d: Likewise. * gas/testsuite/gas/aarch64/msr.d: Likewise. * gas/testsuite/gas/aarch64/neon-fp-cvt-int.d: Likewise. * gas/testsuite/gas/aarch64/neon-frint.d: Likewise. * gas/testsuite/gas/aarch64/neon-ins.d: Likewise. * gas/testsuite/gas/aarch64/neon-not.d: Likewise. * gas/testsuite/gas/aarch64/neon-vfp-reglist-post.d: Likewise. * gas/testsuite/gas/aarch64/neon-vfp-reglist.d: Likewise. * gas/testsuite/gas/aarch64/no-aliases.d: Likewise. * gas/testsuite/gas/aarch64/optional.d: Likewise. * gas/testsuite/gas/aarch64/pac.d: Likewise. * gas/testsuite/gas/aarch64/pan-directive.d: Likewise. * gas/testsuite/gas/aarch64/pan.d: Likewise. * gas/testsuite/gas/aarch64/rdma-directive.d: Likewise. * gas/testsuite/gas/aarch64/rdma.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_g0.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_g1.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_hi12.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_lo12-1.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc.d: Likewise. * gas/testsuite/gas/aarch64/reloc-tlsldm-1.d: Likewise. * gas/testsuite/gas/aarch64/reloc-tlsldm-page-1.d: Likewise. * gas/testsuite/gas/aarch64/reloc-tlsldm_lo12_nc-1.d: Likewise. * gas/testsuite/gas/aarch64/shifted.d: Likewise. * gas/testsuite/gas/aarch64/sve.d: Likewise. * gas/testsuite/gas/aarch64/symbol.d: Likewise. * gas/testsuite/gas/aarch64/sysreg-1.d: Likewise. * gas/testsuite/gas/aarch64/sysreg-2.d: Likewise. * gas/testsuite/gas/aarch64/sysreg-3.d: Likewise. * gas/testsuite/gas/aarch64/sysreg.d: Likewise. * gas/testsuite/gas/aarch64/system-2.d: Likewise. * gas/testsuite/gas/aarch64/system-3.d: Likewise. * gas/testsuite/gas/aarch64/system.d: Likewise. * gas/testsuite/gas/aarch64/tbz_1.d: Likewise. * gas/testsuite/gas/aarch64/tlbi_op.d: Likewise. * gas/testsuite/gas/aarch64/tls.d: Likewise. * gas/testsuite/gas/aarch64/uao-directive.d: Likewise. * gas/testsuite/gas/aarch64/uao.d: Likewise. * gas/testsuite/gas/aarch64/virthostext-directive.d: Likewise. * gas/testsuite/gas/aarch64/virthostext.d: Likewise. * gas/testsuite/gas/aarch64/adr_1.d: Restrict test under -mabi=lp64. * gas/testsuite/gas/aarch64/int-insns.d: Likewise. * gas/testsuite/gas/aarch64/programmer-friendly.d: Likewise. * gas/testsuite/gas/aarch64/reloc-data.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_g1_nc.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_g2.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst16.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst32.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst64.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst8.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst16.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst32.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst64.d: Likewise. * gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst8.d: Likewise. * gas/testsuite/gas/aarch64/reloc-gotoff_g0_nc.d: Likewise. * gas/testsuite/gas/aarch64/reloc-gotoff_g1.d: Likewise. * gas/testsuite/gas/aarch64/reloc-gottprel_g0_nc.d: Likewise. * gas/testsuite/gas/aarch64/reloc-gottprel_g1.d: Likewise. * gas/testsuite/gas/aarch64/reloc-insn.d: Likewise. * gas/testsuite/gas/aarch64/reloc-tlsdesc_off_g0_nc.d: Likewise. * gas/testsuite/gas/aarch64/reloc-tlsdesc_off_g1.d: Likewise. * gas/testsuite/gas/aarch64/reloc-tlsgd_g0_nc.d: Likewise. * gas/testsuite/gas/aarch64/reloc-tlsgd_g1.d: Likewise. * gas/testsuite/gas/aarch64/tail_padding.d: Likewise. * gas/testsuite/gas/aarch64/tls-desc.d: Likewise.
2016-12-09MIPS16/opcodes: Use hexadecimal interpretation for the `e' operand codeMaciej W. Rozycki3-0/+40
Make the `e' operand code used with raw EXTEND instructions use the hexadecimal rather than decimal format, for consistency with what is actually produced by code in `print_insn_mips16' dedicated to EXTEND disassembly. Due to that special handling the operand code is only interpreted for assembly however, which accepts either format either way, so there is no functional change here. opcodes/ * mips16-opc.c (decode_mips16_operand) <'e'>: Use HINT rather than UINT. gas/ * testsuite/gas/mips/mips16-extend.d: New test. * testsuite/gas/mips/mips16-extend.s: New test source. * testsuite/gas/mips/mips.exp: Run the new test.
2016-12-06Fix mmix assembler test to account for changes in the error messages ↵Nick Clifton1-2/+3
produced by the assembler. PR gas/20896 * testsuite/gas/mmix/err-byte1.s: Adjust expected warning messages to account for patch to next_char_of_string.
2016-12-05[ARM] Add ARMv8.3 VCMLA and VCADD instructionsSzabolcs Nagy5-0/+188
Add support for VCMLA and VCADD advanced SIMD complex number instructions. The command line option is -march=armv8.3-a+fp16+simd for enabling all instructions. In arm-dis.c the formatting syntax was abused a bit to select between 0 vs 90 or 180 vs 270 or 90 vs 270 based on a bit value instead of duplicating entries in the opcode table. gas/ * config/tc-arm.c (do_vcmla, do_vcadd): Define. (neon_scalar_for_vcmla): Define. (enum operand_parse_code): Add OP_IROT1 and OP_IROT2. (NEON_ENC_TAB): Add DDSI and QQSI variants. (insns): Add vcmla and vcadd. * testsuite/gas/arm/armv8_3-a-simd.d: New. * testsuite/gas/arm/armv8_3-a-simd.s: New. * testsuite/gas/arm/armv8_3-a-simd-bad.d: New. * testsuite/gas/arm/armv8_3-a-simd-bad.l: New. * testsuite/gas/arm/armv8_3-a-simd-bad.s: New. opcodes/ * arm-dis.c (coprocessor_opcodes): Add vcmla and vcadd. (print_insn_coprocessor): Add 'V' format for neon D or Q regs.
2016-12-05[ARC] Don't check extAuxRegister second argument for sign.Claudiu Zissulescu4-0/+19
gas/ 2016-12-05 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/gas/arc/textauxregister-1.d: New file. * testsuite/gas/arc/textauxregister-1.s: Likewise. * testsuite/gas/arc/textcondcode-err.s: Likewise. * testsuite/gas/arc/textcoreregister-err.s: Likewise. * config/tc-arc.c (tokenize_extregister): Return bfd_boolean, don't check second argument of extension auxiliary register for signess. (arc_extcorereg): Consider the return of tokenize_extregister function call.
2016-12-05[ARM] Add ARMv8.3 VJCVT instructionSzabolcs Nagy5-0/+40
Add support for VJCVT javascript conversion instruction. gas/ * config/tc-arm.c (arm_ext_v8_3, do_vjcvt): Define. (insns): Add vjcvt. * testsuite/gas/aarch64/armv8_3-a-fp.s: New. * testsuite/gas/aarch64/armv8_3-a-fp.d: New. * testsuite/gas/aarch64/armv8_3-a-fp-bad.s: New. * testsuite/gas/aarch64/armv8_3-a-fp-bad.d: New. * testsuite/gas/aarch64/armv8_3-a-fp-bad.l: New. opcodes/ * arm-dis.c (coprocessor_opcodes): Add vjcvt.
2016-12-02[ARC] Sync cpu names with the ones accepted by GCC.Claudiu Zissulescu6-0/+27
gas/ 2016-12-02 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/gas/arc/cpu-em-err.s: New file. * testsuite/gas/arc/cpu-em4-err.s: Likewise. * testsuite/gas/arc/cpu-fpuda-err.s: Likewise. * testsuite/gas/arc/cpu-hs-err.s: Likewise. * testsuite/gas/arc/cpu-quarkse-err.s: Likewise. * testsuite/gas/arc/noargs_a7.s: Add .cpu. * config/tc-arc.c (ARC_CPU_TYPE_A6xx): Define. (ARC_CPU_TYPE_A7xx): Likewise. (ARC_CPU_TYPE_AV2EM): Likewise. (ARC_CPU_TYPE_AV2HS): Likewise. (cpu_types): Update list of known CPU names. (arc_show_cpu_list): New function. (md_show_usage): Print accepted CPU names. (cl_features): New variable. (arc_select_cpu): Use cl_features. (arc_option): Allow various .cpu names. (md_parse_option): Set cl_features. * doc/c-arc.texi: Update -mcpu and .cpu documentation.
2016-11-29[ARC] Add checking for LP_COUNT reg usage, improve error reporting.Claudiu Zissulescu2-1/+10
gas/ 2016-11-29 Claudiu Zissulescu <claziss@synopsys.com> * config/tc-arc.c (find_opcode_match): New function argument errmsg. (assemble_tokens): Collect and report the eventual error message found during opcode matching process. * testsuite/gas/arc/lpcount-err.s: New file. * testsuite/gas/arc/add_s-err.s: Update error message. opcode/ 2016-11-29 Claudiu Zissulescu <claziss@synopsys.com> * arc-opc.c (insert_ra_chk): New function. (insert_rb_chk): Likewise. (insert_rad): Update text error message. (insert_rcd): Likewise. (insert_rhv2): Likewise. (insert_r0): Likewise. (insert_r1): Likewise. (insert_r2): Likewise. (insert_r3): Likewise. (insert_sp): Likewise. (insert_gp): Likewise. (insert_pcl): Likewise. (insert_blink): Likewise. (insert_ilink1): Likewise. (insert_ilink2): Likewise. (insert_ras): Likewise. (insert_rbs): Likewise. (insert_rcs): Likewise. (insert_simm3s): Likewise. (insert_rrange): Likewise. (insert_fpel): Likewise. (insert_blinkel): Likewise. (insert_pcel): Likewise. (insert_nps_3bit_dst): Likewise. (insert_nps_3bit_dst_short): Likewise. (insert_nps_3bit_src2_short): Likewise. (insert_nps_bitop_size_2b): Likewise. (MAKE_SRC_POS_INSERT_EXTRACT_FUNCS): Likewise. (RA_CHK): Define. (RB): Adjust. (RB_CHK): Define. (RC): Adjust. * arc-dis.c (print_insn_arc): Add LOAD and STORE class. * arc-tbl.h (div, divu): All instructions are DIVREM class. Change first insn argument to check for LP_COUNT usage. (rem): Likewise. (ld, ldd): All instructions are LOAD class. Change first insn argument to check for LP_COUNT usage. (st, std): All instructions are STORE class. (mac, mpy, dmac, mul, dmpy): All instructions are MPY class. Change first insn argument to check for LP_COUNT usage. (mov): All instructions are MOVE class. Change first insn argument to check for LP_COUNT usage. include/ 2016-11-29 Claudiu Zissulescu <claziss@synopsys.com> * opcode/arc.h (insn_class_t): Add DIVREM, LOAD, MOVE, MPY, STORE instruction classes.
2016-11-28X86: Ignore REX_B bit for 32-bit XOP instructionsAmit Pawar3-0/+29
While decoding 32-bit XOP instructions, 64 bit registers names are printed. This patch fixes this by ignoring REX_B bit in 32-bit mode. opcodes/ PR binutils/20637 * i386-dis.c (get_valid_dis386): Ignore REX_B for 32-bit XOP instructions. gas/ PR binutils/20637 * testsuite/gas/i386/xop32reg.d: New file. * testsuite/gas/i386/xop32reg.s: New file. * testsuite/gas/i386/i386.exp: Run new test.
2016-11-27Fix spelling in comments in Expect scripts (gas)Ambrogino Modigliani7-11/+11
* testsuite/gas/all/gas.exp: Fix spelling in comments. * testsuite/gas/cris/cris.exp: Fix spelling in comments. * testsuite/gas/hppa/basic/basic.exp: Fix spelling in comments. * testsuite/gas/hppa/parse/parse.exp: Fix spelling in comments. * testsuite/gas/hppa/reloc/reloc.exp: Fix spelling in comments. * testsuite/gas/sh/arch/arch.exp: Fix spelling in comments. * testsuite/gas/tic4x/tic4x.exp: Fix spelling in comments.
2016-11-27Fix spelling in comments in Assembler files (gas)Ambrogino Modigliani12-13/+13
* testsuite/gas/arm/local_function.d: Fix spelling in comments. * testsuite/gas/arm/req.s: Fix spelling in comments. * testsuite/gas/arm/vfp1.s: Fix spelling in comments. * testsuite/gas/arm/vfp1_t2.s: Fix spelling in comments. * testsuite/gas/arm/vfp1xD.s: Fix spelling in comments. * testsuite/gas/arm/vfp1xD_t2.s: Fix spelling in comments. * testsuite/gas/mcore/allinsn.s: Fix spelling in comments. * testsuite/gas/mips/24k-triple-stores-5.s: Fix spelling in comments. * testsuite/gas/mips/delay.d: Fix spelling in comments. * testsuite/gas/mips/nodelay.d: Fix spelling in comments. * testsuite/gas/mips/r5900-full.s: Fix spelling in comments. * testsuite/gas/mips/r5900.s: Fix spelling in comments.
2016-11-27Fix spelling in comments in C source files (gas)Ambrogino Modigliani2-6/+6
* as.h: Fix spelling in comments. * config/obj-ecoff.c: Fix spelling in comments. * config/obj-macho.c: Fix spelling in comments. * config/tc-aarch64.c: Fix spelling in comments. * config/tc-arc.c: Fix spelling in comments. * config/tc-arm.c: Fix spelling in comments. * config/tc-avr.c: Fix spelling in comments. * config/tc-cr16.c: Fix spelling in comments. * config/tc-epiphany.c: Fix spelling in comments. * config/tc-frv.c: Fix spelling in comments. * config/tc-hppa.c: Fix spelling in comments. * config/tc-hppa.h: Fix spelling in comments. * config/tc-i370.c: Fix spelling in comments. * config/tc-m68hc11.c: Fix spelling in comments. * config/tc-m68k.c: Fix spelling in comments. * config/tc-mcore.c: Fix spelling in comments. * config/tc-mep.c: Fix spelling in comments. * config/tc-metag.c: Fix spelling in comments. * config/tc-mips.c: Fix spelling in comments. * config/tc-mn10200.c: Fix spelling in comments. * config/tc-mn10300.c: Fix spelling in comments. * config/tc-nds32.c: Fix spelling in comments. * config/tc-nios2.c: Fix spelling in comments. * config/tc-ns32k.c: Fix spelling in comments. * config/tc-pdp11.c: Fix spelling in comments. * config/tc-ppc.c: Fix spelling in comments. * config/tc-riscv.c: Fix spelling in comments. * config/tc-rx.c: Fix spelling in comments. * config/tc-score.c: Fix spelling in comments. * config/tc-score7.c: Fix spelling in comments. * config/tc-sparc.c: Fix spelling in comments. * config/tc-tic54x.c: Fix spelling in comments. * config/tc-vax.c: Fix spelling in comments. * config/tc-xgate.h: Fix spelling in comments. * config/tc-xtensa.c: Fix spelling in comments. * config/tc-z80.c: Fix spelling in comments. * dwarf2dbg.c: Fix spelling in comments. * input-file.h: Fix spelling in comments. * itbl-ops.c: Fix spelling in comments. * read.c: Fix spelling in comments. * stabs.c: Fix spelling in comments. * symbols.c: Fix spelling in comments. * write.c: Fix spelling in comments. * testsuite/gas/all/itbl-test.c: Fix spelling in comments. * testsuite/gas/tic4x/opclasses.h: Fix spelling in comments.
2016-11-25gas: fix CBCOND diagnostics for invalid immediate operands.Jose E. Marchesi3-0/+9
This patch fixes two problems in the SPARC assembler: - The diagnostic message Error: Illegal operands: Immediate value in cbcond is out of range. is incorrectly issued for non-CBCOND instructions that feature a simm5 immediate field, such as MPMUL, MONTMUL, etc. - When an invalid immediate operand is used in a CBCOND instruction, two redundant error messages are issued to the user, the second due to a stale fixup (this happens since commit 85024cd8bcb93f4112470ecdbd6c10fc2aea724f). Some diagnostic tests for the CBCOND instructions are also included in the patch. Tested in both sparc64-linux-gnu and sparcv9-linux-gnu targets. gas/ChangeLog: 2016-11-25 Jose E. Marchesi <jose.marchesi@oracle.com> * config/tc-sparc.c (sparc_ip): Avoid emitting a cbcond error messages for non-cbcond instructions. * testsuite/gas/sparc/cbcond-diag.s: New file. * testsuite/gas/sparc/cbcond-diag.l: Likewise. * testsuite/gas/sparc/sparc.exp (gas_64_check): Run cbcond-diag tests.
2016-11-23gas: run the hwcaps-bump tests with 64-bit sparc objects only.Jose E. Marchesi1-1/+1
gas/ChangeLog: 2016-11-23 Jose E. Marchesi <jose.marchesi@oracle.com> * testsuite/gas/sparc/sparc.exp (gas_64_check): Make sure the hwcaps-bump test is run with 64-bit objects.
2016-11-22gas,opcodes: fix hardware capabilities bumping in the sparc assembler.Jose E. Marchesi3-0/+8
When the assembler finds an instruction which is part of a higher opcode architecture it bumps the current opcode architecture. For example: $ echo "mwait" | as -bump {standard input}: Assembler messages: {standard input}:1: Warning: architecture bumped from "v6" to "v9m" on "mwait" However, when two instructions pertaining to the same opcode architecture but associated to different SPARC hardware capabilities are found in the input stream, and no GAS architecture is specified in the command line, the assembler bangs: $ echo "mwait; wr %g0,%g1,%mcdper" | as -bump {standard input}: Assembler messages: {standard input}:1: Warning: architecture bumped from "v6" to "v9m" on "mwait" {standard input}:1: Error: Hardware capability "sparc5" not enabled for "wr". ... and it should'nt, as WRMCDPER pertains to the same architecture level than MWAIT. This patch fixes this by extending the definition of sparc opcode architectures to contain a set of hardware capabilities and making the assembler to take these capabilities into account when updating the set of allowed hwcaps when an architecture bump is triggered by some instruction. This way, hwcaps associated to architecture levels are maintained in opcodes, while the assembler keeps the flexibiity of defining GAS architectures including additional hwcaps (like -Asparcfmaf or the v8plus* variants). A test covering this failure case is included. gas/ChangeLog: 2016-11-22 Jose E. Marchesi <jose.marchesi@oracle.com> * config/tc-sparc.c: Move HWS_* and HWS2_* definitions to opcodes/sparc-opc.c. (sparc_arch): Clarify the new role of the hwcap_allowed and hwcap2_allowed fields. (sparc_arch_table): Remove HWS_* and HWS2_* instances from hwcap_allowed and hwcap2_allowed respectively. (md_parse_option): Include the opcode arch hwcaps when processing -A. (sparc_ip): Use the current opcode arch hwcaps to update hwcap_allowed, as well of the hwcaps of the instruction triggering the bump. * testsuite/gas/sparc/hwcaps-bump.s: New file. * testsuite/gas/sparc/hwcaps-bump.l: Likewise. * testsuite/gas/sparc/sparc.exp (gas_64_check): Run tests in hwcaps-bump. include/ChangeLog: 2016-11-22 Jose E. Marchesi <jose.marchesi@oracle.com> * opcode/sparc.h (sparc_opcode_arch): New fields hwcaps and hwcaps2. opcodes/ChangeLog: 2016-11-22 Jose E. Marchesi <jose.marchesi@oracle.com> * sparc-opc.c (HWS_V8): Definition moved from gas/config/tc-sparc.c. (HWS_V9): Likewise. (HWS_VA): Likewise. (HWS_VB): Likewise. (HWS_VC): Likewise. (HWS_VD): Likewise. (HWS_VE): Likewise. (HWS_VV): Likewise. (HWS_VM): Likewise. (HWS2_VM): Likewise. (sparc_opcode_archs): Initialize hwcaps and hwcaps2 fields of existing entries.
2016-11-22[ARC] Fix printing 'b' mnemonics.Claudiu Zissulescu1-2/+2
gas/ 2016-11-22 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/gas/arc/b.d: Update test result. opcode/ 2016-11-22 Claudiu Zissulescu <claziss@synopsys.com> * arc-tbl.h: Reorder conditional flags with delay flags for 'b' instructions.
2016-11-22PR20744, Incorrect PowerPC VLE relocsAlan Modra1-73/+73
VLE 16A and 16D relocs were functionally swapped. PR 20744 include/ * opcode/ppc.h: Define VLE insns using 16A and 16D relocs. bfd/ * elf32-ppc.h (struct ppc_elf_params): Add vle_reloc_fixup field. * elf32-ppc.c: Include opcode/ppc.h. (ppc_elf_howto_raw): Correct dst_mask for R_PPC_VLE_LO16A, R_PPC_VLE_LO16D, R_PPC_VLE_HI16A, R_PPC_VLE_HI16D, R_PPC_VLE_HA16A, R_PPC_VLE_HA16D, R_PPC_VLE_SDAREL_LO16A, R_PPC_VLE_SDAREL_LO16D, R_PPC_VLE_SDAREL_HI16A, R_PPC_VLE_SDAREL_HI16D, R_PPC_VLE_SDAREL_HA16A, and R_PPC_VLE_SDAREL_HA16D relocs. (ppc_elf_link_hash_table_create): Update default_params init. (ppc_elf_vle_split16): Correct shift and mask. Add params. Report or fix insn/reloc mismatches. (ppc_elf_relocate_section): Pass input_section, offset and fixup to ppc_elf_vle_split16. binutils/ * NEWS: Mention PowerPC VLE relocation error. gas/ * config/tc-ppc.c: Delete VLE insn defines. (md_assemble): Swap use_a_reloc and use_d_reloc. * testsuite/gas/ppc/vle-reloc.d: Update. ld/ * emultempl/ppc32elf.em (params): Update initializer. Handle --vle-reloc-fixup command line arg.
2016-11-21[GAS][ARM][PR20827]Fix gas error for two register form instruction (pre-UAL ↵Renlin Li2-0/+16
syntax). gas/ 2016-11-21 Renlin Li <renlin.li@arm.com> PR gas/20827 * config/tc-arm.c (encode_arm_shift): Don't assert for operands not presented. * testsuite/gas/arm/add-shift-two.d: New. * testsuite/gas/arm/add-shift-two.s: New.
2016-11-18[ARC] Fix and extend features of .cpu directive.Claudiu Zissulescu6-0/+43
gas/ 2016-11-18 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/gas/arc/cl-warn.s: New file. * testsuite/gas/arc/cpu-pseudop-1.d: Likewise. * testsuite/gas/arc/cpu-pseudop-1.s: Likewise. * testsuite/gas/arc/cpu-pseudop-2.d: Likewise. * testsuite/gas/arc/cpu-pseudop-2.s: Likewise. * testsuite/gas/arc/cpu-warn2.s: Likewise. * config/tc-arc.c (selected_cpu): Initialize. (feature_type): New struct. (feature_list): New variable. (arc_check_feature): New function. (arc_select_cpu): Check for .cpu duplicates. Don't overwrite the current cpu features. Check if a feature is available for a given cpu. (md_parse_option): Test if features are available for a given cpu.
2016-11-18[AArch64] Add ARMv8.3 FCMLA and FCADD instructionsSzabolcs Nagy5-0/+113
Add support for FCMLA and FCADD complex arithmetic SIMD instructions. FCMLA has an indexed element variant where the index range has to be treated specially because a complex number takes two elements and the indexed vector size depends on the other operands. These complex number SIMD instructions are part of ARMv8.3 https://community.arm.com/groups/processors/blog/2016/10/27/armv8-a-architecture-2016-additions include/ 2016-11-18 Szabolcs Nagy <szabolcs.nagy@arm.com> * opcode/aarch64.h (enum aarch64_opnd): Add AARCH64_OPND_IMM_ROT1, AARCH64_OPND_IMM_ROT2, AARCH64_OPND_IMM_ROT3. (enum aarch64_op): Add OP_FCMLA_ELEM. opcodes/ 2016-11-18 Szabolcs Nagy <szabolcs.nagy@arm.com> * aarch64-tbl.h (QL_V3SAMEHSD_ROT, QL_ELEMENT_ROT): Define. (aarch64_feature_simd_v8_3, SIMD_V8_3): Define. (aarch64_opcode_table): Add fcmla and fcadd. (AARCH64_OPERANDS): Add IMM_ROT{1,2,3}. * aarch64-asm.h (aarch64_ins_imm_rotate): Declare. * aarch64-asm.c (aarch64_ins_imm_rotate): Define. * aarch64-dis.h (aarch64_ext_imm_rotate): Declare. * aarch64-dis.c (aarch64_ext_imm_rotate): Define. * aarch64-opc.h (enum aarch64_field_kind): Add FLD_rotate{1,2,3}. * aarch64-opc.c (fields): Add FLD_rotate{1,2,3}. (operand_general_constraint_met_p): Rotate and index range check. (aarch64_print_operand): Handle rotate operand. * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Likewise. * aarch64-opc-2.c: Likewise. gas/ 2016-11-18 Szabolcs Nagy <szabolcs.nagy@arm.com> * config/tc-aarch64.c (parse_operands): Handle AARCH64_OPND_IMM_ROT*. * testsuite/gas/aarch64/advsimd-armv8_3.d: New. * testsuite/gas/aarch64/advsimd-armv8_3.s: New. * testsuite/gas/aarch64/illegal-fcmla.s: New. * testsuite/gas/aarch64/illegal-fcmla.l: New. * testsuite/gas/aarch64/illegal-fcmla.d: New.
2016-11-18[AArch64] Add ARMv8.3 weaker release consistency load instructionsSzabolcs Nagy5-0/+85
Add support for ARMv8.3 LDAPRB, LDAPRH and LDAPR weak release consistency load instructions. (They are equivalent to LDARB, LDARH and LDAR instructions other than the weaker memory ordering requirement.) For more details about weak release consistency see https://community.arm.com/groups/processors/blog/2016/10/27/armv8-a-architecture-2016-additions opcodes/ 2016-11-18 Szabolcs Nagy <szabolcs.nagy@arm.com> * aarch64-tbl.h (arch64_opcode_table): Add ldaprb, ldaprh, ldapr. * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. * aarch64-opc-2.c: Regenerate. gas/ 2016-11-18 Szabolcs Nagy <szabolcs.nagy@arm.com> * testsuite/gas/aarch64/ldst-exclusive-armv8_3.s: Add ldaprb, ldaprh, ldapr tests. * testsuite/gas/aarch64/ldst-exclusive-armv8_3.d: Likewise. * testsuite/gas/aarch64/illegal-ldapr.s: Likewise. * testsuite/gas/aarch64/illegal-ldapr.d: Likewise. * testsuite/gas/aarch64/illegal-ldapr.l: Likewise.
2016-11-18[AArch64] Add ARMv8.3 javascript floating-point conversion instructionSzabolcs Nagy8-0/+50
Add support for ARMv8.3 FJCVTZS floating-point conversion instruction. For details about javascript floating-point conversion see https://community.arm.com/groups/processors/blog/2016/10/27/armv8-a-architecture-2016-additions opcodes/ 2016-11-18 Szabolcs Nagy <szabolcs.nagy@arm.com> * aarch64-tbl.h (arch64_opcode_table): Add fjcvtzs. (QL_FP2INT_W_D, aarch64_feature_fp_v8_3, FP_V8_3): Define. * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. * aarch64-opc-2.c: Regenerate. gas/ 2016-11-18 Szabolcs Nagy <szabolcs.nagy@arm.com> * testsuite/gas/aarch64/fp-armv8_3.s: Add fjcvtzs test. * testsuite/gas/aarch64/fp-armv8_3.d: Likewise. * testsuite/gas/aarch64/illegal-fjcvtzs.s: Likewise. * testsuite/gas/aarch64/illegal-fjcvtzs.d: Likewise. * testsuite/gas/aarch64/illegal-fjcvtzs.l: Likewise. * testsuite/gas/aarch64/illegal-nofp-armv8_3.s: Likewise. * testsuite/gas/aarch64/illegal-nofp-armv8_3.d: Likewise. * testsuite/gas/aarch64/illegal-nofp-armv8_3.l: Likewise.
2016-11-18[AArch64] Add ARMv8.3 combined pointer authentication load instructionsSzabolcs Nagy5-0/+126
Add support for ARMv8.3 LDRAA and LDRAB combined pointer authentication and load instructions. These instructions authenticate the base register and load 8 byte from it plus a scaled 10-bit offset with optional writeback to update the base register. A new instruction class (ldst_imm10) and operand type (AARCH64_OPND_ADDR_SIMM10) were introduced to handle the special addressing form. include/ 2016-11-18 Szabolcs Nagy <szabolcs.nagy@arm.com> * opcode/aarch64.h (enum aarch64_opnd): Add AARCH64_OPND_ADDR_SIMM10. (enum aarch64_insn_class): Add ldst_imm10. opcodes/ 2016-11-18 Szabolcs Nagy <szabolcs.nagy@arm.com> * aarch64-tbl.h (QL_X1NIL): New. (arch64_opcode_table): Add ldraa, ldrab. (AARCH64_OPERANDS): Add "ADDR_SIMM10". * aarch64-asm.h (aarch64_ins_addr_simm10): Declare. * aarch64-asm.c (aarch64_ins_addr_simm10): Define. * aarch64-dis.h (aarch64_ext_addr_simm10): Declare. * aarch64-dis.c (aarch64_ext_addr_simm10): Define. * aarch64-opc.h (enum aarch64_field_kind): Add FLD_S_simm10. * aarch64-opc.c (fields): Add data for FLD_S_simm10. (operand_general_constraint_met_p): Handle AARCH64_OPND_ADDR_SIMM10. (aarch64_print_operand): Likewise. * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. * aarch64-opc-2.c: Regenerate. gas/ 2016-11-18 Szabolcs Nagy <szabolcs.nagy@arm.com> * config/tc-aarch64.c (parse_operands): Handle AARCH64_OPND_ADDR_SIMM10. (fix_insn): Likewise. (warn_unpredictable_ldst): Handle ldst_imm10. * testsuite/gas/aarch64/pac.s: Add ldraa and ldrab tests. * testsuite/gas/aarch64/pac.d: Likewise. * testsuite/gas/aarch64/illegal-ldraa.s: New. * testsuite/gas/aarch64/illegal-ldraa.l: New. * testsuite/gas/aarch64/illegal-ldraa.d: New.
2016-11-11Accept L and LL suffixes to integer constants.Nick Clifton3-0/+18
PR gas/20732 * expr.c (integer_constant): If tc_allow_L_suffix is defined and non-zero then accept a L or LL suffix. * testsuite/gas/sparc/pr20732.d: New test source file. * testsuite/gas/sparc/pr20732.d: New test output file. * testsuite/gas/sparc/sparc.exp: Run new test.
2016-11-11[AArch64] Add ARMv8.3 combined pointer authentication branch instructionsSzabolcs Nagy2-0/+35
Add support for ARMv8.3 pointer authentication instructions that are encoded as unconditional branch instructions. opcodes/ 2016-11-11 Szabolcs Nagy <szabolcs.nagy@arm.com> * aarch64-tbl.h (arch64_opcode_table): Add braa, brab, blraa, blrab, braaz, brabz, blraaz, blrabz, retaa, retab, eretaa, eretab. * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. * aarch64-opc-2.c: Regenerate. gas/ 2016-11-08 Szabolcs Nagy <szabolcs.nagy@arm.com> * testsuite/gas/aarch64/pac.s: Add ARMv8.3 branch instruction tests. * testsuite/gas/aarch64/pac.d: Likewise.
2016-11-11[AArch64] Add ARMv8.3 PACGA instructionSzabolcs Nagy2-0/+5
Add support for the ARMv8.3 PACGA instruction. include/ 2016-11-11 Szabolcs Nagy <szabolcs.nagy@arm.com> * opcode/aarch64.h (enum aarch64_opnd): Add AARCH64_OPND_Rm_SP. opcodes/ 2016-11-11 Szabolcs Nagy <szabolcs.nagy@arm.com> * aarch64-tbl.h (arch64_opcode_table): Add pacga. (AARCH64_OPERANDS): Add Rm_SP. * aarch64-opc.c (aarch64_print_operand): Handle AARCH64_OPND_Rm_SP. * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. * aarch64-opc-2.c: Regenerate. gas/ 2016-11-11 Szabolcs Nagy <szabolcs.nagy@arm.com> * config/tc-aarch64.c (process_omitted_operand): Handle AARCH64_OPND_Rm_SP. (parse_operands): Likewise. * testsuite/gas/aarch64/pac.s: Add pacga. * testsuite/gas/aarch64/pac.d: Add pacga.
2016-11-11[AArch64] Add ARMv8.3 single source PAC instructionsSzabolcs Nagy2-0/+68
Add support for ARMv8.3 pointer authentication instructions that are encoded as single source data processing instructions. opcodes/ 2016-11-08 Szabolcs Nagy <szabolcs.nagy@arm.com> * aarch64-tbl.h (arch64_opcode_table): Add pacia, pacib, pacda, pacdb, autia, autib, autda, autdb, paciza, pacizb, pacdza, pacdzb, autiza, autizb, autdza, autdzb, xpaci, xpacd. * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. * aarch64-opc-2.c: Regenerate. gas/testsuite/ 2016-11-11 Szabolcs Nagy <szabolcs.nagy@arm.com> * testsuite/gas/aarch64/pac.s: New. * testsuite/gas/aarch64/pac.d: New.
2016-11-11[AArch64] Add ARMv8.3 pointer authentication key registersSzabolcs Nagy4-0/+73
Add support for system registers introduced in ARMv8.3 for pointer authentication. opcodes/ 2016-11-11 Szabolcs Nagy <szabolcs.nagy@arm.com> * aarch64-opc.c (aarch64_sys_regs): Add apiakeylo_el1, apiakeyhi_el1, apibkeylo_el1, apibkeyhi_el1, apdakeylo_el1, apdakeyhi_el1, apdbkeylo_el1, apdbkeyhi_el1, apgakeylo_el1 and apgakeyhi_el1. (aarch64_sys_reg_supported_p): Add feature test for new registers. gas/ 2016-11-11 Szabolcs Nagy <szabolcs.nagy@arm.com> * testsuite/gas/aarch64/sysreg-3.s: New. * testsuite/gas/aarch64/sysreg-3.d: New. * testsuite/gas/aarch64/illegal-sysreg-3.l: New. * testsuite/gas/aarch64/illegal-sysreg-3.d: New.
2016-11-11[AArch64] Add ARMv8.3 instructions which are in the NOP spaceSzabolcs Nagy3-13/+88
This patch adds support for a subset of the ARMv8.3 pointer authentication instructions: XPACLRI, PACIA1716, PACIB1716, AUTIA1716, AUTIA1716, PACIAZ, PACIASP, PACIBZ, PACISP, AUTIAZ, AUTIASP, AUTIBZ, AUTIBSP. These are aliases to HINT #0x7, HINT #0x8, HINT #0xa, HINT #0xc, HINT #0xe, HINT #0x18, HINT #0x19, ..., HINT #0x1f respectively. For more details about pointer authentication in ARMv8.3 see https://community.arm.com/groups/processors/blog/2016/10/27/armv8-a-architecture-2016-additions opcodes/ 2016-11-11 Szabolcs Nagy <szabolcs.nagy@arm.com> * aarch64-tbl.h (aarch64_feature_v8_3, ARMV8_3, V8_3_INSN): New. (arch64_opcode_table): Add xpaclri, pacia1716, pacib1716, autia1716, autib1716, paciaz, paciasp, pacibz, pacibsp, autiaz, autiasp, autibz, autibsp. * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. gas/ 2016-11-11 Szabolcs Nagy <szabolcs.nagy@arm.com> * testsuite/gas/aarch64/system-3.s: New. * testsuite/gas/aarch64/system-3.d: New. * testsuite/gas/aarch64/system.d: Update expected output.
2016-11-11[AArch64] Fix feature dependencies for +simd and +cryptoSzabolcs Nagy5-0/+37
According to the gas manual, +simd implies +fp and +crypto implies +simd. Make sure +nofp turns +simd, +crypto and +fp16 off. gas/ 2016-11-07 Szabolcs Nagy <szabolcs.nagy@arm.com> * config/tc-aarch64.c (aarch64_features): Fix "simd" and "crypto". * testsuite/gas/aarch64/illegal-crypto-nofp.d: New. * testsuite/gas/aarch64/illegal-crypto-nofp.l: New. * testsuite/gas/aarch64/illegal-fp16-nofp.d: New. * testsuite/gas/aarch64/illegal-fp16-nofp.l: New. * testsuite/gas/aarch64/illegal-fp16-nofp.s: New.
2016-11-09X86: Remove the .s suffix from EVEX vpextrwH.J. Lu7-72/+5
The .s suffix indicates that the instruction is encoded by swapping 2 register operands. Since vpextrw takes an XMM register and an integer register, the .s suffix should be ignored for EVEX vpextrw. gas/ PR binutils/20799 * testsuite/gas/i386/opcode.s: Add a test for EVEX vpextrw. * testsuite/gas/i386/opcode-intel.d: Updated. * testsuite/gas/i386/opcode-suffix.d: Likewise. * testsuite/gas/i386/opcode.d: Likewise. * testsuite/gas/i386/x86-64-avx512bw-opts.s: Remove vpextrw tests. * testsuite/gas/i386/x86-64-avx512bw-opts-intel.d: Updated. * testsuite/gas/i386/x86-64-avx512bw-opts.d: Likewise. opcodes/ PR binutils/20799 * i386-dis-evex.h (evex_table): Replace EdqwS with Edqw. * i386-dis.c (EdqwS): Removed. (dqw_swap_mode): Likewise. (intel_operand_size): Don't check dqw_swap_mode. (OP_E_register): Likewise. (OP_E_memory): Likewise. (OP_G): Likewise. (OP_EX): Likewise. * i386-opc.tbl: Remove "S" from EVEX vpextrw. * i386-tbl.h: Regerated.
2016-11-09X86: Update opcode-suffix.dH.J. Lu1-0/+8
PR binutils/20754 * testsuite/gas/i386/opcode-suffix.d: Updated.