From: Alan Modra Date: Tue, 16 Nov 1999 12:27:25 +0000 (+0000) Subject: * config/tc-i386.c (i386_immediate): Disallow O_big immediates. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2daf4fd8960262b76e597427e2e230b3fe6470b3;p=binutils-gdb.git * config/tc-i386.c (i386_immediate): Disallow O_big immediates. (i386_displacement): Disallow O_big displacements. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 0121eccdcb0..6b998380af0 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +1999-11-16 Alan Modra + + * 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 * 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 1d8f07c5c93..52191134bd7 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))