* dwarf2read.c (struct dwarf2_cu): Remove ranges_offset and
[deliverable/binutils-gdb.git] / gas / cgen.c
index 5b0694b03e222b8644c24d724737b1e7fa65f294..59c7e561adc4e0c3c90ccc55402069deafa1234c 100644 (file)
@@ -1,18 +1,18 @@
 /* GAS interface for targets using CGEN: Cpu tools GENerator.
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006 Free Software Foundation, Inc.
+   2006, 2007, 2009 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)
+   the Free Software Foundation; either version 3, 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.
+   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
@@ -452,9 +452,10 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
          if (exp.X_op == O_symbol
              && reloc_type == BFD_RELOC_RELC
              && exp.X_add_symbol->sy_value.X_op == O_constant
-             && exp.X_add_symbol->bsym->section != expr_section
-             && exp.X_add_symbol->bsym->section != absolute_section
-             && exp.X_add_symbol->bsym->section != undefined_section)
+             && (!exp.X_add_symbol->bsym
+                 || (exp.X_add_symbol->bsym->section != expr_section
+                     && exp.X_add_symbol->bsym->section != absolute_section
+                     && exp.X_add_symbol->bsym->section != undefined_section)))
            {
              /* Local labels will have been (eagerly) turned into constants
                 by now, due to the inappropriately deep insight of the
@@ -1034,7 +1035,7 @@ gas_cgen_tc_gen_reloc (section, fixP)
       return NULL;
     }
 
-  assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
+  gas_assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
 
   reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
   *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
@@ -1061,4 +1062,3 @@ gas_cgen_begin ()
   else
     cgen_clear_signed_overflow_ok (gas_cgen_cpu_desc);
 }
-
This page took 0.023568 seconds and 4 git commands to generate.