[patch] create include/cgen

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch] create include/cgen

Doug Evans-2
[resend, adding gdb-patches, sid, and including requested additions from Nick]

Hi.

This patch creates include/cgen and moves a few files there.
It also simplifies basic-modes.h (old cgen-types.h) and
basic-ops.h (old cgen-ops.h) by removing floating point support.
It's unused and doesn't handle host-vs-target fp anyway.
Later I hope/plan to merge the similar support in sim/common.
[SID has similar support too.  We *could* merge it in too,
but I'm not currently planning to in the near future, but certainly
it could be done at some point.]

This patch doesn't move include/opcode/cgen.h to include/cgen because a lot of
that file is more closely tied to opcodes than the others.
Eventually I want to split up include/opcode/cgen.h, but that's for later.

I will check this in on Thursday if there are no objections.

Tested by regenerating/compiling all cgen-based opcode targets,
all gdb simulators, and all sid cgen-cpu components,
and running the testsuites for m32r gas/sim.


2009-10-19  Doug Evans  <[hidden email]>

        cpu/
        * m32c.opc (opc.h): cgen-types.h -> cgen/basic-modes.h.
        cgen-ops.h -> cgen/basic-ops.h.

        include/opcode/
        * cgen-bitset.h: Delete, moved to ../cgen/bitset.h.
        * cgen.h: Update.  Improve multi-inclusion macro name.

        opcodes/
        * cgen-bitset.c: Update.
        * cgen-ops.h: Delete, moved to ../include/cgen/basic-ops.h.
        * cgen-types.h: Delete, moved to ../include/cgen/basic-modes.h.
        * fr30-desc.h: Regenerate.
        * frv-desc.h: Regenerate.
        * ip2k-desc.h: Regenerate.
        * iq2000-desc.h: Regenerate.
        * lm32-desc.h: Regenerate.
        * m32c-desc.h: Regenerate.
        * m32c-opc.h: Regenerate.
        * m32r-desc.h: Regenerate.
        * mep-desc.h: Regenerate.
        * mt-desc.h: Regenerate.
        * openrisc-desc.h: Regenerate.
        * xc16x-desc.h: Regenerate.
        * xstormy16-desc.h: Regenerate.

        include/cgen/
        * basic-modes.h: New file.  Moved here from opcodes/cgen-types.h.
        * basic-ops.h: New file.  Moved here from opcodes/cgen-ops.h.
        * bitset.h: New file.  Moved here from ../opcode/cgen-bitset.h.
        Update license to GPL v3.

Index: cpu/m32c.opc
===================================================================
RCS file: /cvs/src/src/cpu/m32c.opc,v
retrieving revision 1.13
diff -u -p -r1.13 m32c.opc
--- cpu/m32c.opc 2 Sep 2009 07:21:03 -0000 1.13
+++ cpu/m32c.opc 19 Oct 2009 16:17:05 -0000
@@ -40,8 +40,8 @@
 /* -- opc.h */
 
 /* Needed for RTL's 'ext' and 'trunc' operators.  */
-#include "cgen-types.h"
-#include "cgen-ops.h"
+#include "cgen/basic-modes.h"
+#include "cgen/basic-ops.h"
 
 /* We can't use the default hash size because many bits are used by
    operands.  */
Index: include/opcode/cgen-bitset.h
===================================================================
RCS file: include/opcode/cgen-bitset.h
diff -N include/opcode/cgen-bitset.h
--- include/opcode/cgen-bitset.h 28 Oct 2005 19:38:59 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,55 +0,0 @@
-/* Header file the type CGEN_BITSET.
-
-Copyright 2002, 2005 Free Software Foundation, Inc.
-
-This file is part of GDB, the GNU debugger, and the GNU Binutils.
-
-This program 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 of the License, or
-(at your option) any later version.
-
-This program 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 this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-#ifndef CGEN_BITSET_H
-#define CGEN_BITSET_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* A bitmask represented as a string.
-   Each member of the set is represented as a bit
-   in the string. Bytes are indexed from left to right in the string and
-   bits from most significant to least within each byte.
-
-   For example, the bit representing member number 6 is (set->bits[0] & 0x02).
-*/
-typedef struct cgen_bitset
-{
-  unsigned length;
-  char *bits;
-} CGEN_BITSET;
-
-extern CGEN_BITSET *cgen_bitset_create PARAMS ((unsigned));
-extern void cgen_bitset_init PARAMS ((CGEN_BITSET *, unsigned));
-extern void cgen_bitset_clear PARAMS ((CGEN_BITSET *));
-extern void cgen_bitset_add PARAMS ((CGEN_BITSET *, unsigned));
-extern void cgen_bitset_set PARAMS ((CGEN_BITSET *, unsigned));
-extern int cgen_bitset_compare PARAMS ((CGEN_BITSET *, CGEN_BITSET *));
-extern void cgen_bitset_union PARAMS ((CGEN_BITSET *, CGEN_BITSET *, CGEN_BITSET *));
-extern int cgen_bitset_intersect_p PARAMS ((CGEN_BITSET *, CGEN_BITSET *));
-extern int cgen_bitset_contains PARAMS ((CGEN_BITSET *, unsigned));
-extern CGEN_BITSET *cgen_bitset_copy PARAMS ((CGEN_BITSET *));
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif
Index: include/opcode/cgen.h
===================================================================
RCS file: /cvs/src/src/include/opcode/cgen.h,v
retrieving revision 1.23
diff -u -p -r1.23 cgen.h
--- include/opcode/cgen.h 28 Oct 2005 19:38:59 -0000 1.23
+++ include/opcode/cgen.h 19 Oct 2009 16:17:06 -0000
@@ -1,6 +1,6 @@
 /* Header file for targets using CGEN: Cpu tools GENerator.
 
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2009
 Free Software Foundation, Inc.
 
 This file is part of GDB, the GNU debugger, and the GNU Binutils.
@@ -19,11 +19,12 @@ You should have received a copy of the G
 with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef CGEN_H
-#define CGEN_H
+#ifndef OPCODE_CGEN_H
+#define OPCODE_CGEN_H
 
 #include "symcat.h"
-#include "cgen-bitset.h"
+#include "cgen/bitset.h"
+
 /* ??? This file requires bfd.h but only to get bfd_vma.
    Seems like an awful lot to require just to get such a fundamental type.
    Perhaps the definition of bfd_vma can be moved outside of bfd.h.
@@ -1470,4 +1471,4 @@ extern void cgen_clear_signed_overflow_o
 /* Will an error message be generated if a signed field in an instruction overflows ? */
 extern unsigned int cgen_signed_overflow_ok_p (CGEN_CPU_DESC);
 
-#endif /* CGEN_H */
+#endif /* OPCODE_CGEN_H */
Index: opcodes/cgen-bitset.c
===================================================================
RCS file: /cvs/src/src/opcodes/cgen-bitset.c,v
retrieving revision 1.2
diff -u -p -r1.2 cgen-bitset.c
--- opcodes/cgen-bitset.c 5 Jul 2007 09:49:00 -0000 1.2
+++ opcodes/cgen-bitset.c 19 Oct 2009 16:17:06 -0000
@@ -1,5 +1,5 @@
 /* CGEN generic opcode support.
-   Copyright 2002, 2005, 2007
+   Copyright 2002, 2005, 2007, 2009
    Free Software Foundation, Inc.
 
    This file is part of libopcodes.
@@ -21,10 +21,11 @@
 /* Functions for manipulating CGEN_BITSET.  */
 
 #include "libiberty.h"
