#include <string.h>
#include "as.h"
-
+#include "libiberty.h"
#include "obstack.h"
static void floating_constant PARAMS ((expressionS * expressionP));
static void integer_constant PARAMS ((int radix, expressionS * expressionP));
static void clean_up_expression PARAMS ((expressionS * expressionP));
-static symbolS *make_expr_symbol PARAMS ((expressionS * expressionP));
extern const char EXP_CHARS[], FLT_CHARS[];
\f
build expressions up out of other expressions. The symbol is put
into the fake section expr_section. */
-static symbolS *
+symbolS *
make_expr_symbol (expressionP)
expressionS *expressionP;
{
expr_section is convenient for the old a.out code, for which
S_GET_SEGMENT does not always retrieve the value put in by
S_SET_SEGMENT. */
- symbolP = symbol_new (fake,
- (expressionP->X_op == O_constant
- ? absolute_section
- : expr_section),
- 0, &zero_address_frag);
+ symbolP = symbol_create (fake,
+ (expressionP->X_op == O_constant
+ ? absolute_section
+ : expr_section),
+ 0, &zero_address_frag);
symbolP->sy_value = *expressionP;
if (expressionP->X_op == O_constant)
symbolS *symbolP; /* points to symbol */
int small; /* true if fits in 32 bits. */
- extern const char hex_value[]; /* in hex_value.c */
/* May be bignum, or may fit in 32 bits. */
/* Most numbers fit into 32 bits, and we want this case to be fast.
start = input_line_pointer;
c = *input_line_pointer++;
for (number = 0;
- (digit = hex_value[(unsigned char) c]) < maxdig;
+ (digit = hex_value (c)) < maxdig;
c = *input_line_pointer++)
{
number = number * radix + digit;
input_line_pointer = start; /*->1st digit. */
c = *input_line_pointer++;
for (;
- (carry = hex_value[(unsigned char) c]) < maxdig;
+ (carry = hex_value (c)) < maxdig;
c = *input_line_pointer++)
{
for (pointer = generic_bignum;
&& (S_GET_VALUE (expressionP->X_op_symbol)
== S_GET_VALUE (expressionP->X_add_symbol))))
{
- bfd_vma diff = (S_GET_VALUE (expressionP->X_add_symbol)
- - S_GET_VALUE (expressionP->X_op_symbol));
+ addressT diff = (S_GET_VALUE (expressionP->X_add_symbol)
+ - S_GET_VALUE (expressionP->X_op_symbol));
expressionP->X_op = O_constant;
expressionP->X_add_symbol = NULL;
+++ /dev/null
-/* hex_value.c - char=>radix-value -
- Copyright (C) 1987, 1990, 1991, 1992, 1994 Free Software Foundation, Inc.
-
- This file is part of GAS, the GNU Assembler.
-
- GAS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GAS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-/*
- * Export: Hex_value[]. Converts digits to their radix-values.
- * As distributed assumes 8 bits per char (256 entries) and ASCII.
- */
-
-#define __ (42) /* blatently illegal digit value */
-/* exceeds any normal radix */
-
-#if (__STDC__ != 1)
-#ifndef const
-#define const /* empty */
-#endif
-#endif
-
-const char
- hex_value[256] =
-{ /* for fast ASCII -> binary */
- __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __,
- __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __,
- __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __,
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, __, __, __, __, __, __,
- __, 10, 11, 12, 13, 14, 15, __, __, __, __, __, __, __, __, __,
- __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __,
- __, 10, 11, 12, 13, 14, 15, __, __, __, __, __, __, __, __, __,
- __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __,
- __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __,
- __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __,
- __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __,
- __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __,
- __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __,
- __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __,
- __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __,
- __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __
-};
-
-#ifdef VMS
-dummy2 ()
-{
-}
-
-#endif
-
-/* end of hex_value.c */