aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>1999-11-16 12:27:25 +0000
committerAlan Modra <amodra@gmail.com>1999-11-16 12:27:25 +0000
commit2daf4fd8960262b76e597427e2e230b3fe6470b3 (patch)
tree2f5bce813d07e3da98ed893331afea4d8ddcfa6c /gas
parent92a66162a2507f0707996b707f22f27d62055bf8 (diff)
downloadgdb-2daf4fd8960262b76e597427e2e230b3fe6470b3.zip
gdb-2daf4fd8960262b76e597427e2e230b3fe6470b3.tar.gz
gdb-2daf4fd8960262b76e597427e2e230b3fe6470b3.tar.bz2
* config/tc-i386.c (i386_immediate): Disallow O_big immediates.
(i386_displacement): Disallow O_big displacements.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-i386.c17
2 files changed, 19 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 0121ecc..6b99838 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+1999-11-16 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * config/tc-i386.c (i386_immediate): Disallow O_big immediates.
+ (i386_displacement): Disallow O_big displacements.
+
Mon Nov 15 20:12:43 1999 Donald Lindsay <dlindsay@cygnus.com>
* config/tc-arm.c (do_mia,do_mar,do_mra,do_pld,do_ldrl,do_co_reg): Small
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 1d8f07c..5219113 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -2558,7 +2558,7 @@ i386_immediate (imm_start)
input_line_pointer = save_input_line_pointer;
- if (exp->X_op == O_absent)
+ if (exp->X_op == O_absent || exp->X_op == O_big)
{
/* missing or bad expr becomes absolute 0 */
as_bad (_("Missing or invalid immediate expression `%s' taken as 0"),
@@ -2567,9 +2567,9 @@ i386_immediate (imm_start)
exp->X_add_number = 0;
exp->X_add_symbol = (symbolS *) 0;
exp->X_op_symbol = (symbolS *) 0;
- i.types[this_operand] |= Imm;
}
- else if (exp->X_op == O_constant)
+
+ if (exp->X_op == O_constant)
{
int bigimm = Imm32;
if (flag_16bit_code ^ (i.prefix[DATA_PREFIX] != 0))
@@ -2808,6 +2808,17 @@ i386_displacement (disp_start, disp_end)
RESTORE_END_STRING (disp_end);
input_line_pointer = save_input_line_pointer;
+ if (exp->X_op == O_absent || exp->X_op == O_big)
+ {
+ /* missing or bad expr becomes absolute 0 */
+ as_bad (_("Missing or invalid displacement expression `%s' taken as 0"),
+ disp_start);
+ exp->X_op = O_constant;
+ exp->X_add_number = 0;
+ exp->X_add_symbol = (symbolS *) 0;
+ exp->X_op_symbol = (symbolS *) 0;
+ }
+
if (exp->X_op == O_constant)
{
if (fits_in_signed_byte (exp->X_add_number))