diff options
Diffstat (limited to 'gas')
-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/gen-sframe.c | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-2.d | 21 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-2.s | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi-sframe/cfi-sframe.exp | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/loongarch/div_zero.l | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/loongarch/div_zero.s | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/loongarch/loongarch.exp | 1 |
12 files changed, 48 insertions, 12 deletions
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/gen-sframe.c b/gas/gen-sframe.c index 5b5e7b1..5c8c7eb 100644 --- a/gas/gen-sframe.c +++ b/gas/gen-sframe.c @@ -1038,7 +1038,9 @@ sframe_xlate_do_def_cfa_register (struct sframe_xlate_ctx *xlate_ctx, return SFRAME_XLATE_ERR_NOTREPRESENTED; /* Not represented. */ } sframe_fre_set_cfa_base_reg (cur_fre, cfi_insn->u.r); - sframe_fre_set_cfa_offset (cur_fre, last_fre->cfa_offset); + if (last_fre) + sframe_fre_set_cfa_offset (cur_fre, last_fre->cfa_offset); + cur_fre->merge_candidate = false; return SFRAME_XLATE_OK; diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-2.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-2.d new file mode 100644 index 0000000..d779b6d --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-2.d @@ -0,0 +1,21 @@ +#as: --gsframe +#objdump: --sframe=.sframe +#name: Check .cfi_def_cfa_register with no previous offset +#... +Contents of the SFrame section .sframe: + + Header : + + Version: SFRAME_VERSION_2 + Flags: NONE +#? CFA fixed FP offset: \-?\d+ +#? CFA fixed RA offset: \-?\d+ + Num FDEs: 1 + Num FREs: 1 + + Function Index : + + func idx \[0\]: pc = 0x0, size = 0 bytes + STARTPC +CFA +FP +RA + + 0+0000 +fp\+8 +u +f + +#pass diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-2.s b/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-2.s new file mode 100644 index 0000000..f3f9859 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-2.s @@ -0,0 +1,4 @@ +# Although not a useful construct by itself, ensure graceful handling. + .cfi_startproc + .cfi_def_cfa_register 6 + .cfi_endproc diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp b/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp index a099466..b353e27 100644 --- a/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp @@ -90,6 +90,7 @@ if { [istarget "x86_64-*-*"] && [gas_sframe_check] } then { if { [gas_x86_64_check] } then { set ASFLAGS "$ASFLAGS --64" run_dump_test "cfi-sframe-x86_64-1" + run_dump_test "cfi-sframe-x86_64-2" run_dump_test "cfi-sframe-x86_64-empty-1" run_dump_test "cfi-sframe-x86_64-empty-2" run_dump_test "cfi-sframe-x86_64-empty-3" diff --git a/gas/testsuite/gas/loongarch/div_zero.l b/gas/testsuite/gas/loongarch/div_zero.l new file mode 100644 index 0000000..b30c665 --- /dev/null +++ b/gas/testsuite/gas/loongarch/div_zero.l @@ -0,0 +1,4 @@ +#source: div_zero.s +.*: Assembler messages: +.*: Warning: Divide by zero! +.*: Warning: Divide by zero! diff --git a/gas/testsuite/gas/loongarch/div_zero.s b/gas/testsuite/gas/loongarch/div_zero.s new file mode 100644 index 0000000..44a5c26 --- /dev/null +++ b/gas/testsuite/gas/loongarch/div_zero.s @@ -0,0 +1,2 @@ +addi.w $a0,$a1,2/0 +addi.d $a0,$a1,4%0 diff --git a/gas/testsuite/gas/loongarch/loongarch.exp b/gas/testsuite/gas/loongarch/loongarch.exp index 0e836f7..d2008f4 100644 --- a/gas/testsuite/gas/loongarch/loongarch.exp +++ b/gas/testsuite/gas/loongarch/loongarch.exp @@ -37,5 +37,6 @@ if [istarget loongarch*-*-*] { run_list_test "illegal-operand" run_list_test "pseudo_op_option_fail" run_list_test "negative_right_shift" + run_list_test "div_zero" } } |