/* expr.c -operands, expressions-
- Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011,
- 2012 Free Software Foundation, Inc.
+ Copyright (C) 1987-2015 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#include "as.h"
#include "safe-ctype.h"
-#include "obstack.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
int
expr_symbol_where (symbolS *sym, char **pfile, unsigned int *pline)
{
- register struct expr_symbol_line *l;
+ struct expr_symbol_line *l;
for (l = expr_symbol_lines; l != NULL; l = l->next)
{
/* input_line_pointer -> char after operand. */
if (c == '-')
{
- expressionP->X_add_number = - expressionP->X_add_number;
+ expressionP->X_add_number
+ = - (addressT) expressionP->X_add_number;
/* Notice: '-' may overflow: no warning is given.
This is compatible with other people's
assemblers. Sigh. */
signed word values can be represented in an O_constant expression, which is
useful e.g. for .sleb128 directives. */
-static void
+void
add_to_result (expressionS *resultP, offsetT amount, int rhs_highbit)
{
valueT ures = resultP->X_add_number;
/* Similarly, for subtraction. */
-static void
+void
subtract_from_result (expressionS *resultP, offsetT amount, int rhs_highbit)
{
valueT ures = resultP->X_add_number;