aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1995-01-12 23:00:26 +0000
committerKen Raeburn <raeburn@cygnus>1995-01-12 23:00:26 +0000
commit3a762a0bfdb9e74fa2ca4b41b998d64d9a178d25 (patch)
tree54130f81280c11d1222cde450b2c29627df89f2c
parent5e815a37fa6b264763168c67ef4452c0112a2d26 (diff)
downloadfsf-binutils-gdb-3a762a0bfdb9e74fa2ca4b41b998d64d9a178d25.zip
fsf-binutils-gdb-3a762a0bfdb9e74fa2ca4b41b998d64d9a178d25.tar.gz
fsf-binutils-gdb-3a762a0bfdb9e74fa2ca4b41b998d64d9a178d25.tar.bz2
Use new hex-value code in libiberty:
* Makefile.in (VMS_OTHER_OBJS): Add ../libiberty/hex.o. (OBJS): Delete hex-value.o. (REAL_SOURCES): Delete hex-value.c. (hex-value.o): Delete dependencies. * hex-value.c: Deleted. * as.c (main): Call hex_init. * expr.c, config/tc-mips.c: Include libiberty.h. Replace hex_value array references with hex_* macros.
-rw-r--r--gas/ChangeLog21
-rw-r--r--gas/config/tc-mips.c4
-rw-r--r--gas/expr.c24
-rw-r--r--gas/hex-value.c62
4 files changed, 33 insertions, 78 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index e8829c0..0861bc4 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,26 @@
+Thu Jan 12 17:56:24 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (VMS_OTHER_OBJS): Add ../libiberty/hex.o.
+ (OBJS): Delete hex-value.o.
+ (REAL_SOURCES): Delete hex-value.c.
+ (hex-value.o): Delete dependencies.
+ * hex-value.c: Deleted.
+ * as.c (main): Call hex_init.
+ * expr.c, config/tc-mips.c: Include libiberty.h. Replace
+ hex_value array references with hex_* macros.
+
Wed Jan 11 17:51:38 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+ * config/tc-h8300.h (COFF_FLAGS): Don't define.
+ * config/tc-h8500.h (COFF_FLAGS), config/tc-sh.h (COFF_FLAGS),
+ config/tc-z8k.h (COFF_FLAGS): Ditto.
+start-sanitize-rce
+ * config/tc-rce.h (COFF_FLAGS): Ditto.
+end-sanitize-rce
+
+ * config/obj-coff.c (KEEP_RELOC_INFO): Make sure it's always
+ defined.
+
* config/tc-m68k.c (m68k_ip, cases AOFF and AINDEX): Don't
generate 68020 addressing modes for a 68000 processor.
(md_estimate_size_before_relax, cases PCREL and PCLEA): Ditto.
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 4710a7c..e38cbbc 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -6598,8 +6598,6 @@ md_obj_end ()
as_warn ("missing `.end' at end of assembly");
}
-extern char hex_value[];
-
static long
get_number ()
{
@@ -6621,7 +6619,7 @@ get_number ()
while (isxdigit (*input_line_pointer))
{
val <<= 4;
- val |= hex_value[(int) *input_line_pointer++];
+ val |= hex_value (*input_line_pointer++);
}
return negative ? -val : val;
}
diff --git a/gas/expr.c b/gas/expr.c
index 88da7e9..8acfec3 100644
--- a/gas/expr.c
+++ b/gas/expr.c
@@ -28,13 +28,12 @@
#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[];
@@ -42,7 +41,7 @@ extern const char EXP_CHARS[], FLT_CHARS[];
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;
{
@@ -61,11 +60,11 @@ make_expr_symbol (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)
@@ -140,7 +139,6 @@ integer_constant (radix, expressionP)
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.
@@ -188,7 +186,7 @@ integer_constant (radix, expressionP)
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;
@@ -211,7 +209,7 @@ integer_constant (radix, expressionP)
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;
@@ -776,8 +774,8 @@ clean_up_expression (expressionP)
&& (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;
diff --git a/gas/hex-value.c b/gas/hex-value.c
deleted file mode 100644
index 114641b..0000000
--- a/gas/hex-value.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* 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 */