diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/config/loongarch-parse.y | 32 | ||||
-rw-r--r-- | gas/config/tc-aarch64.c | 2 | ||||
-rw-r--r-- | gas/config/tc-aarch64.h | 2 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 2 | ||||
-rw-r--r-- | gas/config/tc-i386.h | 2 | ||||
-rw-r--r-- | gas/config/tc-m68k.c | 15 | ||||
-rw-r--r-- | gas/config/tc-s390.c | 2 | ||||
-rw-r--r-- | gas/doc/as.texi | 3 | ||||
-rw-r--r-- | gas/doc/c-s390.texi | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/pac_ab_key.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/pac_compat_cfi_window_save.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/pac_negate_ra_state.d | 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 |
16 files changed, 59 insertions, 28 deletions
diff --git a/gas/config/loongarch-parse.y b/gas/config/loongarch-parse.y index 97055fe..b75040c 100644 --- a/gas/config/loongarch-parse.y +++ b/gas/config/loongarch-parse.y @@ -207,29 +207,41 @@ emit_bin (int op) switch (op) { case '*': - opr1 = opr1 * opr2; + opr1 = (valueT) opr1 * (valueT) opr2; break; case '/': - opr1 = opr1 / opr2; + if (opr2 == 0) + { + as_warn (_("Divide by zero!")); + opr1 = 0; + } + else + opr1 = opr1 / opr2; break; case '%': - opr1 = opr1 % opr2; + if (opr2 == 0) + { + as_warn (_("Divide by zero!")); + opr1 = 0; + } + else + opr1 = opr1 % opr2; break; case '+': - opr1 = opr1 + opr2; + opr1 = (valueT) opr1 + (valueT) opr2; break; case '-': - opr1 = opr1 - opr2; + opr1 = (valueT) opr1 - (valueT) opr2; break; case LEFT_OP: - opr1 = opr1 << opr2; + opr1 = (valueT) opr1 << opr2; break; case RIGHT_OP: if (opr1 < 0) - as_warn(_("Right shift of negative numbers may be changed " - "from arithmetic right shift to logical right shift!")); - /* Algorithm right shift. */ - opr1 = (offsetT)opr1 >> (offsetT)opr2; + as_warn (_("Right shift of negative numbers may be changed " + "from arithmetic right shift to logical right shift!")); + /* Arithmetic right shift. */ + opr1 = opr1 >> opr2; break; case '<': opr1 = opr1 < opr2; diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index e071ad1..75aee15 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -9121,7 +9121,7 @@ aarch64_sframe_cfa_ra_offset (void) return (offsetT) SFRAME_CFA_FIXED_RA_INVALID; } -/* Get the abi/arch indentifier for SFrame. */ +/* Get the abi/arch identifier for SFrame. */ unsigned char aarch64_sframe_get_abi_arch (void) diff --git a/gas/config/tc-aarch64.h b/gas/config/tc-aarch64.h index acf1ce4..c2d0511 100644 --- a/gas/config/tc-aarch64.h +++ b/gas/config/tc-aarch64.h @@ -309,7 +309,7 @@ extern bool aarch64_sframe_ra_tracking_p (void); extern offsetT aarch64_sframe_cfa_ra_offset (void); #define sframe_cfa_ra_offset aarch64_sframe_cfa_ra_offset -/* The abi/arch indentifier for SFrame. */ +/* The abi/arch identifier for SFrame. */ unsigned char aarch64_sframe_get_abi_arch (void); #define sframe_get_abi_arch aarch64_sframe_get_abi_arch diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 2c61353..3e7040a 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -11968,7 +11968,7 @@ x86_sframe_cfa_ra_offset (void) return (offsetT) -8; } -/* The abi/arch indentifier for SFrame. */ +/* The abi/arch identifier for SFrame. */ unsigned char x86_sframe_get_abi_arch (void) { diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h index 3fb7920..19eb0bc 100644 --- a/gas/config/tc-i386.h +++ b/gas/config/tc-i386.h @@ -471,7 +471,7 @@ extern bool x86_sframe_ra_tracking_p (void); extern offsetT x86_sframe_cfa_ra_offset (void); #define sframe_cfa_ra_offset x86_sframe_cfa_ra_offset -/* The abi/arch indentifier for SFrame. */ +/* The abi/arch identifier for SFrame. */ extern unsigned char x86_sframe_get_abi_arch (void); #define sframe_get_abi_arch x86_sframe_get_abi_arch diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c index 0f36741..46b26d4 100644 --- a/gas/config/tc-m68k.c +++ b/gas/config/tc-m68k.c @@ -6754,7 +6754,6 @@ s_mri_for (int qual) struct mri_control_info *n; char *buf; char *s; - char ex[2]; /* The syntax is FOR.q var = init { TO | DOWNTO } end [ BY by ] DO.e @@ -6935,12 +6934,14 @@ s_mri_for (int qual) mri_assemble (buf); /* bcc bottom. */ - ex[0] = TOLOWER (extent); - ex[1] = '\0'; - if (up) - sprintf (buf, "blt%s %s", ex, n->bottom); - else - sprintf (buf, "bgt%s %s", ex, n->bottom); + s = buf; + *s++ = 'b'; + *s++ = up ? 'l' : 'g'; + *s++ = 't'; + if (extent != '\0') + *s++ = TOLOWER (extent); + *s++ = ' '; + strcpy (s, n->bottom); mri_assemble (buf); /* Put together the add or sub instruction used by ENDF. */ diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c index a0cfeea..b846134 100644 --- a/gas/config/tc-s390.c +++ b/gas/config/tc-s390.c @@ -343,7 +343,7 @@ s390_parse_cpu (const char *arg, S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX }, { STRING_COMMA_LEN ("z16"), STRING_COMMA_LEN ("arch14"), S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX }, - { STRING_COMMA_LEN (""), STRING_COMMA_LEN ("arch15"), + { STRING_COMMA_LEN ("z17"), STRING_COMMA_LEN ("arch15"), S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX } }; static struct diff --git a/gas/doc/as.texi b/gas/doc/as.texi index d68a9bc..40d45f7 100644 --- a/gas/doc/as.texi +++ b/gas/doc/as.texi @@ -1944,7 +1944,8 @@ Specify which s390 processor variant is the target, @samp{g5} (or @samp{arch6}), @samp{z9-109}, @samp{z9-ec} (or @samp{arch7}), @samp{z10} (or @samp{arch8}), @samp{z196} (or @samp{arch9}), @samp{zEC12} (or @samp{arch10}), @samp{z13} (or @samp{arch11}), @samp{z14} (or @samp{arch12}), @samp{z15} -(or @samp{arch13}), @samp{z16} (or @samp{arch14}), or @samp{arch15}. +(or @samp{arch13}), @samp{z16} (or @samp{arch14}), or @samp{z17} (or +@samp{arch15}). @item -mregnames @itemx -mno-regnames Allow or disallow symbolic names for registers. diff --git a/gas/doc/c-s390.texi b/gas/doc/c-s390.texi index f1a5483..5499222 100644 --- a/gas/doc/c-s390.texi +++ b/gas/doc/c-s390.texi @@ -18,7 +18,8 @@ and eleven chip levels. The architecture modes are the Enterprise System Architecture (ESA) and the newer z/Architecture mode. The chip levels are g5 (or arch3), g6, z900 (or arch5), z990 (or arch6), z9-109, z9-ec (or arch7), z10 (or arch8), z196 (or arch9), zEC12 (or arch10), z13 -(or arch11), z14 (or arch12), z15 (or arch13), z16 (or arch14), or arch15. +(or arch11), z14 (or arch12), z15 (or arch13), z16 (or arch14), or +z17 (arch15). @menu * s390 Options:: Command-line Options. @@ -73,7 +74,7 @@ are recognized: @code{z14} (or @code{arch12}), @code{z15} (or @code{arch13}), @code{z16} (or @code{arch14}), and -@code{arch15}. +@code{z17} (or @code{arch15}). Assembling an instruction that is not supported on the target processor results in an error message. diff --git a/gas/testsuite/gas/aarch64/pac_ab_key.d b/gas/testsuite/gas/aarch64/pac_ab_key.d index 4012d14..04d5fa4 100644 --- a/gas/testsuite/gas/aarch64/pac_ab_key.d +++ b/gas/testsuite/gas/aarch64/pac_ab_key.d @@ -7,7 +7,7 @@ .+: file .+ -Contents of the .eh_frame section: +Contents of the \.eh_frame section: 0+ 0+10 0+ CIE Version: 1 diff --git a/gas/testsuite/gas/aarch64/pac_compat_cfi_window_save.d b/gas/testsuite/gas/aarch64/pac_compat_cfi_window_save.d index 8e59086..6ef77ae 100644 --- a/gas/testsuite/gas/aarch64/pac_compat_cfi_window_save.d +++ b/gas/testsuite/gas/aarch64/pac_compat_cfi_window_save.d @@ -22,7 +22,7 @@ .+: file .+ -Contents of the .eh_frame section: +Contents of the \.eh_frame section: 0+ 0+10 0+ CIE Version: 1 diff --git a/gas/testsuite/gas/aarch64/pac_negate_ra_state.d b/gas/testsuite/gas/aarch64/pac_negate_ra_state.d index f49cebc..fa29c7f 100644 --- a/gas/testsuite/gas/aarch64/pac_negate_ra_state.d +++ b/gas/testsuite/gas/aarch64/pac_negate_ra_state.d @@ -4,7 +4,7 @@ .+: file .+ -Contents of the .eh_frame section: +Contents of the \.eh_frame section: 0+ 0+10 0+ CIE Version: 1 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 |