aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-aarch64.c2
-rw-r--r--gas/config/tc-aarch64.h2
-rw-r--r--gas/config/tc-i386.c2
-rw-r--r--gas/config/tc-i386.h2
-rw-r--r--gas/config/tc-m68k.c15
-rw-r--r--gas/gen-sframe.c4
-rw-r--r--gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-2.d21
-rw-r--r--gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-2.s4
-rw-r--r--gas/testsuite/gas/cfi-sframe/cfi-sframe.exp1
-rw-r--r--gas/testsuite/gas/loongarch/div_zero.l4
-rw-r--r--gas/testsuite/gas/loongarch/div_zero.s2
-rw-r--r--gas/testsuite/gas/loongarch/loongarch.exp1
-rw-r--r--gas/testsuite/gas/ppc/future.d35
-rw-r--r--gas/testsuite/gas/ppc/future.s18
14 files changed, 101 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"
}
}
diff --git a/gas/testsuite/gas/ppc/future.d b/gas/testsuite/gas/ppc/future.d
index 76a30a5..5c008b5 100644
--- a/gas/testsuite/gas/ppc/future.d
+++ b/gas/testsuite/gas/ppc/future.d
@@ -57,4 +57,39 @@ Disassembly of section \.text:
.*: (d0 1e 22 f0|f0 22 1e d0) xxgfmul128gcm vs1,vs2,vs3
.*: (d6 0f e0 f3|f3 e0 0f d6) xxgfmul128xts vs31,vs32,vs33
.*: (d6 0f e0 f3|f3 e0 0f d6) xxgfmul128xts vs31,vs32,vs33
+.*: (06 00 00 00|00 00 00 06) paddis r12,r9,15
+.*: (3d 89 00 0f|0f 00 89 3d)
+.*: (06 00 00 00|00 00 00 06) paddis r12,r9,15
+.*: (3d 89 00 0f|0f 00 89 3d)
+.*: (06 00 ff ff|ff ff 00 06) paddis r12,r9,-32769
+.*: (3d 89 7f ff|ff 7f 89 3d)
+.*: (06 00 ff ff|ff ff 00 06) paddis r12,r9,-32769
+.*: (3d 89 7f ff|ff 7f 89 3d)
+.*: (06 10 00 00|00 00 10 06) paddis r9,0,25,1 # e4
+.*: (3d 20 00 19|19 00 20 3d)
+.*: (06 00 7f ff|ff 7f 00 06) plis r24,2147483647
+.*: (3f 00 ff ff|ff ff 00 3f)
+.*: (06 00 7f ff|ff 7f 00 06) plis r24,2147483647
+.*: (3f 00 ff ff|ff ff 00 3f)
+.*: (60 00 00 00|00 00 00 60) nop
+.*: (06 00 7f ff|ff 7f 00 06) plis r24,2147483647
+.*: (3f 00 ff ff|ff ff 00 3f)
+.*: (06 00 80 00|00 80 00 06) paddis r30,r10,-2147483648
+.*: (3f ca 00 00|00 00 ca 3f)
+.*: (06 00 80 00|00 80 00 06) paddis r30,r10,-2147483648
+.*: (3f ca 00 00|00 00 ca 3f)
+.*: (06 00 80 00|00 80 00 06) paddis r30,r10,-2147483648
+.*: (3f ca 00 00|00 00 ca 3f)
+.*: (60 00 00 00|00 00 00 60) nop
+.*: (06 00 7f ff|ff 7f 00 06) paddis r30,r10,2147483647
+.*: (3f ca ff ff|ff ff ca 3f)
+.*: (06 00 7f ff|ff 7f 00 06) paddis r30,r10,2147483647
+.*: (3f ca ff ff|ff ff ca 3f)
+.*: (06 00 7f ff|ff 7f 00 06) paddis r30,r10,2147483647
+.*: (3f ca ff ff|ff ff ca 3f)
+.*: (60 00 00 00|00 00 00 60) nop
+.*: (06 10 7f ff|ff 7f 10 06) paddis r15,0,2147483647,1 # 140
+.* (3d e0 ff ff|ff ff e0 3d)
+.*: (06 10 7f ff|ff 7f 10 06) paddis r15,0,2147483647,1 # 148
+.* (3d e0 ff ff|ff ff e0 3d)
#pass
diff --git a/gas/testsuite/gas/ppc/future.s b/gas/testsuite/gas/ppc/future.s
index fec99e3..55867de 100644
--- a/gas/testsuite/gas/ppc/future.s
+++ b/gas/testsuite/gas/ppc/future.s
@@ -49,3 +49,21 @@ _start:
xxgfmul128gcm 1, 2, 3
xxgfmul128 31, 32, 33, 1
xxgfmul128xts 31, 32, 33
+ paddis 12, 9, 15, 0
+ paddis 12, 9, 15
+ paddis 12, 9, ~(1<<15), 0
+ paddis 12, 9, ~(1<<15)
+ paddis 9, 0, 25, 1
+ paddis 24, 0, 2147483647, 0
+ paddis 24, 0, 2147483647
+ plis 24, 2147483647
+ paddis 30, 10, -2147483648, 0
+ paddis 30, 10, -2147483648
+ psubis 30, 10, 2147483648, 0
+ nop
+ paddis 30, 10, 2147483647, 0
+ paddis 30, 10, 2147483647
+ psubis 30, 10, -2147483647, 0
+ paddis 15, 0, 2147483647, 1
+ psubis 15, 0, -2147483647, 1
+