aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-03-16 18:09:04 +0000
committerNick Clifton <nickc@redhat.com>2005-03-16 18:09:04 +0000
commit199fea98c99205f0fd3d2d3fd1a2670bdfe8a326 (patch)
tree9ee7f22fce6dbaa8c4b89d10b0d836220646023b /gas
parent4cfaf6d58110e580bab7c7cfff8ad2892a195492 (diff)
downloadgdb-199fea98c99205f0fd3d2d3fd1a2670bdfe8a326.zip
gdb-199fea98c99205f0fd3d2d3fd1a2670bdfe8a326.tar.gz
gdb-199fea98c99205f0fd3d2d3fd1a2670bdfe8a326.tar.bz2
(gas_cgen_parse_operand): Copy opinfo parameter into a local variable in case
it is clobbered by the setjmp.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/cgen.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 1891d85..db3af83 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -7,6 +7,11 @@
* config/te-symbian.h: Include "te-armeabi.h".
2005-03-16 Nick Clifton <nickc@redhat.com>
+
+ * cgen.c (gas_cgen_parse_operand): Copy opinfo parameter into a
+ local variable in case it is clobbered by the setjmp.
+
+2005-03-16 Nick Clifton <nickc@redhat.com>
Ben Elliston <bje@au.ibm.com>
* configure.in (werror): New switch: Add -Werror to the
diff --git a/gas/cgen.c b/gas/cgen.c
index ab30778..ec3f692 100644
--- a/gas/cgen.c
+++ b/gas/cgen.c
@@ -320,9 +320,11 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
/* These are volatile to survive the setjmp. */
char * volatile hold;
enum cgen_parse_operand_result * volatile resultP_1;
+ volatile int opinfo_1;
#else
static char *hold;
static enum cgen_parse_operand_result *resultP_1;
+ int opinfo_1;
#endif
const char *errmsg;
expressionS exp;
@@ -336,6 +338,7 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
resultP_1 = resultP;
hold = input_line_pointer;
input_line_pointer = (char *) *strP;
+ opinfo_1 = opinfo;
/* We rely on md_operand to longjmp back to us.
This is done via gas_cgen_md_operand. */
@@ -356,7 +359,7 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
input_line_pointer = hold;
#ifdef TC_CGEN_PARSE_FIX_EXP
- opinfo = TC_CGEN_PARSE_FIX_EXP (opinfo, & exp);
+ opinfo = TC_CGEN_PARSE_FIX_EXP (opinfo_1, & exp);
#endif
/* FIXME: Need to check `want'. */
@@ -383,7 +386,7 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
break;
de_fault:
default:
- queue_fixup (opindex, opinfo, &exp);
+ queue_fixup (opindex, opinfo_1, &exp);
*valueP = 0;
*resultP = CGEN_PARSE_OPERAND_RESULT_QUEUED;
break;