diff options
-rw-r--r-- | bfd/version.h | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/loongarch/fix_op.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/loongarch/fix_op.s | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/loongarch/insn_alias_32.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/loongarch/insn_alias_32.s | 5 | ||||
-rw-r--r-- | gdb/MAINTAINERS | 1 | ||||
-rw-r--r-- | gdb/cli/cli-decode.h | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/printcmds.exp | 7 | ||||
-rw-r--r-- | gdb/valops.c | 3 | ||||
-rw-r--r-- | opcodes/loongarch-opc.c | 6 |
10 files changed, 36 insertions, 1 deletions
diff --git a/bfd/version.h b/bfd/version.h index f6a6581..cd21a82 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -16,7 +16,7 @@ In releases, the date is not included in either version strings or sonames. */ -#define BFD_VERSION_DATE 20250412 +#define BFD_VERSION_DATE 20250414 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ diff --git a/gas/testsuite/gas/loongarch/fix_op.d b/gas/testsuite/gas/loongarch/fix_op.d index 7125f2e..05e7403 100644 --- a/gas/testsuite/gas/loongarch/fix_op.d +++ b/gas/testsuite/gas/loongarch/fix_op.d @@ -132,3 +132,6 @@ Disassembly of section .text: [ ]+1e8:[ ]+00df04a4 [ ]+bstrpick.d[ ]+[ ]+\$a0, \$a1, 0x1f, 0x1 [ ]+1ec:[ ]+00e000a4 [ ]+bstrpick.d[ ]+[ ]+\$a0, \$a1, 0x20, 0x0 [ ]+1f0:[ ]+00ff00a4 [ ]+bstrpick.d[ ]+[ ]+\$a0, \$a1, 0x3f, 0x0 +[ ]+1f4:[ ]+00006004 [ ]+rdcntvl.w[ ]+[ ]+\$a0 +[ ]+1f8:[ ]+000060a0 [ ]+rdcntid.w[ ]+[ ]+\$a1 +[ ]+1fc:[ ]+00006404 [ ]+rdcntvh.w[ ]+[ ]+\$a0 diff --git a/gas/testsuite/gas/loongarch/fix_op.s b/gas/testsuite/gas/loongarch/fix_op.s index d0523f9..876913b 100644 --- a/gas/testsuite/gas/loongarch/fix_op.s +++ b/gas/testsuite/gas/loongarch/fix_op.s @@ -123,3 +123,8 @@ bstrpick.d $r4,$r5,0,0 bstrpick.d $r4,$r5,31,1 bstrpick.d $r4,$r5,32,0 bstrpick.d $r4,$r5,63,0 + +# LA32R aliases +rdcntvl.w $r4 +rdcntid.w $r5 +rdcntvh.w $r4 diff --git a/gas/testsuite/gas/loongarch/insn_alias_32.d b/gas/testsuite/gas/loongarch/insn_alias_32.d index 753eae7..3aa716f 100644 --- a/gas/testsuite/gas/loongarch/insn_alias_32.d +++ b/gas/testsuite/gas/loongarch/insn_alias_32.d @@ -17,3 +17,6 @@ Disassembly of section .text: 18: 60000080 blt \$a0, \$zero, 0 # 18 <L1\+0x18> 1c: 64000080 bge \$a0, \$zero, 0 # 1c <L1\+0x1c> 20: 64000004 bge \$zero, \$a0, 0 # 20 <L1\+0x20> + 24: 00006004 rdtimel.w \$a0, \$zero + 28: 000060a0 rdtimel.w \$zero, \$a1 + 2c: 00006406 rdtimeh.w \$a2, \$zero diff --git a/gas/testsuite/gas/loongarch/insn_alias_32.s b/gas/testsuite/gas/loongarch/insn_alias_32.s index 8027e32..492e52a 100644 --- a/gas/testsuite/gas/loongarch/insn_alias_32.s +++ b/gas/testsuite/gas/loongarch/insn_alias_32.s @@ -8,3 +8,8 @@ L1: bltz $a0,.L1 bgez $a0,.L1 blez $a0,.L1 + + # LA32R aliases + rdcntvl.w $a0 + rdcntid.w $a1 + rdcntvh.w $a2 diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS index 187a1f6..5e1aada 100644 --- a/gdb/MAINTAINERS +++ b/gdb/MAINTAINERS @@ -724,6 +724,7 @@ Theodore A. Roth troth@openavr.org Yvan Roux yvan.roux@foss.st.com Ian Roxborough irox@redhat.com Maciej W. Rozycki macro@orcam.me.uk +Piotr Rudnicki piotr.rudnicki@intel.com Kamil Rytarowski n54@gmx.com Grace Sainsbury graces@redhat.com Kei Sakamoto sakamoto.kei@renesas.com diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h index 217afbc..9be446f 100644 --- a/gdb/cli/cli-decode.h +++ b/gdb/cli/cli-decode.h @@ -62,6 +62,8 @@ struct cmd_list_element type (not_set_cmd), doc (doc_) { + gdb_assert (name != nullptr); + gdb_assert (doc != nullptr); memset (&function, 0, sizeof (function)); } diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp index e1c996e..8634668 100644 --- a/gdb/testsuite/gdb.base/printcmds.exp +++ b/gdb/testsuite/gdb.base/printcmds.exp @@ -744,6 +744,12 @@ proc test_print_char_arrays {} { gdb_test_no_output "set print address off" "address off char arrays" } +proc test_print_arrays_negative {} { + # Check whether correct error messages are printed + gdb_test "p 1 == { }" "size of the array element must not be zero" + gdb_test "p 1 == { 1, 'a' }" "array elements must all be the same size" +} + proc test_print_nibbles {} { gdb_test_no_output "set print nibbles on" foreach lang_line { @@ -1235,6 +1241,7 @@ test_print_int_arrays test_print_typedef_arrays test_artificial_arrays test_print_char_arrays +test_print_arrays_negative test_print_nibbles # We used to do the runto main here. test_print_string_constants diff --git a/gdb/valops.c b/gdb/valops.c index 09af0ae..1b63343 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1695,6 +1695,9 @@ value_array (int lowbound, gdb::array_view<struct value *> elemvec) /* Validate that the bounds are reasonable and that each of the elements have the same size. */ + if (elemvec.empty ()) + error (_("size of the array element must not be zero")); + typelength = type_length_units (elemvec[0]->enclosing_type ()); for (struct value *other : elemvec.slice (1)) { diff --git a/opcodes/loongarch-opc.c b/opcodes/loongarch-opc.c index a172a2a..fa53021 100644 --- a/opcodes/loongarch-opc.c +++ b/opcodes/loongarch-opc.c @@ -454,6 +454,9 @@ static struct loongarch_opcode loongarch_macro_opcodes[] = static struct loongarch_opcode loongarch_alias_opcodes[] = { /* match, mask, name, format, macro, include, exclude, pinfo. */ + { 0x00006000, 0xffffffe0, "rdcntvl.w", "r0:5", 0, 0, 0, INSN_DIS_ALIAS }, /* rdtimel.w rd, zero */ + { 0x00006000, 0xfffffc1f, "rdcntid.w", "r5:5", 0, 0, 0, INSN_DIS_ALIAS }, /* rdtimel.w zero, rj */ + { 0x00006400, 0xffffffe0, "rdcntvh.w", "r0:5", 0, 0, 0, INSN_DIS_ALIAS }, /* rdtimeh.w rd, zero */ { 0x00150000, 0xfffffc00, "move", "r0:5,r5:5", 0, 0, 0, INSN_DIS_ALIAS }, /* or rd, rj, zero */ { 0x02800000, 0xffc003e0, "li.w", "r0:5,s10:12", 0, 0, 0, INSN_DIS_ALIAS }, /* addi.w rd, zero, simm */ { 0x02c00000, 0xffc003e0, "li.d", "r0:5,s10:12", 0, 0, 0, INSN_DIS_ALIAS }, /* addi.d rd, zero, simm */ @@ -494,7 +497,10 @@ static struct loongarch_opcode loongarch_fix_opcodes[] = { 0x00005400, 0xfffffc00, "bitrev.d", "r0:5,r5:5", 0, 0, 0, 0 }, { 0x00005800, 0xfffffc00, "ext.w.h", "r0:5,r5:5", 0, 0, 0, 0 }, { 0x00005c00, 0xfffffc00, "ext.w.b", "r0:5,r5:5", 0, 0, 0, 0 }, + { 0x0, 0x0, "rdcntvl.w", "r", "rdtimel.w %1,$r0", 0, 0, 0 }, + { 0x0, 0x0, "rdcntid.w", "r", "rdtimel.w $r0,%1", 0, 0, 0 }, { 0x00006000, 0xfffffc00, "rdtimel.w", "r0:5,r5:5", 0, 0, 0, 0 }, + { 0x0, 0x0, "rdcntvh.w", "r", "rdtimeh.w %1,$r0", 0, 0, 0 }, { 0x00006400, 0xfffffc00, "rdtimeh.w", "r0:5,r5:5", 0, 0, 0, 0 }, { 0x00006800, 0xfffffc00, "rdtime.d", "r0:5,r5:5", 0, 0, 0, 0 }, { 0x00006c00, 0xfffffc00, "cpucfg", "r0:5,r5:5", 0, 0, 0, 0 }, |