aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/arm/arm.c11
-rw-r--r--gcc/config/mips/linux-unwind.h14
2 files changed, 18 insertions, 7 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index c151c83b3df..ebc00935b78 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -11573,11 +11573,18 @@ arm_print_operand (FILE *stream, rtx x, int code)
case 'S':
{
HOST_WIDE_INT val;
- const char * shift = shift_op (x, &val);
+ const char *shift;
+ if (!shift_operator (x, SImode))
+ {
+ output_operand_lossage ("invalid shift operand");
+ break;
+ }
+
+ shift = shift_op (x, &val);
if (shift)
{
- fprintf (stream, ", %s ", shift_op (x, &val));
+ fprintf (stream, ", %s ", shift);
if (val == -1)
arm_print_operand (stream, XEXP (x, 1), 0);
else
diff --git a/gcc/config/mips/linux-unwind.h b/gcc/config/mips/linux-unwind.h
index 4152138ae04..4f96e95e940 100644
--- a/gcc/config/mips/linux-unwind.h
+++ b/gcc/config/mips/linux-unwind.h
@@ -31,6 +31,7 @@ Boston, MA 02110-1301, USA. */
state data appropriately. See unwind-dw2.c for the structs. */
#include <signal.h>
+#include <asm/unistd.h>
/* The third parameter to the signal handler points to something with
* this structure defined in asm/ucontext.h, but the name clashes with
@@ -59,20 +60,23 @@ mips_fallback_frame_state (struct _Unwind_Context *context,
/* or */
/* 24021017 li v0, 0x1017 (sigreturn) */
/* 0000000c syscall */
- if (*(pc + 1) != 0x0000000c)
+ if (pc[1] != 0x0000000c)
return _URC_END_OF_STACK;
- if (*(pc + 0) == 0x24021017)
+#if _MIPS_SIM == _ABIO32
+ if (pc[0] == (0x24020000 | __NR_sigreturn))
{
struct sigframe {
- u_int32_t trampoline[2];
+ u_int32_t trampoline[2];
struct sigcontext sigctx;
} *rt_ = context->ra;
sc = &rt_->sigctx;
}
- else if (*(pc + 0) == 0x24021061)
+ else
+#endif
+ if (pc[0] == (0x24020000 | __NR_rt_sigreturn))
{
struct rt_sigframe {
- u_int32_t trampoline[2];
+ u_int32_t trampoline[2];
struct siginfo info;
_sig_ucontext_t uc;
} *rt_ = context->ra;