X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Fcris%2Fcpuv10.h;h=e137eecda7adebfa5c816e4210c4456daed1b903;hb=c88960d081f0b37ec03c66a13115e2a68e40d1ad;hp=fda43c7ac6513bf2a48fcd5ffe40f0cb62107325;hpb=f6bcefefe817b20b493081511cdeb8f87052bd41;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/cris/cpuv10.h b/sim/cris/cpuv10.h index fda43c7ac6..e137eecda7 100644 --- a/sim/cris/cpuv10.h +++ b/sim/cris/cpuv10.h @@ -2,23 +2,22 @@ THIS FILE IS MACHINE GENERATED WITH CGEN. -Copyright 1996-2004 Free Software Foundation, Inc. +Copyright 1996-2016 Free Software Foundation, Inc. This file is part of the GNU simulators. -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, or (at your option) -any later version. + This file 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. -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. + 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. + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ @@ -32,6 +31,12 @@ with this program; if not, write to the Free Software Foundation, Inc., /* 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. */ @@ -278,7 +283,7 @@ typedef struct { union sem_fields { struct { /* no operands */ int empty; - } fmt_empty; + } sfmt_empty; struct { /* */ UINT f_u4; } sfmt_break; @@ -293,6 +298,11 @@ union sem_fields { IADDR i_o_pcrel; UINT f_operand2; } sfmt_bcc_b; + struct { /* */ + UINT f_memmode; + unsigned char in_h_gr_SI_14; + unsigned char out_h_gr_SI_14; + } sfmt_move_m_spplus_p8; struct { /* */ INT f_s8; UINT f_operand2; @@ -302,17 +312,12 @@ union sem_fields { INT f_indir_pc__dword; UINT f_operand2; unsigned char out_Pd; - } sfmt_move_c_sprv10_p8; + } sfmt_move_c_sprv10_p9; struct { /* */ INT f_indir_pc__word; UINT f_operand2; unsigned char out_Pd; - } sfmt_move_c_sprv10_p4; - struct { /* */ - INT f_indir_pc__byte; - UINT f_operand2; - unsigned char out_Pd; - } sfmt_move_c_sprv10_p0; + } sfmt_move_c_sprv10_p5; struct { /* */ INT f_s6; UINT f_operand2; @@ -346,44 +351,44 @@ union sem_fields { INT f_s6; UINT f_operand2; unsigned char in_Rd; - unsigned char out_h_gr_SI_index_of__DFLT_Rd; + unsigned char out_h_gr_SI_index_of__INT_Rd; } sfmt_andq; struct { /* */ INT f_indir_pc__dword; UINT f_operand2; unsigned char in_Rd; - unsigned char out_h_gr_SI_index_of__DFLT_Rd; + unsigned char out_h_gr_SI_index_of__INT_Rd; } sfmt_addcdr; struct { /* */ INT f_indir_pc__word; UINT f_operand2; unsigned char in_Rd; - unsigned char out_h_gr_SI_index_of__DFLT_Rd; + unsigned char out_h_gr_SI_index_of__INT_Rd; } sfmt_addcwr; struct { /* */ INT f_indir_pc__byte; UINT f_operand2; unsigned char in_Rd; - unsigned char out_h_gr_SI_index_of__DFLT_Rd; + unsigned char out_h_gr_SI_index_of__INT_Rd; } sfmt_addcbr; struct { /* */ UINT f_operand1; UINT f_operand2; unsigned char in_Ps; - unsigned char out_h_gr_SI_index_of__DFLT_Rs; + unsigned char out_h_gr_SI_index_of__INT_Rs; } sfmt_move_spr_rv10; struct { /* */ UINT f_operand2; UINT f_u6; unsigned char in_Rd; - unsigned char out_h_gr_SI_index_of__DFLT_Rd; + unsigned char out_h_gr_SI_index_of__INT_Rd; } sfmt_addq; struct { /* */ UINT f_operand1; UINT f_operand2; unsigned char in_Rd; unsigned char in_Rs; - unsigned char out_h_gr_SI_index_of__DFLT_Rd; + unsigned char out_h_gr_SI_index_of__INT_Rd; } sfmt_add_b_r; struct { /* */ UINT f_operand1; @@ -425,7 +430,7 @@ union sem_fields { unsigned char in_Rd; unsigned char in_Rs; unsigned char out_Rs; - unsigned char out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__DFLT_inc_index_of__DFLT_Rs_index_of__DFLT_Rd; + unsigned char out_h_gr_SI_if__SI_andif__DFLT_prefix_set_not__UINT_inc_index_of__INT_Rs_index_of__INT_Rd; } sfmt_add_m_b_m; struct { /* */ UINT f_memmode; @@ -590,7 +595,7 @@ struct scache { f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \ f_mode = EXTRACT_LSB0_UINT (insn, 16, 11, 2); \ f_opcode = EXTRACT_LSB0_UINT (insn, 16, 9, 4); \ - f_s6 = EXTRACT_LSB0_INT (insn, 16, 5, 6); \ + f_s6 = EXTRACT_LSB0_SINT (insn, 16, 5, 6); \ #define EXTRACT_IFMT_MOVECBR_VARS \ UINT f_operand2; \ @@ -604,9 +609,9 @@ struct scache { unsigned int length; #define EXTRACT_IFMT_MOVECBR_CODE \ length = 4; \ - word_1 = GETIMEMUHI (current_cpu, pc + 2); \ + word_1 = GETIMEMUSI (current_cpu, pc + 2); \ f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \ - f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 16, 15, 16) << 0)); \ + f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); \ f_mode = EXTRACT_LSB0_UINT (insn, 16, 11, 2); \ f_opcode = EXTRACT_LSB0_UINT (insn, 16, 9, 4); \ f_size = EXTRACT_LSB0_UINT (insn, 16, 5, 2); \ @@ -624,9 +629,9 @@ struct scache { unsigned int length; #define EXTRACT_IFMT_MOVECWR_CODE \ length = 4; \ - word_1 = GETIMEMUHI (current_cpu, pc + 2); \ + word_1 = GETIMEMUSI (current_cpu, pc + 2); \ f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \ - f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 16, 15, 16) << 0)); \ + f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); \ f_mode = EXTRACT_LSB0_UINT (insn, 16, 11, 2); \ f_opcode = EXTRACT_LSB0_UINT (insn, 16, 9, 4); \ f_size = EXTRACT_LSB0_UINT (insn, 16, 5, 2); \ @@ -664,9 +669,9 @@ struct scache { unsigned int length; #define EXTRACT_IFMT_MOVUCBR_CODE \ length = 4; \ - word_1 = GETIMEMUHI (current_cpu, pc + 2); \ + word_1 = GETIMEMUSI (current_cpu, pc + 2); \ f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \ - f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 16, 15, 16) << 0)); \ + f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); \ f_mode = EXTRACT_LSB0_UINT (insn, 16, 11, 2); \ f_opcode = EXTRACT_LSB0_UINT (insn, 16, 9, 4); \ f_size = EXTRACT_LSB0_UINT (insn, 16, 5, 2); \ @@ -684,9 +689,9 @@ struct scache { unsigned int length; #define EXTRACT_IFMT_MOVUCWR_CODE \ length = 4; \ - word_1 = GETIMEMUHI (current_cpu, pc + 2); \ + word_1 = GETIMEMUSI (current_cpu, pc + 2); \ f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \ - f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 16, 15, 16) << 0)); \ + f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); \ f_mode = EXTRACT_LSB0_UINT (insn, 16, 11, 2); \ f_opcode = EXTRACT_LSB0_UINT (insn, 16, 9, 4); \ f_size = EXTRACT_LSB0_UINT (insn, 16, 5, 2); \ @@ -784,27 +789,7 @@ struct scache { f_size = EXTRACT_LSB0_UINT (insn, 16, 5, 2); \ f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \ -#define EXTRACT_IFMT_MOVE_C_SPRV10_P0_VARS \ - UINT f_operand2; \ - INT f_indir_pc__byte; \ - UINT f_mode; \ - UINT f_opcode; \ - UINT f_size; \ - UINT f_operand1; \ - /* Contents of trailing part of insn. */ \ - UINT word_1; \ - unsigned int length; -#define EXTRACT_IFMT_MOVE_C_SPRV10_P0_CODE \ - length = 4; \ - word_1 = GETIMEMUHI (current_cpu, pc + 2); \ - f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \ - f_indir_pc__byte = (0|(EXTRACT_LSB0_UINT (word_1, 16, 15, 16) << 0)); \ - f_mode = EXTRACT_LSB0_UINT (insn, 16, 11, 2); \ - f_opcode = EXTRACT_LSB0_UINT (insn, 16, 9, 4); \ - f_size = EXTRACT_LSB0_UINT (insn, 16, 5, 2); \ - f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \ - -#define EXTRACT_IFMT_MOVE_C_SPRV10_P4_VARS \ +#define EXTRACT_IFMT_MOVE_C_SPRV10_P5_VARS \ UINT f_operand2; \ INT f_indir_pc__word; \ UINT f_mode; \ @@ -814,17 +799,17 @@ struct scache { /* Contents of trailing part of insn. */ \ UINT word_1; \ unsigned int length; -#define EXTRACT_IFMT_MOVE_C_SPRV10_P4_CODE \ +#define EXTRACT_IFMT_MOVE_C_SPRV10_P5_CODE \ length = 4; \ - word_1 = GETIMEMUHI (current_cpu, pc + 2); \ + word_1 = GETIMEMUSI (current_cpu, pc + 2); \ f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \ - f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 16, 15, 16) << 0)); \ + f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); \ f_mode = EXTRACT_LSB0_UINT (insn, 16, 11, 2); \ f_opcode = EXTRACT_LSB0_UINT (insn, 16, 9, 4); \ f_size = EXTRACT_LSB0_UINT (insn, 16, 5, 2); \ f_operand1 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \ -#define EXTRACT_IFMT_MOVE_C_SPRV10_P8_VARS \ +#define EXTRACT_IFMT_MOVE_C_SPRV10_P9_VARS \ INT f_indir_pc__dword; \ UINT f_operand2; \ UINT f_mode; \ @@ -834,7 +819,7 @@ struct scache { /* Contents of trailing part of insn. */ \ UINT word_1; \ unsigned int length; -#define EXTRACT_IFMT_MOVE_C_SPRV10_P8_CODE \ +#define EXTRACT_IFMT_MOVE_C_SPRV10_P9_CODE \ length = 6; \ word_1 = GETIMEMUSI (current_cpu, pc + 2); \ f_indir_pc__dword = (0|(EXTRACT_LSB0_UINT (word_1, 32, 31, 32) << 0)); \ @@ -938,7 +923,7 @@ struct scache { f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \ f_mode = EXTRACT_LSB0_UINT (insn, 16, 11, 2); \ f_opcode_hi = EXTRACT_LSB0_UINT (insn, 16, 9, 2); \ - f_disp9_hi = EXTRACT_LSB0_INT (insn, 16, 0, 1); \ + f_disp9_hi = EXTRACT_LSB0_SINT (insn, 16, 0, 1); \ f_disp9_lo = EXTRACT_LSB0_UINT (insn, 16, 7, 7); \ {\ SI tmp_abslo;\ @@ -961,7 +946,7 @@ struct scache { f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \ f_mode = EXTRACT_LSB0_UINT (insn, 16, 11, 2); \ f_opcode_hi = EXTRACT_LSB0_UINT (insn, 16, 9, 2); \ - f_disp9_hi = EXTRACT_LSB0_INT (insn, 16, 0, 1); \ + f_disp9_hi = EXTRACT_LSB0_SINT (insn, 16, 0, 1); \ f_disp9_lo = EXTRACT_LSB0_UINT (insn, 16, 7, 7); \ {\ SI tmp_abslo;\ @@ -983,9 +968,9 @@ struct scache { unsigned int length; #define EXTRACT_IFMT_BCC_W_CODE \ length = 4; \ - word_1 = GETIMEMUHI (current_cpu, pc + 2); \ + word_1 = GETIMEMUSI (current_cpu, pc + 2); \ f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \ - f_indir_pc__word_pcrel = ((EXTHISI (((HI) (UINT) ((0|(EXTRACT_LSB0_UINT (word_1, 16, 15, 16) << 0)))))) + (((pc) + (((GET_H_V32_NON_V32 ()) ? (0) : (4)))))); \ + f_indir_pc__word_pcrel = ((EXTHISI (((HI) (UINT) ((0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)))))) + (((pc) + (((GET_H_V32_NON_V32 ()) ? (0) : (4)))))); \ f_mode = EXTRACT_LSB0_UINT (insn, 16, 11, 2); \ f_opcode = EXTRACT_LSB0_UINT (insn, 16, 9, 4); \ f_size = EXTRACT_LSB0_UINT (insn, 16, 5, 2); \ @@ -1003,9 +988,9 @@ struct scache { unsigned int length; #define EXTRACT_IFMT_BA_W_CODE \ length = 4; \ - word_1 = GETIMEMUHI (current_cpu, pc + 2); \ + word_1 = GETIMEMUSI (current_cpu, pc + 2); \ f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \ - f_indir_pc__word_pcrel = ((EXTHISI (((HI) (UINT) ((0|(EXTRACT_LSB0_UINT (word_1, 16, 15, 16) << 0)))))) + (((pc) + (((GET_H_V32_NON_V32 ()) ? (0) : (4)))))); \ + f_indir_pc__word_pcrel = ((EXTHISI (((HI) (UINT) ((0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)))))) + (((pc) + (((GET_H_V32_NON_V32 ()) ? (0) : (4)))))); \ f_mode = EXTRACT_LSB0_UINT (insn, 16, 11, 2); \ f_opcode = EXTRACT_LSB0_UINT (insn, 16, 9, 4); \ f_size = EXTRACT_LSB0_UINT (insn, 16, 5, 2); \ @@ -1072,7 +1057,7 @@ struct scache { f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \ f_mode = EXTRACT_LSB0_UINT (insn, 16, 11, 2); \ f_opcode_hi = EXTRACT_LSB0_UINT (insn, 16, 9, 2); \ - f_s8 = EXTRACT_LSB0_INT (insn, 16, 7, 8); \ + f_s8 = EXTRACT_LSB0_SINT (insn, 16, 7, 8); \ #define EXTRACT_IFMT_BDAPQPC_VARS \ UINT f_operand2; \ @@ -1085,7 +1070,7 @@ struct scache { f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \ f_mode = EXTRACT_LSB0_UINT (insn, 16, 11, 2); \ f_opcode_hi = EXTRACT_LSB0_UINT (insn, 16, 9, 2); \ - f_s8 = EXTRACT_LSB0_INT (insn, 16, 7, 8); \ + f_s8 = EXTRACT_LSB0_SINT (insn, 16, 7, 8); \ /* Collection of various things for the trace handler to use. */