diff options
author | Jeff Law <law@redhat.com> | 1997-12-17 20:19:26 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1997-12-17 20:19:26 +0000 |
commit | b463948b73e824f046adb47bd263e2b958736e0f (patch) | |
tree | fddff3179bf3e76e5ceb611b36ab3d22777b4fe0 /gas | |
parent | 4f2e777e2b67ca0a1b9fc08c1437f119978a1853 (diff) | |
download | gdb-b463948b73e824f046adb47bd263e2b958736e0f.zip gdb-b463948b73e824f046adb47bd263e2b958736e0f.tar.gz gdb-b463948b73e824f046adb47bd263e2b958736e0f.tar.bz2 |
* expr.c (integer_constant 32bit bignum): Mask off bits outside
the range we care about.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/expr.c | 33 |
2 files changed, 34 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 363c80a..f597848 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +Wed Dec 17 21:23:07 1997 Jeffrey A Law (law@cygnus.com) + + * expr.c (integer_constant 32bit bignum): Mask off bits outside + the range we care about. + start-sanitize-d30v Wed Dec 17 15:29:03 1997 Michael Meissner <meissner@cygnus.com> @@ -37,6 +37,8 @@ static void integer_constant PARAMS ((int radix, expressionS * expressionP)); static void mri_char_constant PARAMS ((expressionS *)); static void current_location PARAMS ((expressionS *)); static void clean_up_expression PARAMS ((expressionS * expressionP)); +static segT operand PARAMS ((expressionS *)); +static operatorT operator PARAMS ((void)); extern const char EXP_CHARS[], FLT_CHARS[]; @@ -69,8 +71,6 @@ make_expr_symbol (expressionP) && expressionP->X_add_number == 0) return expressionP->X_add_symbol; - /* FIXME: This should be something which decode_local_label_name - will handle. */ fake = FAKE_LABEL_NAME; /* Putting constant symbols in absolute_section rather than @@ -85,7 +85,7 @@ make_expr_symbol (expressionP) symbolP->sy_value = *expressionP; if (expressionP->X_op == O_constant) - resolve_symbol_value (symbolP); + resolve_symbol_value (symbolP, 1); n = (struct expr_symbol_line *) xmalloc (sizeof *n); n->sym = symbolP; @@ -298,6 +298,8 @@ integer_constant (radix, expressionP) leader = generic_bignum; generic_bignum[0] = 0; generic_bignum[1] = 0; + generic_bignum[2] = 0; + generic_bignum[3] = 0; input_line_pointer = start; /*->1st digit. */ c = *input_line_pointer++; for (; @@ -332,8 +334,24 @@ integer_constant (radix, expressionP) number = ((generic_bignum[1] & LITTLENUM_MASK) << LITTLENUM_NUMBER_OF_BITS) | (generic_bignum[0] & LITTLENUM_MASK); + number &= 0xffffffff small = 1; } +#ifdef BFD64 + else if (leader < generic_bignum + 4) + { + /* Will fit into 64 bits. */ + number = + ((((((((valueT) generic_bignum[3] & LITTLENUM_MASK) + << LITTLENUM_NUMBER_OF_BITS) + | ((valueT) generic_bignum[2] & LITTLENUM_MASK)) + << LITTLENUM_NUMBER_OF_BITS) + | ((valueT) generic_bignum[1] & LITTLENUM_MASK)) + << LITTLENUM_NUMBER_OF_BITS) + | ((valueT) generic_bignum[0] & LITTLENUM_MASK)); + small = 1; + } +#endif else { number = leader - generic_bignum + 1; /* number of littlenums in the bignum. */ @@ -1328,6 +1346,13 @@ operator () ++input_line_pointer; return ret; + case '=': + if (input_line_pointer[1] != '=') + return op_encoding[c]; + + ++input_line_pointer; + return O_eq; + case '>': switch (input_line_pointer[1]) { @@ -1469,7 +1494,7 @@ expr (rank, resultP) && SEG_NORMAL (S_GET_SEGMENT (right.X_add_symbol))) { - resultP->X_add_number += right.X_add_number; + resultP->X_add_number -= right.X_add_number; resultP->X_add_number += (S_GET_VALUE (resultP->X_add_symbol) - S_GET_VALUE (right.X_add_symbol)); resultP->X_op = O_constant; |