aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-11-07RISC-V: Add support for XCValu extension in CV32E40PMary Bennett36-0/+787
Spec: https://docs.openhwgroup.org/projects/cv32e40p-user-manual/en/latest/instruction_set_extensions.html Contributors: Mary Bennett <mary.bennett@embecosm.com> Nandni Jamnadas <nandni.jamnadas@embecosm.com> Pietra Ferreira <pietra.ferreira@embecosm.com> Charlie Keaney Jessica Mills Craig Blackmore <craig.blackmore@embecosm.com> Simon Cook <simon.cook@embecosm.com> Jeremy Bennett <jeremy.bennett@embecosm.com> Helene Chelin <helene.chelin@embecosm.com> bfd/ChangeLog: * elfxx-riscv.c (riscv_multi_subset_supports): Added `xcvalu` instruction class. (riscv_multi_subset_supports_ext): Likewise. gas/ChangeLog: * config/tc-riscv.c (validate_riscv_insn): Added the necessary operands for the extension. (riscv_ip): Likewise. * doc/c-riscv.texi: Noted XCValu as an additional ISA extension for CORE-V. * testsuite/gas/riscv/cv-alu-boundaries.d: New test. * testsuite/gas/riscv/cv-alu-boundaries.l: New test. * testsuite/gas/riscv/cv-alu-boundaries.s: New test. * testsuite/gas/riscv/cv-alu-fail-march.d: New test. * testsuite/gas/riscv/cv-alu-fail-march.l: New test. * testsuite/gas/riscv/cv-alu-fail-march.s: New test. * testsuite/gas/riscv/cv-alu-fail-operand-01.d: New test. * testsuite/gas/riscv/cv-alu-fail-operand-01.l: New test. * testsuite/gas/riscv/cv-alu-fail-operand-01.s: New test. * testsuite/gas/riscv/cv-alu-fail-operand-02.d: New test. * testsuite/gas/riscv/cv-alu-fail-operand-02.l: New test. * testsuite/gas/riscv/cv-alu-fail-operand-02.s: New test. * testsuite/gas/riscv/cv-alu-fail-operand-03.d: New test. * testsuite/gas/riscv/cv-alu-fail-operand-03.l: New test. * testsuite/gas/riscv/cv-alu-fail-operand-03.s: New test. * testsuite/gas/riscv/cv-alu-fail-operand-04.d: New test. * testsuite/gas/riscv/cv-alu-fail-operand-04.l: New test. * testsuite/gas/riscv/cv-alu-fail-operand-04.s: New test. * testsuite/gas/riscv/cv-alu-fail-operand-05.d: New test. * testsuite/gas/riscv/cv-alu-fail-operand-05.l: New test. * testsuite/gas/riscv/cv-alu-fail-operand-05.s: New test. * testsuite/gas/riscv/cv-alu-fail-operand-06.d: New test. * testsuite/gas/riscv/cv-alu-fail-operand-06.l: New test. * testsuite/gas/riscv/cv-alu-fail-operand-06.s: New test. * testsuite/gas/riscv/cv-alu-fail-operand-07.d: New test. * testsuite/gas/riscv/cv-alu-fail-operand-07.l: New test. * testsuite/gas/riscv/cv-alu-fail-operand-07.s: New test. * testsuite/gas/riscv/cv-alu-insns.d: New test. * testsuite/gas/riscv/cv-alu-insns.s: New test. opcodes/ChangeLog: * riscv-dis.c (print_insn_args): Disassemble xcb operand. * riscv-opc.c: Defined the MASK and added XCValu instructions. include/ChangeLog: * opcode/riscv-opc.h: Added corresponding MATCH and MASK macros for XCValu. * opcode/riscv.h: Added corresponding EXTRACT and ENCODE macros for XCValu. (enum riscv_insn_class): Added the XCValu instruction class.
2023-11-07RISC-V: Add support for XCVmac extension in CV32E40PMary Bennett15-0/+643
Spec: https://docs.openhwgroup.org/projects/cv32e40p-user-manual/en/latest/instruction_set_extensions.html Contributors: Mary Bennett <mary.bennett@embecosm.com> Nandni Jamnadas <nandni.jamnadas@embecosm.com> Pietra Ferreira <pietra.ferreira@embecosm.com> Charlie Keaney Jessica Mills Craig Blackmore <craig.blackmore@embecosm.com> Simon Cook <simon.cook@embecosm.com> Jeremy Bennett <jeremy.bennett@embecosm.com> Helene Chelin <helene.chelin@embecosm.com> bfd/ChangeLog: * elfxx-riscv.c (riscv_multi_subset_supports): Added `xcvmac` instruction class. (riscv_multi_subset_supports_ext): Likewise. gas/ChangeLog: * config/tc-riscv.c (validate_riscv_insn): Added the necessary operands for the extension. (riscv_ip): Likewise. * doc/c-riscv.texi: Noted XCVmac as an additional ISA extension for CORE-V. * testsuite/gas/riscv/cv-mac-fail-march.d: New test. * testsuite/gas/riscv/cv-mac-fail-march.l: New test. * testsuite/gas/riscv/cv-mac-fail-march.s: New test. * testsuite/gas/riscv/cv-mac-fail-operand.d: New test. * testsuite/gas/riscv/cv-mac-fail-operand.l: New test. * testsuite/gas/riscv/cv-mac-fail-operand.s: New test. * testsuite/gas/riscv/cv-mac-insns.d: New test. * testsuite/gas/riscv/cv-mac-insns.s: New test. opcodes/ChangeLog: * riscv-dis.c (print_insn_args): Disassemble information with the EXTRACT macro implemented. * riscv-opc.c: Defined the MASK and added XCVmac instructions. include/ChangeLog: * opcode/riscv-opc.h: Added corresponding MATCH and MASK macros for XCVmac. * opcode/riscv.h: Added corresponding EXTRACT and ENCODE macros for uimm. (enum riscv_insn_class): Added the XCVmac instruction class.
2023-11-06Remove EXTERN_C and related definesTom Tromey12-36/+32
common-defs.h has a few defines that I suspect were used during the transition to C++. These aren't needed any more, so remove them. Tested by rebuilding. Approved-By: Simon Marchi <simon.marchi@efficios.com> Approved-By: Andrew Burgess <aburgess@redhat.com>
2023-11-07Automatic date update in version.inGDB Administrator1-1/+1
2023-11-06gdb: Update email address for Carl Love in gdb/MAINTAINERSCarl Love1-1/+1
2023-11-06Fix resizing of TUI python windowsHannes Domani1-0/+10
When resizing from a big to small terminal size, and you have a TUI python window that would then be outside of the new size, valgrind shows this error: ==3389== Invalid read of size 1 ==3389== at 0xC3DFEE: wnoutrefresh (lib_refresh.c:167) ==3389== by 0xC3E3C9: wrefresh (lib_refresh.c:63) ==3389== by 0xA9766C: tui_unhighlight_win(tui_win_info*) (tui-wingeneral.c:134) ==3389== by 0x98921C: tui_py_window::rerender() (py-tui.c:183) ==3389== by 0xA8C23C: tui_layout_split::apply(int, int, int, int, bool) (tui-layout.c:1030) ==3389== by 0xA8C2A2: tui_layout_split::apply(int, int, int, int, bool) (tui-layout.c:1033) ==3389== by 0xA8C23C: tui_layout_split::apply(int, int, int, int, bool) (tui-layout.c:1030) ==3389== by 0xA8B1F8: tui_apply_current_layout(bool) (tui-layout.c:81) ==3389== by 0xA95CDB: tui_resize_all() (tui-win.c:525) ==3389== by 0xA95D1E: tui_async_resize_screen(void*) (tui-win.c:562) ==3389== by 0x6B855D: invoke_async_signal_handlers() (async-event.c:234) ==3389== by 0xC0CEF8: gdb_do_one_event(int) (event-loop.cc:199) ==3389== Address 0x115cc214 is 1,332 bytes inside a block of size 2,240 free'd ==3389== at 0x4A0A430: free (vg_replace_malloc.c:446) ==3389== by 0xC3CF7D: _nc_freewin (lib_newwin.c:121) ==3389== by 0xA8B1C6: tui_apply_current_layout(bool) (tui-layout.c:78) ==3389== by 0xA95CDB: tui_resize_all() (tui-win.c:525) ==3389== by 0xA95D1E: tui_async_resize_screen(void*) (tui-win.c:562) ==3389== by 0x6B855D: invoke_async_signal_handlers() (async-event.c:234) ==3389== by 0xC0CEF8: gdb_do_one_event(int) (event-loop.cc:199) ==3389== by 0x8E40E9: captured_command_loop() (main.c:407) ==3389== by 0x8E5E54: gdb_main(captured_main_args*) (main.c:1324) ==3389== by 0x62AC04: main (gdb.c:39) It's because tui_py_window::m_inner_window still has the outside coordinates, and wnoutrefresh then does an out-of-bounds access. Fix this by resetting m_inner_window on every resize, it will anyways be recreated in the next rerender call. Approved-By: Andrew Burgess <aburgess@redhat.com>
2023-11-06Change gdb.base/examine-backwards.exp for AIX.Aditya Vidyadhar Kamath1-4/+4
In AIX unused or constant variables are collected as garbage by the linker and in the dwarf dump an address with all f's in hexadecimal are assigned. Hence the testcase fails with many failures stating it cannot access memory. This patch is a small change to get it working in AIX as well.
2023-11-06ld: =fillexp different behaviors for hexidecimal literalNick Clifton5-1/+89
PR 30865 * ld.texi: Update description of the FILL command. * testsuite/ld-scripts/fill2.d: New test. * testsuite/ld-scripts/fill2.t: New test source. * testsuite/ld-scripts/data.exp: Run the new test.
2023-11-06RISC-V: Make sure rv32q conflict won't affect the fp-q-insns-32 gas testcase.Nelson Chu1-1/+1
Same as commit 4352c0ac04a. gas/ * testsuite/gas/riscv/fp-q-insns-32.d: Set q to v2.2.
2023-11-06RISC-V: Moved out linker internal relocations after R_RISCV_max.Nelson Chu6-108/+101
Just the lightest modifications about this, without any further checks and considering --emit-relocs. We will need to improve it in the future, but first do this to avoid conflicts between linker internal relocations and the new definition of psabi. For example, TLSDESC relocs. Passed riscv-gnu-toolchain regressions, so should be safe enough to commit. Co-authored-by: Tsukasa OI <research_trasio@irq.a4lg.com> bfd/ * reloc.c: Removed linker internal relocations. * bfd-in2.h: Regenerated. * libbfd.h: Regenerated. * elfnn-riscv.c: Defined R_RISCV_DELETE in include/elf/riscv.h. * elfxx-riscv.c (howto_table, howto_table_internal): Moved linker internal relocations from howto_table into howto_table_internal. (riscv_reloc_map): Removed linker internal relocations mapping. (riscv_elf_rtype_to_howto): Return howto of linker internal relocations from howto_table_internal. include/ * elf/riscv.h: Defined linker internal relocations after R_RISCV_max.
2023-11-06[gdb/testsuite] Fix gdb.dwarf2/dw2-gas-workaround.expTom de Vries1-1/+1
Recently added test-case gdb.dwarf2/dw2-gas-workaround.exp: - passes when gdb is configured using $(cd ../src; pwd)/configure, but - fails when using ../src/configure. Fix this by making the matching more precise: ... - -re -wrap "$objdir.*" { + -re -wrap "name_for_id = $objdir/$srcfile\r\n.*" { ... such that we only fail on the line: ... [symtab-create] start_subfile: name = dw2-lines.c, name_for_id = \ /data/vries/gdb/leap-15-4/build/gdb/testsuite/dw2-lines.c^M ... Reported-By: Carl Love <cel@us.ibm.com>
2023-11-06Automatic date update in version.inGDB Administrator1-1/+1
2023-11-05Pre-read DWZ file in DWARF readerTom Tromey5-23/+31
While working on background reading of DWARF, I came across the DWZ-reading code. This code can query the user (via the debuginfod support) -- something that cannot be done off the main thread. Looking into it, I realized that this code can be run much earlier, avoiding this problem. Digging a bit deeper, I also found a discrepancy here between how the DWARF reader works in "readnow" mode as compared to the normal modes. This patch cleans this up by trying to read the DWZ file earlier, and also by having the DWARF reader convert any exception here into a warning. This unifies the various cases, but also makes it so that errors do not prevent gdb from continuing on to the extent possible. Regression tested on x86-64 Fedora 38.
2023-11-05Automatic date update in version.inGDB Administrator1-1/+1
2023-11-04Automatic date update in version.inGDB Administrator1-1/+1
2023-11-03Remove unused declarationTom Tromey1-1/+0
I found a declaration in py-stopevent.h for which there is no definition. This patch removes it.
2023-11-03gdbsupport: mark array_view::slice with [[nodiscard]]Simon Marchi1-0/+2
I (almost) had a bug where I did: buffer.slice (...) but I meant: buffer = buffer.slice (...) The first one does nothing, it creates a new array_view but without using it, it's useless. Mark the slice methods with [[nodiscard]] (which is standard C++17) so that error would generate a warning. I guess that many functions could be marked as nodiscard, essentially function that is pure (doesn't have side-effects). But this one seems particularly easy to mis-use. Change-Id: Ib39a0a65a5728a3cfd68a02ae31635810baeaccb Approved-By: Tom Tromey <tom@tromey.com>
2023-11-03gdbsupport: record and print failed selftest namesSimon Marchi1-4/+15
Since "maint selftest" now runs quite a lot of tests (especially in an all-targets build), I thought it would be useful to print a summary at the end of what failed. So, implement that. Print the summary before the "Ran %d unit tests, %zu failed\n" line, so that that one remains the last line, and the gdb.gdb/unittest.exp doesn't need to be changed. The output looks like (if I force a failure in a test): (gdb) maint selftest ... Running selftest value_copy. Running selftest xml_escape_text. Running selftest xml_escape_text_append. Failures: aarch64-analyze-prologue Ran 4134 unit tests, 1 failed (gdb) Change-Id: If3aaabdd6f8078d0e6e50e8d08f3e558ab85277e Approved-By: Tom Tromey <tom@tromey.com>
2023-11-03gas: correct ignoring of C-style number suffixesJan Beulich4-4/+116
First of all the respective original changes didn't deal with just 0 having such a suffix - this needs additional logic outside of integer_constant(). Further bogus suffixes having more than two L-s were accepted, while valid suffixes with U following the L(s) weren't. Finally respective tests were introduced for Sparc only. Reviewed-by: Neal Frager <neal.frager@amd.com>
2023-11-03RISC-V: reduce redundancy in load/store macro insn handlingJan Beulich3-123/+28
Within the groups L{B,BU,H,HU,W,WU,D}, S{B,H,W,D}, FL{H,W,D,Q}, and FS{H,W,D,Q} the sole difference between the handling is the insn mnemonic passed to the common handling functions. The intended mnemonic, however, can easily be retrieved. Furthermore leverags that Sx and FSx are then handled identically, too, and hence their cases can also be folded.
2023-11-03RISC-V: Lx/Sx macro insn testsJan Beulich2-0/+70
Make sure these (continue to) work as intended.
2023-11-03RISC-V: add F- and D-extension testcasesJan Beulich10-0/+1111
Make sure future changes won't regress any of this. Also cover the FLH and FSH macro insns of the Zfh extension.
2023-11-03RISC-V: make FLQ/FSQ macro-insns workJan Beulich5-0/+516
When support for the Q extension was added, the libopcodes side of these macro-insns was properly covered, but no backing support in gas was added. In new testcases cover not just these, but all Q-extension insns.
2023-11-03Automatic date update in version.inGDB Administrator1-1/+1
2023-11-02[gdb/tdep] Fix nr array elements in ppc64_aggregate_candidateTom de Vries1-1/+5
On AlmaLinux 9.2 powerpc64le I run into: ... (gdb) PASS: gdb.ada/array_return.exp: continuing to Create_Small_Float_Vector finish^M Run till exit from #0 pck.create_small_float_vector () at pck.adb:30^M 0x00000000100022d4 in p () at p.adb:25^M 25 Vector := Create_Small_Float_Vector;^M Value returned is $3 = (2.80259693e-45, 2.80259693e-45)^M (gdb) FAIL: gdb.ada/array_return.exp: value printed by finish of Create_Small_Float_Vector ... while this is expected: ... Value returned is $3 = (4.25, 4.25)^M ... The problem is here in ppc64_aggregate_candidate: ... if (!get_array_bounds (type, &low_bound, &high_bound)) return -1; count *= high_bound - low_bound ... The array type (containing 2 elements) is: ... type Small_Float_Vector is array (1 .. 2) of Float; ... so we have: ... (gdb) p low_bound $1 = 1 (gdb) p high_bound $2 = 2 ... but we calculate the number of elements in the array using "high_bound - low_bound", which is 1. Consequently, gdb fails to correctly classify the type as a ELFv2 homogeneous aggregate. Fix this by calculating the number of elements in the array by using "high_bound - low_bound + 1" instead. Furthermore, high_bound can (in general, though perhaps not here) also be smaller than low_bound, so to be safe take that into account as well: ... LONGEST nr_array_elements = (low_bound > high_bound ? 0 : (high_bound - low_bound + 1)); count *= nr_array_elements; ... Tested on powerpc64le-linux. Approved-By: Ulrich Weigand <uweigand@de.ibm.com> PR tdep/31015 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31015
2023-11-02aarch64: Add GCS system registers.Srinath Parvathaneni5-0/+83
This patch adds support for 10 new AArch64 system registers (gcscre0_el1, gcscr_el1, gcscr_el12, gcscr_el2, gcscr_el3, gcspr_el0, gcspr_el1 ,gcspr_el12, gcspr_el2 and gcspr_el3), which are enabled on using Guarded Control Stack (+gcs flag) feature.
2023-11-02aarch64: Add support for GCSB DSYNC instruction.Srinath Parvathaneni13-2299/+2295
This patch adds support for Guarded control stack data synchronization instruction (GCSB DSYNC). This instruction is allocated to existing HINT space and uses the HINT number 19 and to match this an entry is added to the aarch64_hint_options array.
2023-11-02aarch64: Add support for GCS extension.srinath12-2511/+2688
This patch adds for Guarded Control Stack Extension (GCS) extension. GCS feature is optional from Armv9.4-A architecture and enabled by passing +gcs option to -march (eg: -march=armv9.4-a+gcs) or using ".arch_extension gcs" directive in the assembly file. Also this patch adds support for GCS instructions gcspushx, gcspopcx, gcspopx, gcsss1, gcsss2, gcspushm, gcspopm, gcsstr and gcssttr.
2023-11-02aarch64: Add support for Check Feature Status Extension.Srinath Parvathaneni12-12/+83
This patch adds support for Check Feature Status Extension (CHK) which is mandatory from Armv8.0-A. Also this patch supports "chkfeat" instruction (hint #40).
2023-11-02aarch64: Add support for Armv8.9-A and Armv9.4-A Architectures.srinath4-3/+14
This patch adds AArch64 support for Armv8.9-A architecture (-march=armv8.9-a) and Armv9.4-A architecture (-march=armv9.4-a).
2023-11-02ld x86_64 tests: Accept x86-64-v3 as a needed ISANick Clifton4-3/+10
* testsuite/ld-x86-64/property-3.r: Update regexp to allow for targets which support x86-64-v3. * testsuite/ld-x86-64/property-4.r: Likewise. * testsuite/ld-x86-64/property-5.r: Likewise.
2023-11-01gprofng: remove dependency on help2manVladimir Mezentsev6-66/+2
help2man is no longer used to create the gprofng man pages. gprofng/ChangeLog 2023-10-31 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * configure.ac: Remove HELP2MAN. * Makefile.in: Rebuild. * configure: Rebuild. * doc/Makefile.in: Rebuild. * gp-display-html/Makefile.in: Rebuild. * src/Makefile.in: Rebuild.
2023-11-02Automatic date update in version.inGDB Administrator1-1/+1
2023-11-01gdb: use gdb::byte_vector instead of gdb::def_vector<gdb_byte>Simon Marchi4-6/+6
Use the gdb::byte_vector typedef when possible. Change-Id: Ib2199201c052496992011ea02979de023d4d8a9a
2023-11-01Fix typo in recent update to the ld/NEWS fileNick Clifton1-2/+2
2023-11-01ld: Support input section description keyword: REVERSENick Clifton18-39/+274
PR 27565 * ldlex.l: Add REVERSE. * ldgram.y: Allow REVERSE to be used wherever a sorting command can be used. * ld.h (struct wildcard_spec): Add 'reversed' field. * ldlang.h (lang_wild_statement_struct): Add 'filenames_reversed' field. * ldlang.c (compare_sections): Add reversed parameter. (wild_sort): Reverse the comparison if requested. (print_wild_statement): Handle the reversed field. * ld.texi: Document the new feature. * NEWS: Mention the new feature. * testsuite/ld-scripts/sort-file-reversed-1.d: New test driver. * testsuite/ld-scripts/sort-file-reversed-1.t: New test source. * testsuite/ld-scripts/sort-file-reversed-2.t: New test source. * testsuite/ld-scripts/sort-file-reversed-2.d: New test driver. * testsuite/ld-scripts/sort-sections-reversed-1.d: New test driver. * testsuite/ld-scripts/sort-sections-reversed-1.t: New test source. * testsuite/ld-scripts/sort-sections-reversed-2.t: New test source. * testsuite/ld-scripts/sort-sections-reversed-2.d: New test driver. * testsuite/ld-scripts/sort-sections-reversed-3.d: New test driver. * testsuite/ld-scripts/sort-sections-reversed-3.t: New test source.
2023-11-01Automatic date update in version.inGDB Administrator1-1/+1
2023-11-01[gdb/symtab] Work around gas PR28629Tom de Vries4-1/+130
When running test-case gdb.tui/tui-layout-asm-short-prog.exp on AlmaLinux 9.2 ppc64le, I run into: ... FAIL: gdb.tui/tui-layout-asm-short-prog.exp: check asm box contents ... The problem is that we get: ... 7 [ No Assembly Available ] ... because tui_get_begin_asm_address doesn't succeed. In more detail, tui_get_begin_asm_address calls: ... find_line_pc (sal.symtab, sal.line, &addr); ... with: ... (gdb) p *sal.symtab $5 = {next = 0x130393c0, m_compunit = 0x130392f0, m_linetable = 0x0, filename = "tui-layout-asm-short-prog.S", filename_for_id = "$gdb/build/gdb/testsuite/tui-layout-asm-short-prog.S", m_language = language_asm, fullname = 0x0} (gdb) p sal.line $6 = 1 ... The problem is the filename_for_id which is the source file prefixed with the compilation dir rather than the source dir. This is due to faulty debug info generated by gas, PR28629: ... <1a> DW_AT_name : tui-layout-asm-short-prog.S <1e> DW_AT_comp_dir : $gdb/build/gdb/testsuite <22> DW_AT_producer : GNU AS 2.35.2 ... The DW_AT_name is relative, and it's relative to the DW_AT_comp_dir entry, making the effective name $gdb/build/gdb/testsuite/tui-layout-asm-short-prog.S. The bug is fixed starting version 2.38, where we get instead: ... <1a> DW_AT_name : $gdb/src/gdb/testsuite/gdb.tui/tui-layout-asm-short-prog.S <1e> DW_AT_comp_dir : $gdb/build/gdb/testsuite <22> DW_AT_producer : GNU AS 2.38 ... Work around the faulty debug info by constructing the filename_for_id using the second directory from the directory table in the .debug_line header: ... The Directory Table (offset 0x22, lines 2, columns 1): Entry Name 0 $gdb/build/gdb/testsuite 1 $gdb/src/gdb/testsuite/gdb.tui ... Note that the used gas contains a backport of commit 3417bfca676 ("GAS: DWARF-5: Ensure that the 0'th entry in the directory table contains the current working directory."), because directory 0 is correct. With the unpatched 2.35.2 release the directory 0 entry is incorrect: it's a copy of entry 1. Add a dwarf assembly test-case that reflects the debug info as generated by unpatched gas 2.35.2. Tested on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com>
2023-11-01[gdb/symtab] Add producer_is_gasTom de Vries3-2/+63
Add producer_is_gas, a generic way to get the gas version from the producer string. Tested on x86_64-linux.
2023-10-31Implement DAP setVariable requestTom Tromey6-21/+311
This patch implements the DAP setVariable request. setVariable is a bit odd in that it specifies the variable to modify by passing in the variable's container and the name of the variable. This approach can't handle variable shadowing (there are a couple of open DAP bugs on this topic), so this patch renames duplicates to avoid the problem.
2023-10-31Support Intel USER_MSRHu, Lin119-1171/+1522
This patches aims to support Intel USER_MSR. In addition to the usual support, this patch includes encoding and decoding support for MAP7 and immediate numbers as the last operand (ATT style). gas/ChangeLog: * NEWS: Support Intel USER_MSR. * config/tc-i386.c (smallest_imm_type): Reject imm32 in 64bit mode. (build_vex_prefix): Add VEXMAP7. (md_assemble): Handling the imm32 of USER_MSR. (match_template): Handling the unusual immediate. * doc/c-i386.texi: Document .user_msr. * testsuite/gas/i386/i386.exp: Run USER_MSR tests. * testsuite/gas/i386/x86-64.exp: Ditto. * testsuite/gas/i386/user_msr-inval.l: New test. * testsuite/gas/i386/user_msr-inval.s: Ditto. * testsuite/gas/i386/x86-64-user_msr-intel.d: Ditto. * testsuite/gas/i386/x86-64-user_msr-inval.l: Ditto. * testsuite/gas/i386/x86-64-user_msr-inval.s: Ditto. * testsuite/gas/i386/x86-64-user_msr.d: Ditto. * testsuite/gas/i386/x86-64-user_msr.s: Ditto. opcodes/ChangeLog: * i386-dis.c (struct instr_info): Add a new attribute has_skipped_modrm. (Gq): New. (Rq): Ditto. (q_mm_mode): Ditto. (Nq): Change mode from q_mode to q_mm_mode. (VEX_LEN_TABLE): (get_valid_dis386): Add VEX_MAP7 in VEX prefix. and handle the map7_f8 for save space. (OP_Skip_MODRM): Set has_skipped_modrm. (OP_E): Skip codep++ when has skipped modrm byte. (OP_R): Support q_mode and q_mm_mode. (REG_VEX_MAP7_F8_L_0_W_0): New. (PREFIX_VEX_MAP7_F8_L_0_W_0_R_0_X86_64): Ditto. (X86_64_VEX_MAP7_F8_L_0_W_0_R_0): Ditto. (VEX_LEN_MAP7_F8): Ditto. (VEX_W_MAP7_F8_L_0): Ditto. (MOD_0F38F8): Ditto. (PREFIX_0F38F8_M_0): Ditto. (PREFIX_0F38F8_M_1_X86_64): Ditto. (X86_64_0F38F8_M_1): Ditto. (PREFIX_0F38F8): Remove. (prefix_table): Add PREFIX_0F38F8_M_1_X86_64. Remove PREFIX_0F38F8. (reg_table): Add REG_VEX_MAP7_F8_L_0_W_0, PREFIX_VEX_MAP7_F8_L_0_W_0_R_0_X86_64. (x86_64_table): Add X86_64_0F38F8_PREFIX_3_M_1, X86_64_VEX_MAP7_F8_L_0_W_0_R_0 and X86_64_0F38F8_M_1. (vex_table): Add VEX_MAP7. (vex_len_table): Add VEX_LEN_MAP7_F8, VEX_W_MAP7_F8_L_0. (mod_table): New entry for USER_MSR and add MOD_0F38F8. * i386-gen.c (cpu_flag_init): Add CPU_USER_MSR_FLAGS and CPU_ANY_USER_MSR_FLAGS. Add add VEXMAP7. * i386-init.h: Regenerated. * i386-mnem.h: Ditto. * i386-opc.h (SPACE_VEXMAP7): New. (CPU_USER_MSR_FLAGS): Ditoo. (CPU_ANY_USER_MSR_FLAGS): Ditto. (i386_cpu_flags): Add cpuuser_msr. * i386-opc.tbl: Add USER_MSR instructions. * i386-tbl.h: Regenerated.
2023-10-30Remove some frame invalidation codeTom Tromey3-19/+3
I stumbled across a few spots that mention that a function "invalidates frame" and also assignments of NULL to a frame_info_ptr. This code isn't harmful, but is also unnecessary since the introduction of frame_info_ptr -- nowadays frame invalidations are handled automatically. Regression tested on x86-64 Fedora 38. Approved-By: Simon Marchi <simon.marchi@efficios.com>
2023-10-31Automatic date update in version.inGDB Administrator1-1/+1
2023-10-30New Georgian translation for the ld sub-directoryNick Clifton2-0/+6620
2023-10-30gas: bpf: new test for MOV with C-like numbers ll suffixJose E. Marchesi4-0/+11
The BPF pseudo-c syntax supports both MOV and LDDW instructions: mov: r1 = EXPR lddw: r1 = EXPR ll Note that the white space between EXPR and `ll' is necessary in order to avoid ambiguity with the assembler's support for C-like numerical suffixes. This patch adds a new test to the GAS BPF testsuite to make sure that instructions like: r1 = 666ll are interpreted as `mov %r1,666', not as `lddw %r1,666'. This matches clang's assembler behavior. 2023-10-30 Jose E. Marchesi <jose.marchesi@oracle.com> * testsuite/gas/bpf/alu-pseudoc.s: Add test to make sure C-like suffix `ll' is not interpreted as lddw syntax. * testsuite/gas/bpf/alu-pseudoc.d: Update expected results. * testsuite/gas/bpf/alu-be-pseudoc.d: Likewise.
2023-10-30Fix fixed-point "return" on ARMTom Tromey1-3/+15
On a big-endian ARM machine, the "return" command resulted in the wrong value being returned when the function had a fixed-point return type. This patch fixes the problem by unpacking and repacking the fixed-point type appropriately. Approved-By: Luis Machado <luis.machado@arm.com>
2023-10-30Fix range-type "return" command on ARMTom Tromey1-0/+3
On big-endian ARM, "return"ing from a function that returned a range type did not work. This patch strips the range type to treat the function as though it were returning the underlying type instead. Approved-By: Luis Machado <luis.machado@arm.com>
2023-10-30Fix "finish" for vector types on ARMTom Tromey1-20/+6
On a big-endian ARM system, "finish" printed the wrong value when finishing from a function that returned a vector type. Similarly, calls to a function also resulted in the wrong value being passed. I think both the read- and write-functions here should ignore the endian-ness. I tested this using the AdaCore internal test suite; the test case that caught this is identical to gdb.base/gnu_vector.exp. Approved-By: Luis Machado <luis.machado@arm.com>
2023-10-30Fix "finish" with range types on ARMTom Tromey1-0/+3
On ARM (I tested big-endian but it may not matter), "finish" can sometimes print the wrong result when the return type is a range type. Range types should really be treated as their underlying type (normally integer, but sometimes fixed-point). This patch implements this. Approved-By: Luis Machado <luis.machado@arm.com>
2023-10-30Fix calls with small integers on ARMTom Tromey1-3/+0
On big-endian ARM, an inferior call with a small integer will pass the wrong value. This patch fixes the problem. Because the code here works using scalar values, and not just bytes, left-shifting is unnecessary. Approved-By: Luis Machado <luis.machado@arm.com>