X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fconfig%2Fbfin-parse.y;h=87abd21549d72f819e3254c7f6f63d3e961bbf69;hb=feb4bea70a297eb6316d1b0685bbbb8095b7fb29;hp=c2a1d53ac639c3fb312a26c8e8b6c5caae4d1d2d;hpb=b90efa5b79ac1524ec260f8eb89d1be37e0219a7;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/config/bfin-parse.y b/gas/config/bfin-parse.y index c2a1d53ac6..87abd21549 100644 --- a/gas/config/bfin-parse.y +++ b/gas/config/bfin-parse.y @@ -1,5 +1,5 @@ /* bfin-parse.y ADI Blackfin parser - Copyright (C) 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -22,7 +22,6 @@ #include "as.h" #include "bfin-aux.h" /* Opcode generating auxiliaries. */ -#include "libbfd.h" #include "elf/common.h" #include "elf/bfin.h" @@ -158,16 +157,15 @@ extern INSTR_T insn; static Expr_Node *binary (Expr_Op_Type, Expr_Node *, Expr_Node *); static Expr_Node *unary (Expr_Op_Type, Expr_Node *); -static void notethat (char *, ...); +static void notethat (const char *, ...); -char *current_inputline; extern char *yytext; -int yyerror (char *); +int yyerror (const char *); /* Used to set SRCx fields to all 1s as described in the PRM. */ static Register reg7 = {REG_R7, 0}; -void error (char *format, ...) +void error (const char *format, ...) { va_list ap; static char buffer[2000]; @@ -180,7 +178,7 @@ void error (char *format, ...) } int -yyerror (char *msg) +yyerror (const char *msg) { if (msg[0] == '\0') error ("%s", msg); @@ -4495,7 +4493,7 @@ expr_1: expr_1 STAR expr_1 EXPR_T mkexpr (int x, SYMBOL_T s) { - EXPR_T e = (EXPR_T) ALLOCATE (sizeof (struct expression_cell)); + EXPR_T e = XNEW (struct expression_cell); e->value = x; EXPR_SYMBOL(e) = s; return e; @@ -4505,7 +4503,7 @@ static int value_match (Expr_Node *exp, int sz, int sign, int mul, int issigned) { int umax = (1 << sz) - 1; - int min = -1 << (sz - 1); + int min = -(1 << (sz - 1)); int max = (1 << (sz - 1)) - 1; int v = (EXPR_VALUE (exp)) & 0xffffffff; @@ -4651,7 +4649,7 @@ unary (Expr_Op_Type op, Expr_Node *x) int debug_codeselection = 0; static void -notethat (char *format, ...) +notethat (const char *format, ...) { va_list ap; va_start (ap, format);