ppc/svp64: introduce SVP64 name parser
[binutils-gdb.git] / gas / config / tc-z80.c
index 303296b7dab0e7609d27010a96a1b23ac6bed2a8..029513a26143e053e5805fd2a215ed4f3ac271da 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-z80.c -- Assemble code for the Zilog Z80, Z180, EZ80 and ASCII R800
-   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+   Copyright (C) 2005-2022 Free Software Foundation, Inc.
    Contributed by Arnold Metselaar <arnold_m@operamail.com>
 
    This file is part of GAS, the GNU Assembler.
@@ -538,7 +538,7 @@ md_begin (void)
 }
 
 void
-z80_md_end (void)
+z80_md_finish (void)
 {
   int mach_type;
 
@@ -1134,7 +1134,15 @@ emit_data_val (expressionS * val, int size)
   if (val->X_op == O_constant)
     {
       int i;
-      if (is_overflow (val->X_add_number, size*8))
+
+       /* PR 28791:
+         Check for overflow, but ignore values that were generated by bit
+         manipulation operators (eg ~0xe6 and -7).  This does mean that
+         manipluated overlarge values will not be reported (eg ~0x1234),
+         but it does help to maintain compatibility with earlier versions
+         of the assembler.  */
+      if (! val->X_extrabit
+         && is_overflow (val->X_add_number, size*8))
        as_warn ( _("%d-bit overflow (%+ld)"), size*8, val->X_add_number);
       for (i = 0; i < size; ++i)
        p[i] = (char)(val->X_add_number >> (i*8));
@@ -3853,7 +3861,7 @@ tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED , fixS *fixp)
 
   if (fixp->fx_subsy != NULL)
     {
-      as_bad_where (fixp->fx_file, fixp->fx_line, _("expression too complex"));
+      as_bad_subtract (fixp);
       return NULL;
     }
 
@@ -3902,11 +3910,11 @@ z80_tc_label_is_local (const char *name)
 #define EXP_MIN -0x10000
 #define EXP_MAX 0x10000
 static int
-str_to_broken_float (bool *signP, bfd_uint64_t *mantissaP, int *expP)
+str_to_broken_float (bool *signP, uint64_t *mantissaP, int *expP)
 {
   char *p;
   bool sign;
-  bfd_uint64_t mantissa = 0;
+  uint64_t mantissa = 0;
   int exponent = 0;
   int i;
 
@@ -4021,7 +4029,7 @@ str_to_broken_float (bool *signP, bfd_uint64_t *mantissaP, int *expP)
 static const char *
 str_to_zeda32(char *litP, int *sizeP)
 {
-  bfd_uint64_t mantissa;
+  uint64_t mantissa;
   bool sign;
   int exponent;
   unsigned i;
@@ -4080,7 +4088,7 @@ str_to_zeda32(char *litP, int *sizeP)
 static const char *
 str_to_float48(char *litP, int *sizeP)
 {
-  bfd_uint64_t mantissa;
+  uint64_t mantissa;
   bool sign;
   int exponent;
   unsigned i;