PR c++/16597
[deliverable/binutils-gdb.git] / sim / iq2000 / cpu.h
index 47ca845aa5d0baff3e739ffd2d90613958f3f4b3..0488f9d5b0b0fab25533c55690dbe7c1e822a705 100644 (file)
@@ -2,7 +2,7 @@
 
 THIS FILE IS MACHINE GENERATED WITH CGEN.
 
-Copyright 1996-2009 Free Software Foundation, Inc.
+Copyright 1996-2014 Free Software Foundation, Inc.
 
 This file is part of the GNU simulators.
 
@@ -17,8 +17,7 @@ This file is part of the GNU simulators.
    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.,
-   51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+   with this program; if not, see <http://www.gnu.org/licenses/>.
 
 */
 
@@ -32,6 +31,12 @@ This file is part of the GNU simulators.
 /* Maximum number of instructions that can be executed in parallel.  */
 #define MAX_PARALLEL_INSNS 1
 
+/* The size of an "int" needed to hold an instruction word.
+   This is usually 32 bits, but some architectures needs 64 bits.  */
+typedef CGEN_INSN_INT CGEN_INSN_WORD;
+
+#include "cgen-engine.h"
+
 /* CPU state information.  */
 typedef struct {
   /* Hardware elements.  */
@@ -78,7 +83,7 @@ typedef struct {
 union sem_fields {
   struct { /* no operands */
     int empty;
-  } fmt_empty;
+  } sfmt_empty;
   struct { /*  */
     IADDR i_jmptarg;
   } sfmt_j;
@@ -272,7 +277,7 @@ struct scache {
   f_opcode = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
   f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5); \
   f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5); \
-  f_offset = ((((EXTRACT_LSB0_INT (insn, 32, 15, 16)) << (2))) + (((pc) + (4)))); \
+  f_offset = ((((EXTRACT_LSB0_SINT (insn, 32, 15, 16)) << (2))) + (((pc) + (4)))); \
 
 #define EXTRACT_IFMT_BBV_VARS \
   UINT f_opcode; \
@@ -285,7 +290,7 @@ struct scache {
   f_opcode = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
   f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5); \
   f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5); \
-  f_offset = ((((EXTRACT_LSB0_INT (insn, 32, 15, 16)) << (2))) + (((pc) + (4)))); \
+  f_offset = ((((EXTRACT_LSB0_SINT (insn, 32, 15, 16)) << (2))) + (((pc) + (4)))); \
 
 #define EXTRACT_IFMT_BGEZ_VARS \
   UINT f_opcode; \
@@ -298,7 +303,7 @@ struct scache {
   f_opcode = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
   f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5); \
   f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5); \
-  f_offset = ((((EXTRACT_LSB0_INT (insn, 32, 15, 16)) << (2))) + (((pc) + (4)))); \
+  f_offset = ((((EXTRACT_LSB0_SINT (insn, 32, 15, 16)) << (2))) + (((pc) + (4)))); \
 
 #define EXTRACT_IFMT_JALR_VARS \
   UINT f_opcode; \
@@ -431,7 +436,7 @@ struct scache {
   f_opcode = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
   f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5); \
   f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5); \
-  f_offset = ((((EXTRACT_LSB0_INT (insn, 32, 15, 16)) << (2))) + (((pc) + (4)))); \
+  f_offset = ((((EXTRACT_LSB0_SINT (insn, 32, 15, 16)) << (2))) + (((pc) + (4)))); \
 
 #define EXTRACT_IFMT_CFC0_VARS \
   UINT f_opcode; \
This page took 0.024816 seconds and 4 git commands to generate.