-#include "opcode/cgen-bitset.h"
+#include "cgen/bitset.h"
 #include <string.h>
 
 /* Create a bit mask.  */
+
 CGEN_BITSET *
 cgen_bitset_create (unsigned bit_count)
 {
Index: opcodes/cgen-ops.h
===================================================================
RCS file: opcodes/cgen-ops.h
diff -N opcodes/cgen-ops.h
--- opcodes/cgen-ops.h 5 Jul 2007 09:49:00 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,432 +0,0 @@
-/* Semantics ops support for CGEN-based opcode libraries.
-   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
-   Contributed by Red Hat.
-
-   This file is part of the GNU opcodes library.
-
-   This program 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 3, or (at your option)
-   any later version.
-
-   It 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 this program; if not, write to the Free Software Foundation, Inc.,
-   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-#ifndef CGEN_SEM_OPS_H
-#define CGEN_SEM_OPS_H
-
-#include <assert.h>
-
-#if defined (__GNUC__) && ! defined (SEMOPS_DEFINE_INLINE)
-#define SEMOPS_DEFINE_INLINE
-#define SEMOPS_INLINE extern inline
-#else
-#define SEMOPS_INLINE
-#endif
-
-/* TODO: Lazy encoding/decoding of fp values.  */
-
-/* These don't really have a mode.  */
-#define ANDIF(x, y) ((x) && (y))
-#define ORIF(x, y) ((x) || (y))
-
-#define SUBBI(x, y) ((x) - (y))
-#define ANDBI(x, y) ((x) & (y))
-#define ORBI(x, y) ((x) | (y))
-#define XORBI(x, y) ((x) ^ (y))
-#define NEGBI(x) (- (x))
-#define NOTBI(x) (! (BI) (x))
-#define INVBI(x) (~ (x))
-#define EQBI(x, y) ((BI) (x) == (BI) (y))
-#define NEBI(x, y) ((BI) (x) != (BI) (y))
-#define LTBI(x, y) ((BI) (x) < (BI) (y))
-#define LEBI(x, y) ((BI) (x) <= (BI) (y))
-#define GTBI(x, y) ((BI) (x) > (BI) (y))
-#define GEBI(x, y) ((BI) (x) >= (BI) (y))
-#define LTUBI(x, y) ((BI) (x) < (BI) (y))
-#define LEUBI(x, y) ((BI) (x) <= (BI) (y))
-#define GTUBI(x, y) ((BI) (x) > (BI) (y))
-#define GEUBI(x, y) ((BI) (x) >= (BI) (y))
-
-#define ADDQI(x, y) ((x) + (y))
-#define SUBQI(x, y) ((x) - (y))
-#define MULQI(x, y) ((x) * (y))
-#define DIVQI(x, y) ((QI) (x) / (QI) (y))
-#define UDIVQI(x, y) ((UQI) (x) / (UQI) (y))
-#define MODQI(x, y) ((QI) (x) % (QI) (y))
-#define UMODQI(x, y) ((UQI) (x) % (UQI) (y))
-#define SRAQI(x, y) ((QI) (x) >> (y))
-#define SRLQI(x, y) ((UQI) (x) >> (y))
-#define SLLQI(x, y) ((UQI) (x) << (y))
-extern QI RORQI (QI, int);
-extern QI ROLQI (QI, int);
-#define ANDQI(x, y) ((x) & (y))
-#define ORQI(x, y) ((x) | (y))
-#define XORQI(x, y) ((x) ^ (y))
-#define NEGQI(x) (- (x))
-#define NOTQI(x) (! (QI) (x))
-#define INVQI(x) (~ (x))
-#define ABSQI(x) ((x) < 0 ? -(x) : (x))
-#define EQQI(x, y) ((QI) (x) == (QI) (y))
-#define NEQI(x, y) ((QI) (x) != (QI) (y))
-#define LTQI(x, y) ((QI) (x) < (QI) (y))
-#define LEQI(x, y) ((QI) (x) <= (QI) (y))
-#define GTQI(x, y) ((QI) (x) > (QI) (y))
-#define GEQI(x, y) ((QI) (x) >= (QI) (y))
-#define LTUQI(x, y) ((UQI) (x) < (UQI) (y))
-#define LEUQI(x, y) ((UQI) (x) <= (UQI) (y))
-#define GTUQI(x, y) ((UQI) (x) > (UQI) (y))
-#define GEUQI(x, y) ((UQI) (x) >= (UQI) (y))
-
-#define ADDHI(x, y) ((x) + (y))
-#define SUBHI(x, y) ((x) - (y))
-#define MULHI(x, y) ((x) * (y))
-#define DIVHI(x, y) ((HI) (x) / (HI) (y))
-#define UDIVHI(x, y) ((UHI) (x) / (UHI) (y))
-#define MODHI(x, y) ((HI) (x) % (HI) (y))
-#define UMODHI(x, y) ((UHI) (x) % (UHI) (y))
-#define SRAHI(x, y) ((HI) (x) >> (y))
-#define SRLHI(x, y) ((UHI) (x) >> (y))
-#define SLLHI(x, y) ((UHI) (x) << (y))
-extern HI RORHI (HI, int);
-extern HI ROLHI (HI, int);
-#define ANDHI(x, y) ((x) & (y))
-#define ORHI(x, y) ((x) | (y))
-#define XORHI(x, y) ((x) ^ (y))
-#define NEGHI(x) (- (x))
-#define NOTHI(x) (! (HI) (x))
-#define INVHI(x) (~ (x))
-#define ABSHI(x) ((x) < 0 ? -(x) : (x))
-#define EQHI(x, y) ((HI) (x) == (HI) (y))
-#define NEHI(x, y) ((HI) (x) != (HI) (y))
-#define LTHI(x, y) ((HI) (x) < (HI) (y))
-#define LEHI(x, y) ((HI) (x) <= (HI) (y))
-#define GTHI(x, y) ((HI) (x) > (HI) (y))
-#define GEHI(x, y) ((HI) (x) >= (HI) (y))
-#define LTUHI(x, y) ((UHI) (x) < (UHI) (y))
-#define LEUHI(x, y) ((UHI) (x) <= (UHI) (y))
-#define GTUHI(x, y) ((UHI) (x) > (UHI) (y))
-#define GEUHI(x, y) ((UHI) (x) >= (UHI) (y))
-
-#define ADDSI(x, y) ((x) + (y))
-#define SUBSI(x, y) ((x) - (y))
-#define MULSI(x, y) ((x) * (y))
-#define DIVSI(x, y) ((SI) (x) / (SI) (y))
-#define UDIVSI(x, y) ((USI) (x) / (USI) (y))
-#define MODSI(x, y) ((SI) (x) % (SI) (y))
-#define UMODSI(x, y) ((USI) (x) % (USI) (y))
-#define SRASI(x, y) ((SI) (x) >> (y))
-#define SRLSI(x, y) ((USI) (x) >> (y))
-#define SLLSI(x, y) ((USI) (x) << (y))
-extern SI RORSI (SI, int);
-extern SI ROLSI (SI, int);
-#define ANDSI(x, y) ((x) & (y))
-#define ORSI(x, y) ((x) | (y))
-#define XORSI(x, y) ((x) ^ (y))
-#define NEGSI(x) (- (x))
-#define NOTSI(x) (! (SI) (x))
-#define INVSI(x) (~ (x))
-#define ABSSI(x) ((x) < 0 ? -(x) : (x))
-#define EQSI(x, y) ((SI) (x) == (SI) (y))
-#define NESI(x, y) ((SI) (x) != (SI) (y))
-#define LTSI(x, y) ((SI) (x) < (SI) (y))
-#define LESI(x, y) ((SI) (x) <= (SI) (y))
-#define GTSI(x, y) ((SI) (x) > (SI) (y))
-#define GESI(x, y) ((SI) (x) >= (SI) (y))
-#define LTUSI(x, y) ((USI) (x) < (USI) (y))
-#define LEUSI(x, y) ((USI) (x) <= (USI) (y))
-#define GTUSI(x, y) ((USI) (x) > (USI) (y))
-#define GEUSI(x, y) ((USI) (x) >= (USI) (y))
-
-#ifdef DI_FN_SUPPORT
-extern DI ADDDI (DI, DI);
-extern DI SUBDI (DI, DI);
-extern DI MULDI (DI, DI);
-extern DI DIVDI (DI, DI);
-extern DI UDIVDI (DI, DI);
-extern DI MODDI (DI, DI);
-extern DI UMODDI (DI, DI);
-extern DI SRADI (DI, int);
-extern UDI SRLDI (UDI, int);
-extern UDI SLLDI (UDI, int);
-extern DI RORDI (DI, int);
-extern DI ROLDI (DI, int);
-extern DI ANDDI (DI, DI);
-extern DI ORDI (DI, DI);
-extern DI XORDI (DI, DI);
-extern DI NEGDI (DI);
-extern int NOTDI (DI);
-extern DI INVDI (DI);
-extern int EQDI (DI, DI);
-extern int NEDI (DI, DI);
-extern int LTDI (DI, DI);
-extern int LEDI (DI, DI);
-extern int GTDI (DI, DI);
-extern int GEDI (DI, DI);
-extern int LTUDI (UDI, UDI);
-extern int LEUDI (UDI, UDI);
-extern int GTUDI (UDI, UDI);
-extern int GEUDI (UDI, UDI);
-#else /* ! DI_FN_SUPPORT */
-#define ADDDI(x, y) ((x) + (y))
-#define SUBDI(x, y) ((x) - (y))
-#define MULDI(x, y) ((x) * (y))
-#define DIVDI(x, y) ((DI) (x) / (DI) (y))
-#define UDIVDI(x, y) ((UDI) (x) / (UDI) (y))
-#define MODDI(x, y) ((DI) (x) % (DI) (y))
-#define UMODDI(x, y) ((UDI) (x) % (UDI) (y))
-#define SRADI(x, y) ((DI) (x) >> (y))
-#define SRLDI(x, y) ((UDI) (x) >> (y))
-#define SLLDI(x, y) ((UDI) (x) << (y))
-extern DI RORDI (DI, int);
-extern DI ROLDI (DI, int);
-#define ANDDI(x, y) ((x) & (y))
-#define ORDI(x, y) ((x) | (y))
-#define XORDI(x, y) ((x) ^ (y))
-#define NEGDI(x) (- (x))
-#define NOTDI(x) (! (DI) (x))
-#define INVDI(x) (~ (x))
-#define ABSDI(x) ((x) < 0 ? -(x) : (x))
-#define EQDI(x, y) ((DI) (x) == (DI) (y))
-#define NEDI(x, y) ((DI) (x) != (DI) (y))
-#define LTDI(x, y) ((DI) (x) < (DI) (y))
-#define LEDI(x, y) ((DI) (x) <= (DI) (y))
-#define GTDI(x, y) ((DI) (x) > (DI) (y))
-#define GEDI(x, y) ((DI) (x) >= (DI) (y))
-#define LTUDI(x, y) ((UDI) (x) < (UDI) (y))
-#define LEUDI(x, y) ((UDI) (x) <= (UDI) (y))
-#define GTUDI(x, y) ((UDI) (x) > (UDI) (y))
-#define GEUDI(x, y) ((UDI) (x) >= (UDI) (y))
-#endif /* DI_FN_SUPPORT */
-
-#define EXTBIQI(x) ((QI) (BI) (x))
-#define EXTBIHI(x) ((HI) (BI) (x))
-#define EXTBISI(x) ((SI) (BI) (x))
-#if defined (DI_FN_SUPPORT)
-extern DI EXTBIDI (BI);
-#else
-#define EXTBIDI(x) ((DI) (BI) (x))
-#endif
-#define EXTQIHI(x) ((HI) (QI) (x))
-#define EXTQISI(x) ((SI) (QI) (x))
-#if defined (DI_FN_SUPPORT)
-extern DI EXTQIDI (QI);
-#else
-#define EXTQIDI(x) ((DI) (QI) (x))
-#endif
-#define EXTHIHI(x) ((HI) (HI) (x))
-#define EXTHISI(x) ((SI) (HI) (x))
-#define EXTSISI(x) ((SI) (SI) (x))
-#if defined (DI_FN_SUPPORT)
-extern DI EXTHIDI (HI);
-#else
-#define EXTHIDI(x) ((DI) (HI) (x))
-#endif
-#if defined (DI_FN_SUPPORT)
-extern DI EXTSIDI (SI);
-#else
-#define EXTSIDI(x) ((DI) (SI) (x))
-#endif
-
-#define ZEXTBIQI(x) ((QI) (BI) (x))
-#define ZEXTBIHI(x) ((HI) (BI) (x))
-#define ZEXTBISI(x) ((SI) (BI) (x))
-#if defined (DI_FN_SUPPORT)
-extern DI ZEXTBIDI (BI);
-#else
-#define ZEXTBIDI(x) ((DI) (BI) (x))
-#endif
-#define ZEXTQIHI(x) ((HI) (UQI) (x))
-#define ZEXTQISI(x) ((SI) (UQI) (x))
-#if defined (DI_FN_SUPPORT)
-extern DI ZEXTQIDI (QI);
-#else
-#define ZEXTQIDI(x) ((DI) (UQI) (x))
-#endif
-#define ZEXTHISI(x) ((SI) (UHI) (x))
-#define ZEXTHIHI(x) ((HI) (UHI) (x))
-#define ZEXTSISI(x) ((SI) (USI) (x))
-#if defined (DI_FN_SUPPORT)
-extern DI ZEXTHIDI (HI);
-#else
-#define ZEXTHIDI(x) ((DI) (UHI) (x))
-#endif
-#if defined (DI_FN_SUPPORT)
-extern DI ZEXTSIDI (SI);
-#else
-#define ZEXTSIDI(x) ((DI) (USI) (x))
-#endif
-
-#define TRUNCQIBI(x) ((BI) (QI) (x))
-#define TRUNCHIBI(x) ((BI) (HI) (x))
-#define TRUNCHIQI(x) ((QI) (HI) (x))
-#define TRUNCSIBI(x) ((BI) (SI) (x))
-#define TRUNCSIQI(x) ((QI) (SI) (x))
-#define TRUNCSIHI(x) ((HI) (SI) (x))
-#define TRUNCSISI(x) ((SI) (SI) (x))
-#if defined (DI_FN_SUPPORT)
-extern BI TRUNCDIBI (DI);
-#else
-#define TRUNCDIBI(x) ((BI) (DI) (x))
-#endif
-#if defined (DI_FN_SUPPORT)
-extern QI TRUNCDIQI (DI);
-#else
-#define TRUNCDIQI(x) ((QI) (DI) (x))
-#endif
-#if defined (DI_FN_SUPPORT)
-extern HI TRUNCDIHI (DI);
-#else
-#define TRUNCDIHI(x) ((HI) (DI) (x))
-#endif
-#if defined (DI_FN_SUPPORT)
-extern SI TRUNCDISI (DI);
-#else
-#define TRUNCDISI(x) ((SI) (DI) (x))
-#endif
-
-/* Composing/decomposing the various types.
-   Word ordering is endian-independent.  Words are specified most to least
-   significant and word number 0 is the most significant word.
-   ??? May also wish an endian-dependent version.  Later.  */
-
-QI SUBWORDSIQI (SI, int);
-HI SUBWORDSIHI (SI, int);
-SI SUBWORDSFSI (SF);
-SF SUBWORDSISF (SI);
-DI SUBWORDDFDI (DF);
-DF SUBWORDDIDF (DI);
-QI SUBWORDDIQI (DI, int);
-HI SUBWORDDIHI (DI, int);
-SI SUBWORDDISI (DI, int);
-SI SUBWORDDFSI (DF, int);
-SI SUBWORDXFSI (XF, int);
-SI SUBWORDTFSI (TF, int);
-
-UQI SUBWORDSIUQI (SI, int);
-UQI SUBWORDDIUQI (DI, int);
-
-#ifdef SEMOPS_DEFINE_INLINE
-
-SEMOPS_INLINE SF
-SUBWORDSISF (SI in)
-{
-  union { SI in; SF out; } x;
-  x.in = in;
-  return x.out;
-}
-
-SEMOPS_INLINE DF
-SUBWORDDIDF (DI in)
-{
-  union { DI in; DF out; } x;
-  x.in = in;
-  return x.out;
-}
-
-SEMOPS_INLINE QI
-SUBWORDSIQI (SI in, int byte)
-{
-  assert (byte >= 0 && byte <= 3);
-  return (UQI) (in >> (8 * (3 - byte))) & 0xFF;
-}
-
-SEMOPS_INLINE UQI
-SUBWORDSIUQI (SI in, int byte)
-{
-  assert (byte >= 0 && byte <= 3);
-  return (UQI) (in >> (8 * (3 - byte))) & 0xFF;
-}
-
-SEMOPS_INLINE QI
-SUBWORDDIQI (DI in, int byte)
-{
-  assert (byte >= 0 && byte <= 7);
-  return (UQI) (in >> (8 * (7 - byte))) & 0xFF;
-}
-
-SEMOPS_INLINE HI
-SUBWORDDIHI (DI in, int word)
-{
-  assert (word >= 0 && word <= 3);
-  return (UHI) (in >> (16 * (3 - word))) & 0xFFFF;
-}
-
-SEMOPS_INLINE HI
-SUBWORDSIHI (SI in, int word)
-{
-  if (word == 0)
-    return (USI) in >> 16;
-  else
-    return in;
-}
-
-SEMOPS_INLINE SI
-SUBWORDSFSI (SF in)
-{
-  union { SF in; SI out; } x;
-  x.in = in;
-  return x.out;
-}
-
-SEMOPS_INLINE DI
-SUBWORDDFDI (DF in)
-{
-  union { DF in; DI out; } x;
-  x.in = in;
-  return x.out;
-}
-
-SEMOPS_INLINE UQI
-SUBWORDDIUQI (DI in, int byte)
-{
-  assert (byte >= 0 && byte <= 7);
-  return (UQI) (in >> (8 * (7 - byte)));
-}
-
-SEMOPS_INLINE SI
-SUBWORDDISI (DI in, int word)
-{
-  if (word == 0)
-    return (UDI) in >> 32;
-  else
-    return in;
-}
-
-SEMOPS_INLINE SI
-SUBWORDDFSI (DF in, int word)
-{
-  /* Note: typedef UDI DF; */
-  if (word == 0)
-    return (UDI) in >> 32;
-  else
-    return in;
-}
-
-SEMOPS_INLINE SI
-SUBWORDXFSI (XF in, int word)
-{
-  /* Note: typedef struct { SI parts[3]; } XF; */
-  union { XF in; SI out[3]; } x;
-  x.in = in;
-  return x.out[word];
-}
-
-SEMOPS_INLINE SI
-SUBWORDTFSI (TF in, int word)
-{
-  /* Note: typedef struct { SI parts[4]; } TF; */
-  union { TF in; SI out[4]; } x;
-  x.in = in;
-  return x.out[word];
-}
-
-#endif /* SUBWORD,JOIN */
-
-#endif /* CGEN_SEM_OPS_H */
Index: opcodes/cgen-types.h
===================================================================
RCS file: opcodes/cgen-types.h
diff -N opcodes/cgen-types.h
--- opcodes/cgen-types.h 5 Jul 2007 09:49:00 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,42 +0,0 @@
-/* Type definitions for CGEN-based opcode libraries.
-   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
-   Contributed by Red Hat.
-
-   This file is part of the GNU opcodes library.
-
-   This library 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 3, or (at your option)
-   any later version.
-
-   It 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 this program; if not, write to the Free Software Foundation, Inc.,
-   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-#ifndef CGEN_TYPES_H
-#define CGEN_TYPES_H
-
-#include "../bfd/bfd_stdint.h"
-
-typedef  int8_t   QI;
-typedef uint8_t  UQI;
-typedef  int16_t  HI;
-typedef uint16_t UHI;
-typedef  int32_t  SI;
-typedef uint32_t USI;
-typedef  int64_t  DI;
-typedef uint64_t UDI;
-
-typedef int INT;
-typedef unsigned int UINT;
-
-typedef float SF;
-typedef double DF;
-typedef long double XF, TF;
-
-#endif /* CGEN_TYPES_H */
Index: include/cgen/basic-modes.h
===================================================================
--- /dev/null 2009-10-13 12:23:38.535009930 -0700
+++ include/cgen/basic-modes.h 2009-10-19 09:12:08.000000000 -0700
@@ -0,0 +1,42 @@
+/* Basic CGEN modes.
+   Copyright 2005, 2007, 2009 Free Software Foundation, Inc.
+   Contributed by Red Hat.
+
+   This file is part of the GNU opcodes library.
+
+   This library 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 3, or (at your option)
+   any later version.
+
+   It 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 this library; see the file COPYING3.  If not, write to the
+   Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
+
+#ifndef CGEN_BASIC_MODES_H
+#define CGEN_BASIC_MODES_H
+
+#include "bfd_stdint.h"
+
+typedef int8_t QI;
+typedef uint8_t UQI;
+
+typedef int16_t HI;
+typedef uint16_t UHI;
+
+typedef int32_t SI;
+typedef uint32_t USI;
+
+typedef int64_t DI;
+typedef uint64_t UDI;
+
+typedef int INT;
+typedef unsigned int UINT;
+
+#endif /* CGEN_BASIC_MODES_H */
Index: include/cgen/basic-ops.h
===================================================================
--- /dev/null 2009-10-13 12:23:38.535009930 -0700
+++ include/cgen/basic-ops.h 2009-10-19 09:12:37.000000000 -0700
@@ -0,0 +1,347 @@
+/* Basic semantics ops support for CGEN.
+   Copyright 2005, 2007, 2009 Free Software Foundation, Inc.
+   Contributed by Red Hat.
+
+   This file is part of the GNU opcodes library.
+
+   This library 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 3, or (at your option)
+   any later version.
+
+   It 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 this library; see the file COPYING3.  If not, write to the
+   Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
+
+#ifndef CGEN_BASIC_OPS_H
+#define CGEN_BASIC_OPS_H
+
+#include <assert.h>
+
+#if defined (__GNUC__) && ! defined (SEMOPS_DEFINE_INLINE)
+#define SEMOPS_DEFINE_INLINE
+#define SEMOPS_INLINE extern inline
+#else
+#define SEMOPS_INLINE
+#endif
+
+/* These don't really have a mode.  */
+#define ANDIF(x, y) ((x) && (y))
+#define ORIF(x, y) ((x) || (y))
+
+#define SUBBI(x, y) ((x) - (y))
+#define ANDBI(x, y) ((x) & (y))
+#define ORBI(x, y) ((x) | (y))
+#define XORBI(x, y) ((x) ^ (y))
+#define NEGBI(x) (- (x))
+#define NOTBI(x) (! (BI) (x))
+#define INVBI(x) (~ (x))
+#define EQBI(x, y) ((BI) (x) == (BI) (y))
+#define NEBI(x, y) ((BI) (x) != (BI) (y))
+#define LTBI(x, y) ((BI) (x) < (BI) (y))
+#define LEBI(x, y) ((BI) (x) <= (BI) (y))
+#define GTBI(x, y) ((BI) (x) > (BI) (y))
+#define GEBI(x, y) ((BI) (x) >= (BI) (y))
+#define LTUBI(x, y) ((BI) (x) < (BI) (y))
+#define LEUBI(x, y) ((BI) (x) <= (BI) (y))
+#define GTUBI(x, y) ((BI) (x) > (BI) (y))
+#define GEUBI(x, y) ((BI) (x) >= (BI) (y))
+
+#define ADDQI(x, y) ((x) + (y))
+#define SUBQI(x, y) ((x) - (y))
+#define MULQI(x, y) ((x) * (y))
+#define DIVQI(x, y) ((QI) (x) / (QI) (y))
+#define UDIVQI(x, y) ((UQI) (x) / (UQI) (y))
+#define MODQI(x, y) ((QI) (x) % (QI) (y))
+#define UMODQI(x, y) ((UQI) (x) % (UQI) (y))
+#define SRAQI(x, y) ((QI) (x) >> (y))
+#define SRLQI(x, y) ((UQI) (x) >> (y))
+#define SLLQI(x, y) ((UQI) (x) << (y))
+extern QI RORQI (QI, int);
+extern QI ROLQI (QI, int);
+#define ANDQI(x, y) ((x) & (y))
+#define ORQI(x, y) ((x) | (y))
+#define XORQI(x, y) ((x) ^ (y))
+#define NEGQI(x) (- (x))
+#define NOTQI(x) (! (QI) (x))
+#define INVQI(x) (~ (x))
+#define ABSQI(x) ((x) < 0 ? -(x) : (x))
+#define EQQI(x, y) ((QI) (x) == (QI) (y))
+#define NEQI(x, y) ((QI) (x) != (QI) (y))
+#define LTQI(x, y) ((QI) (x) < (QI) (y))
+#define LEQI(x, y) ((QI) (x) <= (QI) (y))
+#define GTQI(x, y) ((QI) (x) > (QI) (y))
+#define GEQI(x, y) ((QI) (x) >= (QI) (y))
+#define LTUQI(x, y) ((UQI) (x) < (UQI) (y))
+#define LEUQI(x, y) ((UQI) (x) <= (UQI) (y))
+#define GTUQI(x, y) ((UQI) (x) > (UQI) (y))
+#define GEUQI(x, y) ((UQI) (x) >= (UQI) (y))
+
+#define ADDHI(x, y) ((x) + (y))
+#define SUBHI(x, y) ((x) - (y))
+#define MULHI(x, y) ((x) * (y))
+#define DIVHI(x, y) ((HI) (x) / (HI) (y))
+#define UDIVHI(x, y) ((UHI) (x) / (UHI) (y))
+#define MODHI(x, y) ((HI) (x) % (HI) (y))
+#define UMODHI(x, y) ((UHI) (x) % (UHI) (y))
+#define SRAHI(x, y) ((HI) (x) >> (y))
+#define SRLHI(x, y) ((UHI) (x) >> (y))
+#define SLLHI(x, y) ((UHI) (x) << (y))
+extern HI RORHI (HI, int);
+extern HI ROLHI (HI, int);
+#define ANDHI(x, y) ((x) & (y))
+#define ORHI(x, y) ((x) | (y))
+#define XORHI(x, y) ((x) ^ (y))
+#define NEGHI(x) (- (x))
+#define NOTHI(x) (! (HI) (x))
+#define INVHI(x) (~ (x))
+#define ABSHI(x) ((x) < 0 ? -(x) : (x))
+#define EQHI(x, y) ((HI) (x) == (HI) (y))
+#define NEHI(x, y) ((HI) (x) != (HI) (y))
+#define LTHI(x, y) ((HI) (x) < (HI) (y))
+#define LEHI(x, y) ((HI) (x) <= (HI) (y))
+#define GTHI(x, y) ((HI) (x) > (HI) (y))
+#define GEHI(x, y) ((HI) (x) >= (HI) (y))
+#define LTUHI(x, y) ((UHI) (x) < (UHI) (y))
+#define LEUHI(x, y) ((UHI) (x) <= (UHI) (y))
+#define GTUHI(x, y) ((UHI) (x) > (UHI) (y))
+#define GEUHI(x, y) ((UHI) (x) >= (UHI) (y))
+
+#define ADDSI(x, y) ((x) + (y))
+#define SUBSI(x, y) ((x) - (y))
+#define MULSI(x, y) ((x) * (y))
+#define DIVSI(x, y) ((SI) (x) / (SI) (y))
+#define UDIVSI(x, y) ((USI) (x) / (USI) (y))
+#define MODSI(x, y) ((SI) (x) % (SI) (y))
+#define UMODSI(x, y) ((USI) (x) % (USI) (y))
+#define SRASI(x, y) ((SI) (x) >> (y))
+#define SRLSI(x, y) ((USI) (x) >> (y))
+#define SLLSI(x, y) ((USI) (x) << (y))
+extern SI RORSI (SI, int);
+extern SI ROLSI (SI, int);
+#define ANDSI(x, y) ((x) & (y))
+#define ORSI(x, y) ((x) | (y))
+#define XORSI(x, y) ((x) ^ (y))
+#define NEGSI(x) (- (x))
+#define NOTSI(x) (! (SI) (x))
+#define INVSI(x) (~ (x))
+#define ABSSI(x) ((x) < 0 ? -(x) : (x))
+#define EQSI(x, y) ((SI) (x) == (SI) (y))
+#define NESI(x, y) ((SI) (x) != (SI) (y))
+#define LTSI(x, y) ((SI) (x) < (SI) (y))
+#define LESI(x, y) ((SI) (x) <= (SI) (y))
+#define GTSI(x, y) ((SI) (x) > (SI) (y))
+#define GESI(x, y) ((SI) (x) >= (SI) (y))
+#define LTUSI(x, y) ((USI) (x) < (USI) (y))
+#define LEUSI(x, y) ((USI) (x) <= (USI) (y))
+#define GTUSI(x, y) ((USI) (x) > (USI) (y))
+#define GEUSI(x, y) ((USI) (x) >= (USI) (y))
+
+#ifdef DI_FN_SUPPORT
+extern DI ADDDI (DI, DI);
+extern DI SUBDI (DI, DI);
+extern DI MULDI (DI, DI);
+extern DI DIVDI (DI, DI);
+extern DI UDIVDI (DI, DI);
+extern DI MODDI (DI, DI);
+extern DI UMODDI (DI, DI);
+extern DI SRADI (DI, int);
+extern UDI SRLDI (UDI, int);
+extern UDI SLLDI (UDI, int);
+extern DI RORDI (DI, int);
+extern DI ROLDI (DI, int);
+extern DI ANDDI (DI, DI);
+extern DI ORDI (DI, DI);
+extern DI XORDI (DI, DI);
+extern DI NEGDI (DI);
+extern int NOTDI (DI);
+extern DI INVDI (DI);
+extern int EQDI (DI, DI);
+extern int NEDI (DI, DI);
+extern int LTDI (DI, DI);
+extern int LEDI (DI, DI);
+extern int GTDI (DI, DI);
+extern int GEDI (DI, DI);
+extern int LTUDI (UDI, UDI);
+extern int LEUDI (UDI, UDI);
+extern int GTUDI (UDI, UDI);
+extern int GEUDI (UDI, UDI);
+#else /* ! DI_FN_SUPPORT */
+#define ADDDI(x, y) ((x) + (y))
+#define SUBDI(x, y) ((x) - (y))
+#define MULDI(x, y) ((x) * (y))
+#define DIVDI(x, y) ((DI) (x) / (DI) (y))
+#define UDIVDI(x, y) ((UDI) (x) / (UDI) (y))
+#define MODDI(x, y) ((DI) (x) % (DI) (y))
+#define UMODDI(x, y) ((UDI) (x) % (UDI) (y))
+#define SRADI(x, y) ((DI) (x) >> (y))
+#define SRLDI(x, y) ((UDI) (x) >> (y))
+#define SLLDI(x, y) ((UDI) (x) << (y))
+extern DI RORDI (DI, int);
+extern DI ROLDI (DI, int);
+#define ANDDI(x, y) ((x) & (y))
+#define ORDI(x, y) ((x) | (y))
+#define XORDI(x, y) ((x) ^ (y))
+#define NEGDI(x) (- (x))
+#define NOTDI(x) (! (DI) (x))
+#define INVDI(x) (~ (x))
+#define ABSDI(x) ((x) < 0 ? -(x) : (x))
+#define EQDI(x, y) ((DI) (x) == (DI) (y))
+#define NEDI(x, y) ((DI) (x) != (DI) (y))
+#define LTDI(x, y) ((DI) (x) < (DI) (y))
+#define LEDI(x, y) ((DI) (x) <= (DI) (y))
+#define GTDI(x, y) ((DI) (x) > (DI) (y))
+#define GEDI(x, y) ((DI) (x) >= (DI) (y))
+#define LTUDI(x, y) ((UDI) (x) < (UDI) (y))
+#define LEUDI(x, y) ((UDI) (x) <= (UDI) (y))
+#define GTUDI(x, y) ((UDI) (x) > (UDI) (y))
+#define GEUDI(x, y) ((UDI) (x) >= (UDI) (y))
+#endif /* DI_FN_SUPPORT */
+
+#define EXTBIQI(x) ((QI) (BI) (x))
+#define EXTBIHI(x) ((HI) (BI) (x))
+#define EXTBISI(x) ((SI) (BI) (x))
+#if defined (DI_FN_SUPPORT)
+extern DI EXTBIDI (BI);
+#else
+#define EXTBIDI(x) ((DI) (BI) (x))
+#endif
+#define EXTQIHI(x) ((HI) (QI) (x))
+#define EXTQISI(x) ((SI) (QI) (x))
+#if defined (DI_FN_SUPPORT)
+extern DI EXTQIDI (QI);
+#else
+#define EXTQIDI(x) ((DI) (QI) (x))
+#endif
+#define EXTHIHI(x) ((HI) (HI) (x))
+#define EXTHISI(x) ((SI) (HI) (x))
+#define EXTSISI(x) ((SI) (SI) (x))
+#if defined (DI_FN_SUPPORT)
+extern DI EXTHIDI (HI);
+#else
+#define EXTHIDI(x) ((DI) (HI) (x))
+#endif
+#if defined (DI_FN_SUPPORT)
+extern DI EXTSIDI (SI);
+#else
+#define EXTSIDI(x) ((DI) (SI) (x))
+#endif
+
+#define ZEXTBIQI(x) ((QI) (BI) (x))
+#define ZEXTBIHI(x) ((HI) (BI) (x))
+#define ZEXTBISI(x) ((SI) (BI) (x))
+#if defined (DI_FN_SUPPORT)
+extern DI ZEXTBIDI (BI);
+#else
+#define ZEXTBIDI(x) ((DI) (BI) (x))
+#endif
+#define ZEXTQIHI(x) ((HI) (UQI) (x))
+#define ZEXTQISI(x) ((SI) (UQI) (x))
+#if defined (DI_FN_SUPPORT)
+extern DI ZEXTQIDI (QI);
+#else
+#define ZEXTQIDI(x) ((DI) (UQI) (x))
+#endif
+#define ZEXTHISI(x) ((SI) (UHI) (x))
+#define ZEXTHIHI(x) ((HI) (UHI) (x))
+#define ZEXTSISI(x) ((SI) (USI) (x))
+#if defined (DI_FN_SUPPORT)
+extern DI ZEXTHIDI (HI);
+#else
+#define ZEXTHIDI(x) ((DI) (UHI) (x))
+#endif
+#if defined (DI_FN_SUPPORT)
+extern DI ZEXTSIDI (SI);
+#else
+#define ZEXTSIDI(x) ((DI) (USI) (x))
+#endif
+
+#define TRUNCQIBI(x) ((BI) (QI) (x))
+#define TRUNCHIBI(x) ((BI) (HI) (x))
+#define TRUNCHIQI(x) ((QI) (HI) (x))
+#define TRUNCSIBI(x) ((BI) (SI) (x))
+#define TRUNCSIQI(x) ((QI) (SI) (x))
+#define TRUNCSIHI(x) ((HI) (SI) (x))
+#define TRUNCSISI(x) ((SI) (SI) (x))
+#if defined (DI_FN_SUPPORT)
+extern BI TRUNCDIBI (DI);
+#else
+#define TRUNCDIBI(x) ((BI) (DI) (x))
+#endif
+#if defined (DI_FN_SUPPORT)
+extern QI TRUNCDIQI (DI);
+#else
+#define TRUNCDIQI(x) ((QI) (DI) (x))
+#endif
+#if defined (DI_FN_SUPPORT)
+extern HI TRUNCDIHI (DI);
+#else
+#define TRUNCDIHI(x) ((HI) (DI) (x))
+#endif
+#if defined (DI_FN_SUPPORT)
+extern SI TRUNCDISI (DI);
+#else
+#define TRUNCDISI(x) ((SI) (DI) (x))
+#endif
+
+/* Composing/decomposing the various types.
+   Word ordering is endian-independent.  Words are specified most to least
+   significant and word number 0 is the most significant word.
+   ??? May also wish an endian-dependent version.  Later.  */
+
+QI SUBWORDSIQI (SI, int);
+HI SUBWORDSIHI (SI, int);
+QI SUBWORDDIQI (DI, int);
+HI SUBWORDDIHI (DI, int);
+SI SUBWORDDISI (DI, int);
+
+#ifdef SEMOPS_DEFINE_INLINE
+
+SEMOPS_INLINE QI
+SUBWORDSIQI (SI in, int byte)
+{
+  assert (byte >= 0 && byte <= 3);
+  return (UQI) (in >> (8 * (3 - byte))) & 0xFF;
+}
+
+SEMOPS_INLINE HI
+SUBWORDSIHI (SI in, int word)
+{
+  if (word == 0)
+    return (USI) in >> 16;
+  else
+    return in;
+}
+
+SEMOPS_INLINE QI
+SUBWORDDIQI (DI in, int byte)
+{
+  assert (byte >= 0 && byte <= 7);
+  return (UQI) (in >> (8 * (7 - byte))) & 0xFF;
+}
+
+SEMOPS_INLINE HI
+SUBWORDDIHI (DI in, int word)
+{
+  assert (word >= 0 && word <= 3);
+  return (UHI) (in >> (16 * (3 - word))) & 0xFFFF;
+}
+
+SEMOPS_INLINE SI
+SUBWORDDISI (DI in, int word)
+{
+  if (word == 0)
+    return (UDI) in >> 32;
+  else
+    return in;
+}
+
+#endif /* SUBWORD,JOIN */
+
+#endif /* CGEN_BASIC_OPS_H */
Index: include/cgen/bitset.h
===================================================================
--- /dev/null 2009-10-13 12:23:38.535009930 -0700
+++ include/cgen/bitset.h 2009-10-19 09:12:58.000000000 -0700
@@ -0,0 +1,56 @@
+/* Header file the type CGEN_BITSET.
+   Copyright 2002, 2005, 2009 Free Software Foundation, Inc.
+
+   This file is part of the GNU opcodes library.
+
+   This library 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 3, or (at your option)
+   any later version.
+
+   It 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 this library; see the file COPYING3.  If not, write to the
+   Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
+
+#ifndef CGEN_BITSET_H
+#define CGEN_BITSET_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* A bitmask represented as a string.
+   Each member of the set is represented as a bit
+   in the string. Bytes are indexed from left to right in the string and
+   bits from most significant to least within each byte.
+
+   For example, the bit representing member number 6 is (set->bits[0] & 0x02).
+*/
+typedef struct cgen_bitset
+{
+  unsigned length;
+  char *bits;
+} CGEN_BITSET;
+
+extern CGEN_BITSET *cgen_bitset_create PARAMS ((unsigned));
+extern void cgen_bitset_init PARAMS ((CGEN_BITSET *, unsigned));
+extern void cgen_bitset_clear PARAMS ((CGEN_BITSET *));
+extern void cgen_bitset_add PARAMS ((CGEN_BITSET *, unsigned));
+extern void cgen_bitset_set PARAMS ((CGEN_BITSET *, unsigned));
+extern int cgen_bitset_compare PARAMS ((CGEN_BITSET *, CGEN_BITSET *));
+extern void cgen_bitset_union PARAMS ((CGEN_BITSET *, CGEN_BITSET *, CGEN_BITSET *));
+extern int cgen_bitset_intersect_p PARAMS ((CGEN_BITSET *, CGEN_BITSET *));
+extern int cgen_bitset_contains PARAMS ((CGEN_BITSET *, unsigned));
+extern CGEN_BITSET *cgen_bitset_copy PARAMS ((CGEN_BITSET *));
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif
Index: opcodes/fr30-desc.h
===================================================================
RCS file: /cvs/src/src/opcodes/fr30-desc.h,v
retrieving revision 1.18
diff -u -p -r1.18 fr30-desc.h
--- opcodes/fr30-desc.h 10 Jul 2009 14:20:38 -0000 1.18
+++ opcodes/fr30-desc.h 19 Oct 2009 16:17:06 -0000
@@ -25,8 +25,6 @@ This file is part of the GNU Binutils an
 #ifndef FR30_CPU_H
 #define FR30_CPU_H
 
-#include "opcode/cgen-bitset.h"
-
 #define CGEN_ARCH fr30
 
 /* Given symbol S, return fr30_cgen_<S>.  */
Index: opcodes/frv-desc.h
===================================================================
RCS file: /cvs/src/src/opcodes/frv-desc.h,v
retrieving revision 1.17
diff -u -p -r1.17 frv-desc.h
--- opcodes/frv-desc.h 10 Jul 2009 14:20:38 -0000 1.17
+++ opcodes/frv-desc.h 19 Oct 2009 16:17:06 -0000
@@ -25,8 +25,6 @@ This file is part of the GNU Binutils an
 #ifndef FRV_CPU_H
 #define FRV_CPU_H
 
-#include "opcode/cgen-bitset.h"
-
 #define CGEN_ARCH frv
 
 /* Given symbol S, return frv_cgen_<S>.  */
Index: opcodes/ip2k-desc.h
===================================================================
RCS file: /cvs/src/src/opcodes/ip2k-desc.h,v
retrieving revision 1.9
diff -u -p -r1.9 ip2k-desc.h
--- opcodes/ip2k-desc.h 10 Jul 2009 14:20:38 -0000 1.9
+++ opcodes/ip2k-desc.h 19 Oct 2009 16:17:06 -0000
@@ -25,8 +25,6 @@ This file is part of the GNU Binutils an
 #ifndef IP2K_CPU_H
 #define IP2K_CPU_H
 
-#include "opcode/cgen-bitset.h"
-
 #define CGEN_ARCH ip2k
 
 /* Given symbol S, return ip2k_cgen_<S>.  */
Index: opcodes/iq2000-desc.h
===================================================================
RCS file: /cvs/src/src/opcodes/iq2000-desc.h,v
retrieving revision 1.9
diff -u -p -r1.9 iq2000-desc.h
--- opcodes/iq2000-desc.h 10 Jul 2009 14:20:38 -0000 1.9
+++ opcodes/iq2000-desc.h 19 Oct 2009 16:17:06 -0000
@@ -25,8 +25,6 @@ This file is part of the GNU Binutils an
 #ifndef IQ2000_CPU_H
 #define IQ2000_CPU_H
 
-#include "opcode/cgen-bitset.h"
-
 #define CGEN_ARCH iq2000
 
 /* Given symbol S, return iq2000_cgen_<S>.  */
Index: opcodes/lm32-desc.h
===================================================================
RCS file: /cvs/src/src/opcodes/lm32-desc.h,v
retrieving revision 1.2
diff -u -p -r1.2 lm32-desc.h
--- opcodes/lm32-desc.h 10 Jul 2009 14:20:38 -0000 1.2
+++ opcodes/lm32-desc.h 19 Oct 2009 16:17:06 -0000
@@ -25,8 +25,6 @@ This file is part of the GNU Binutils an
 #ifndef LM32_CPU_H
 #define LM32_CPU_H
 
-#include "opcode/cgen-bitset.h"
-
 #define CGEN_ARCH lm32
 
 /* Given symbol S, return lm32_cgen_<S>.  */
Index: opcodes/m32c-desc.h
===================================================================
RCS file: /cvs/src/src/opcodes/m32c-desc.h,v
retrieving revision 1.12
diff -u -p -r1.12 m32c-desc.h
--- opcodes/m32c-desc.h 10 Jul 2009 14:20:39 -0000 1.12
+++ opcodes/m32c-desc.h 19 Oct 2009 16:17:06 -0000
@@ -25,8 +25,6 @@ This file is part of the GNU Binutils an
 #ifndef M32C_CPU_H
 #define M32C_CPU_H
 
-#include "opcode/cgen-bitset.h"
-
 #define CGEN_ARCH m32c
 
 /* Given symbol S, return m32c_cgen_<S>.  */
Index: opcodes/m32c-opc.h
===================================================================
RCS file: /cvs/src/src/opcodes/m32c-opc.h,v
retrieving revision 1.14
diff -u -p -r1.14 m32c-opc.h
--- opcodes/m32c-opc.h 10 Jul 2009 14:20:39 -0000 1.14
+++ opcodes/m32c-opc.h 19 Oct 2009 16:17:09 -0000
@@ -28,8 +28,8 @@ This file is part of the GNU Binutils an
 /* -- opc.h */
 
 /* Needed for RTL's 'ext' and 'trunc' operators.  */
-#include "cgen-types.h"
-#include "cgen-ops.h"
+#include "cgen/basic-modes.h"
+#include "cgen/basic-ops.h"
 
 /* We can't use the default hash size because many bits are used by
    operands.  */
Index: opcodes/m32r-desc.h
===================================================================
RCS file: /cvs/src/src/opcodes/m32r-desc.h,v
retrieving revision 1.20
diff -u -p -r1.20 m32r-desc.h
--- opcodes/m32r-desc.h 10 Jul 2009 14:20:40 -0000 1.20
+++ opcodes/m32r-desc.h 19 Oct 2009 16:17:09 -0000
@@ -25,8 +25,6 @@ This file is part of the GNU Binutils an
 #ifndef M32R_CPU_H
 #define M32R_CPU_H
 
-#include "opcode/cgen-bitset.h"
-
 #define CGEN_ARCH m32r
 
 /* Given symbol S, return m32r_cgen_<S>.  */
Index: opcodes/mep-desc.h
===================================================================
RCS file: /cvs/src/src/opcodes/mep-desc.h,v
retrieving revision 1.9
diff -u -p -r1.9 mep-desc.h
--- opcodes/mep-desc.h 7 Jul 2009 01:56:05 -0000 1.9
+++ opcodes/mep-desc.h 19 Oct 2009 16:17:09 -0000
@@ -25,8 +25,6 @@ This file is part of the GNU Binutils an
 #ifndef MEP_CPU_H
 #define MEP_CPU_H
 
-#include "opcode/cgen-bitset.h"
-
 #define CGEN_ARCH mep
 
 /* Given symbol S, return mep_cgen_<S>.  */
Index: opcodes/mt-desc.h
===================================================================
RCS file: /cvs/src/src/opcodes/mt-desc.h,v
retrieving revision 1.3
diff -u -p -r1.3 mt-desc.h
--- opcodes/mt-desc.h 10 Jul 2009 14:20:40 -0000 1.3
+++ opcodes/mt-desc.h 19 Oct 2009 16:17:09 -0000
@@ -25,8 +25,6 @@ This file is part of the GNU Binutils an
 #ifndef MT_CPU_H
 #define MT_CPU_H
 
-#include "opcode/cgen-bitset.h"
-
 #define CGEN_ARCH mt
 
 /* Given symbol S, return mt_cgen_<S>.  */
Index: opcodes/openrisc-desc.h
===================================================================
RCS file: /cvs/src/src/opcodes/openrisc-desc.h,v
retrieving revision 1.10
diff -u -p -r1.10 openrisc-desc.h
--- opcodes/openrisc-desc.h 10 Jul 2009 14:20:40 -0000 1.10
+++ opcodes/openrisc-desc.h 19 Oct 2009 16:17:09 -0000
@@ -25,8 +25,6 @@ This file is part of the GNU Binutils an
 #ifndef OPENRISC_CPU_H
 #define OPENRISC_CPU_H
 
-#include "opcode/cgen-bitset.h"
-
 #define CGEN_ARCH openrisc
 
 /* Given symbol S, return openrisc_cgen_<S>.  */
Index: opcodes/xc16x-desc.h
===================================================================
RCS file: /cvs/src/src/opcodes/xc16x-desc.h,v
retrieving revision 1.4
diff -u -p -r1.4 xc16x-desc.h
--- opcodes/xc16x-desc.h 19 Oct 2009 05:09:44 -0000 1.4
+++ opcodes/xc16x-desc.h 19 Oct 2009 16:17:09 -0000
@@ -25,8 +25,6 @@ This file is part of the GNU Binutils an
 #ifndef XC16X_CPU_H
 #define XC16X_CPU_H
 
-#include "opcode/cgen-bitset.h"
-
 #define CGEN_ARCH xc16x
 
 /* Given symbol S, return xc16x_cgen_<S>.  */
Index: opcodes/xstormy16-desc.h
===================================================================
RCS file: /cvs/src/src/opcodes/xstormy16-desc.h,v
retrieving revision 1.10
diff -u -p -r1.10 xstormy16-desc.h
--- opcodes/xstormy16-desc.h 10 Jul 2009 14:20:41 -0000 1.10
+++ opcodes/xstormy16-desc.h 19 Oct 2009 16:17:09 -0000
@@ -25,8 +25,6 @@ This file is part of the GNU Binutils an
 #ifndef XSTORMY16_CPU_H
 #define XSTORMY16_CPU_H
 
-#include "opcode/cgen-bitset.h"
-
 #define CGEN_ARCH xstormy16
 
 /* Given symbol S, return xstormy16_cgen_<S>.  */



Reply | Threaded
Open this post in threaded view
|

[obv] Fixup cgen path for gdb/mep-tdep.c [Re: [patch] create include/cgen]

Jan Kratochvil-2
Hi Doug,

checked in as obvious this fixup as a new checkout of GDB was now with
--enable-targets=all failing to build:
        mep-tdep.c:49:32: error: opcode/cgen-bitset.h: No such file or directory

Followed the update as seen at:
        http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/opcodes/cgen-bitset.c.diff?cvsroot=src&r1=1.2&r2=1.3


Regards,
Jan


http://sourceware.org/ml/gdb-cvs/2009-10/msg00180.html

--- src/gdb/ChangeLog 2009/10/23 23:42:25 1.11001
+++ src/gdb/ChangeLog 2009/10/25 09:09:01 1.11002
@@ -1,3 +1,7 @@
+2009-10-25  Jan Kratochvil  <[hidden email]>
+
+ * mep-tdep.c: Update include for the new location cgen/bitset.h.
+
 2009-10-23  Tom Tromey  <[hidden email]>
 
  * blockframe.c (_initialize_blockframe): Remove declaration.
--- src/gdb/mep-tdep.c 2009/07/02 17:25:55 1.23
+++ src/gdb/mep-tdep.c 2009/10/25 09:09:02 1.24
@@ -46,7 +46,7 @@
 #include "elf-bfd.h"
 #include "elf/mep.h"
 #include "prologue-value.h"
-#include "opcode/cgen-bitset.h"
+#include "cgen/bitset.h"
 #include "infcall.h"
 
 #include "gdb_assert.h"
Reply | Threaded
Open this post in threaded view
|

Re: [obv] Fixup cgen path for gdb/mep-tdep.c [Re: [patch] create include/cgen]

Doug Evans-2
Jan Kratochvil wrote:
> Hi Doug,
>
> checked in as obvious this fixup as a new checkout of GDB was now with
> --enable-targets=all failing to build:
> mep-tdep.c:49:32: error: opcode/cgen-bitset.h: No such file or directory
>
>  

Thanks.  Totally missed that.