From: Jie Zhang Date: Wed, 2 Sep 2009 08:57:38 +0000 (+0000) Subject: * config/bfin-parse.y (value_match): Use int instead of long. X-Git-Tag: binutils-2_20-branchpoint~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=958cff2f9b7d0caaf1d02325c3464546dd2b4c11;p=platform%2Fupstream%2Fbinutils.git * config/bfin-parse.y (value_match): Use int instead of long. From Michael Frysinger * config/bfin-defs.h (Expr_Node_Value): Declare the i_value member as long long. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index dd22576..51384a9 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,13 @@ 2009-09-02 Jie Zhang + * config/bfin-parse.y (value_match): Use int instead of long. + + From Michael Frysinger + * config/bfin-defs.h (Expr_Node_Value): Declare the i_value + member as long long. + +2009-09-02 Jie Zhang + From Bernd Schmidt * config/gas/bfin-parse.y (asm_1): Clean up and unify error handling for load and store insns. diff --git a/gas/config/bfin-defs.h b/gas/config/bfin-defs.h index cc6569d..8923b73 100644 --- a/gas/config/bfin-defs.h +++ b/gas/config/bfin-defs.h @@ -287,7 +287,7 @@ typedef enum typedef union { const char *s_value; /* if relocation symbol, the text. */ - int i_value; /* if constant, the value. */ + long long i_value; /* if constant, the value. */ Expr_Op_Type op_value; /* if operator, the value. */ } Expr_Node_Value; diff --git a/gas/config/bfin-parse.y b/gas/config/bfin-parse.y index 4a2fa6a..72db6d9 100644 --- a/gas/config/bfin-parse.y +++ b/gas/config/bfin-parse.y @@ -4376,11 +4376,11 @@ mkexpr (int x, SYMBOL_T s) static int value_match (Expr_Node *expr, int sz, int sign, int mul, int issigned) { - long umax = (1L << sz) - 1; - long min = -1L << (sz - 1); - long max = (1L << (sz - 1)) - 1; + int umax = (1 << sz) - 1; + int min = -1 << (sz - 1); + int max = (1 << (sz - 1)) - 1; - long v = EXPR_VALUE (expr); + int v = (EXPR_VALUE (expr)) & 0xffffffff; if ((v % mul) != 0) {