| /* Xtensa configuration-specific ISA information. |
| |
| Copyright (c) 2003-2016 Tensilica Inc. |
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and associated documentation files (the |
| "Software"), to deal in the Software without restriction, including |
| without limitation the rights to use, copy, modify, merge, publish, |
| distribute, sublicense, and/or sell copies of the Software, and to |
| permit persons to whom the Software is furnished to do so, subject to |
| the following conditions: |
| |
| The above copyright notice and this permission notice shall be included |
| in all copies or substantial portions of the Software. |
| |
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ |
| |
| #include "qemu/osdep.h" |
| #include "xtensa-isa.h" |
| #include "xtensa-isa-internal.h" |
| |
| |
| /* Sysregs. */ |
| |
| static xtensa_sysreg_internal sysregs[] = { |
| { "MMID", 89, 0 }, |
| { "DDR", 104, 0 }, |
| { "CONFIGID0", 176, 0 }, |
| { "CONFIGID1", 208, 0 }, |
| { "INTERRUPT", 226, 0 }, |
| { "INTCLEAR", 227, 0 }, |
| { "CCOUNT", 234, 0 }, |
| { "PRID", 235, 0 }, |
| { "ICOUNT", 236, 0 }, |
| { "CCOMPARE0", 240, 0 }, |
| { "CCOMPARE1", 241, 0 }, |
| { "CCOMPARE2", 242, 0 }, |
| { "VECBASE", 231, 0 }, |
| { "EPC1", 177, 0 }, |
| { "EPC2", 178, 0 }, |
| { "EPC3", 179, 0 }, |
| { "EPC4", 180, 0 }, |
| { "EPC5", 181, 0 }, |
| { "EPC6", 182, 0 }, |
| { "EPC7", 183, 0 }, |
| { "EXCSAVE1", 209, 0 }, |
| { "EXCSAVE2", 210, 0 }, |
| { "EXCSAVE3", 211, 0 }, |
| { "EXCSAVE4", 212, 0 }, |
| { "EXCSAVE5", 213, 0 }, |
| { "EXCSAVE6", 214, 0 }, |
| { "EXCSAVE7", 215, 0 }, |
| { "EPS2", 194, 0 }, |
| { "EPS3", 195, 0 }, |
| { "EPS4", 196, 0 }, |
| { "EPS5", 197, 0 }, |
| { "EPS6", 198, 0 }, |
| { "EPS7", 199, 0 }, |
| { "EXCCAUSE", 232, 0 }, |
| { "DEPC", 192, 0 }, |
| { "EXCVADDR", 238, 0 }, |
| { "WINDOWBASE", 72, 0 }, |
| { "WINDOWSTART", 73, 0 }, |
| { "SAR", 3, 0 }, |
| { "PS", 230, 0 }, |
| { "MISC0", 244, 0 }, |
| { "MISC1", 245, 0 }, |
| { "INTENABLE", 228, 0 }, |
| { "DBREAKA0", 144, 0 }, |
| { "DBREAKC0", 160, 0 }, |
| { "DBREAKA1", 145, 0 }, |
| { "DBREAKC1", 161, 0 }, |
| { "IBREAKA0", 128, 0 }, |
| { "IBREAKA1", 129, 0 }, |
| { "IBREAKENABLE", 96, 0 }, |
| { "ICOUNTLEVEL", 237, 0 }, |
| { "DEBUGCAUSE", 233, 0 }, |
| { "SCOMPARE1", 12, 0 }, |
| { "ATOMCTL", 99, 0 }, |
| { "EXPSTATE", 230, 1 } |
| }; |
| |
| #define NUM_SYSREGS 55 |
| #define MAX_SPECIAL_REG 245 |
| #define MAX_USER_REG 230 |
| |
| |
| /* Processor states. */ |
| |
| static xtensa_state_internal states[] = { |
| { "PC", 32, 0 }, |
| { "ICOUNT", 32, 0 }, |
| { "DDR", 32, 0 }, |
| { "INTERRUPT", 22, 0 }, |
| { "CCOUNT", 32, 0 }, |
| { "XTSYNC", 1, 0 }, |
| { "VECBASE", 22, 0 }, |
| { "EPC1", 32, 0 }, |
| { "EPC2", 32, 0 }, |
| { "EPC3", 32, 0 }, |
| { "EPC4", 32, 0 }, |
| { "EPC5", 32, 0 }, |
| { "EPC6", 32, 0 }, |
| { "EPC7", 32, 0 }, |
| { "EXCSAVE1", 32, 0 }, |
| { "EXCSAVE2", 32, 0 }, |
| { "EXCSAVE3", 32, 0 }, |
| { "EXCSAVE4", 32, 0 }, |
| { "EXCSAVE5", 32, 0 }, |
| { "EXCSAVE6", 32, 0 }, |
| { "EXCSAVE7", 32, 0 }, |
| { "EPS2", 13, 0 }, |
| { "EPS3", 13, 0 }, |
| { "EPS4", 13, 0 }, |
| { "EPS5", 13, 0 }, |
| { "EPS6", 13, 0 }, |
| { "EPS7", 13, 0 }, |
| { "EXCCAUSE", 6, 0 }, |
| { "PSINTLEVEL", 4, 0 }, |
| { "PSUM", 1, 0 }, |
| { "PSWOE", 1, 0 }, |
| { "PSEXCM", 1, 0 }, |
| { "DEPC", 32, 0 }, |
| { "EXCVADDR", 32, 0 }, |
| { "WindowBase", 3, 0 }, |
| { "WindowStart", 8, 0 }, |
| { "PSCALLINC", 2, 0 }, |
| { "PSOWB", 4, 0 }, |
| { "SAR", 6, 0 }, |
| { "MISC0", 32, 0 }, |
| { "MISC1", 32, 0 }, |
| { "InOCDMode", 1, 0 }, |
| { "INTENABLE", 22, 0 }, |
| { "DBREAKA0", 32, 0 }, |
| { "DBREAKC0", 8, 0 }, |
| { "DBREAKA1", 32, 0 }, |
| { "DBREAKC1", 8, 0 }, |
| { "IBREAKA0", 32, 0 }, |
| { "IBREAKA1", 32, 0 }, |
| { "IBREAKENABLE", 2, 0 }, |
| { "ICOUNTLEVEL", 4, 0 }, |
| { "DEBUGCAUSE", 6, 0 }, |
| { "DBNUM", 4, 0 }, |
| { "CCOMPARE0", 32, 0 }, |
| { "CCOMPARE1", 32, 0 }, |
| { "CCOMPARE2", 32, 0 }, |
| { "SCOMPARE1", 32, 0 }, |
| { "ATOMCTL", 6, 0 }, |
| { "EXPSTATE", 32, XTENSA_STATE_IS_EXPORTED } |
| }; |
| |
| #define NUM_STATES 59 |
| |
| enum xtensa_state_id { |
| STATE_PC, |
| STATE_ICOUNT, |
| STATE_DDR, |
| STATE_INTERRUPT, |
| STATE_CCOUNT, |
| STATE_XTSYNC, |
| STATE_VECBASE, |
| STATE_EPC1, |
| STATE_EPC2, |
| STATE_EPC3, |
| STATE_EPC4, |
| STATE_EPC5, |
| STATE_EPC6, |
| STATE_EPC7, |
| STATE_EXCSAVE1, |
| STATE_EXCSAVE2, |
| STATE_EXCSAVE3, |
| STATE_EXCSAVE4, |
| STATE_EXCSAVE5, |
| STATE_EXCSAVE6, |
| STATE_EXCSAVE7, |
| STATE_EPS2, |
| STATE_EPS3, |
| STATE_EPS4, |
| STATE_EPS5, |
| STATE_EPS6, |
| STATE_EPS7, |
| STATE_EXCCAUSE, |
| STATE_PSINTLEVEL, |
| STATE_PSUM, |
| STATE_PSWOE, |
| STATE_PSEXCM, |
| STATE_DEPC, |
| STATE_EXCVADDR, |
| STATE_WindowBase, |
| STATE_WindowStart, |
| STATE_PSCALLINC, |
| STATE_PSOWB, |
| STATE_SAR, |
| STATE_MISC0, |
| STATE_MISC1, |
| STATE_InOCDMode, |
| STATE_INTENABLE, |
| STATE_DBREAKA0, |
| STATE_DBREAKC0, |
| STATE_DBREAKA1, |
| STATE_DBREAKC1, |
| STATE_IBREAKA0, |
| STATE_IBREAKA1, |
| STATE_IBREAKENABLE, |
| STATE_ICOUNTLEVEL, |
| STATE_DEBUGCAUSE, |
| STATE_DBNUM, |
| STATE_CCOMPARE0, |
| STATE_CCOMPARE1, |
| STATE_CCOMPARE2, |
| STATE_SCOMPARE1, |
| STATE_ATOMCTL, |
| STATE_EXPSTATE |
| }; |
| |
| |
| /* Field definitions. */ |
| |
| static unsigned |
| Field_t_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_t_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf0) | (tie_t << 4); |
| } |
| |
| static unsigned |
| Field_s_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_s_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf00) | (tie_t << 8); |
| } |
| |
| static unsigned |
| Field_r_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_r_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_op2_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 8) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_op2_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf00000) | (tie_t << 20); |
| } |
| |
| static unsigned |
| Field_op1_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 12) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_op1_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf0000) | (tie_t << 16); |
| } |
| |
| static unsigned |
| Field_op0_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 28) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_op0_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf) | (tie_t << 0); |
| } |
| |
| static unsigned |
| Field_n_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 2) | ((insn[0] << 26) >> 30); |
| return tie_t; |
| } |
| |
| static void |
| Field_n_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 30) >> 30; |
| insn[0] = (insn[0] & ~0x30) | (tie_t << 4); |
| } |
| |
| static unsigned |
| Field_m_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 2) | ((insn[0] << 24) >> 30); |
| return tie_t; |
| } |
| |
| static void |
| Field_m_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 30) >> 30; |
| insn[0] = (insn[0] & ~0xc0) | (tie_t << 6); |
| } |
| |
| static unsigned |
| Field_sr_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_sr_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf00) | (tie_t << 8); |
| tie_t = (val << 24) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_thi3_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 3) | ((insn[0] << 24) >> 29); |
| return tie_t; |
| } |
| |
| static void |
| Field_thi3_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 29) >> 29; |
| insn[0] = (insn[0] & ~0xe0) | (tie_t << 5); |
| } |
| |
| static unsigned |
| Field_st_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28); |
| tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_st_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf0) | (tie_t << 4); |
| tie_t = (val << 24) >> 28; |
| insn[0] = (insn[0] & ~0xf00) | (tie_t << 8); |
| } |
| |
| static unsigned |
| Field_s3to1_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 3) | ((insn[0] << 20) >> 29); |
| return tie_t; |
| } |
| |
| static void |
| Field_s3to1_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 29) >> 29; |
| insn[0] = (insn[0] & ~0xe00) | (tie_t << 9); |
| } |
| |
| static unsigned |
| Field_op0_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 28) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_op0_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf) | (tie_t << 0); |
| } |
| |
| static unsigned |
| Field_t_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_t_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf0) | (tie_t << 4); |
| } |
| |
| static unsigned |
| Field_r_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_r_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_op0_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 28) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_op0_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf) | (tie_t << 0); |
| } |
| |
| static unsigned |
| Field_z_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 25) >> 31); |
| return tie_t; |
| } |
| |
| static void |
| Field_z_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 31) >> 31; |
| insn[0] = (insn[0] & ~0x40) | (tie_t << 6); |
| } |
| |
| static unsigned |
| Field_i_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 24) >> 31); |
| return tie_t; |
| } |
| |
| static void |
| Field_i_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 31) >> 31; |
| insn[0] = (insn[0] & ~0x80) | (tie_t << 7); |
| } |
| |
| static unsigned |
| Field_s_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_s_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf00) | (tie_t << 8); |
| } |
| |
| static unsigned |
| Field_t_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_t_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf0) | (tie_t << 4); |
| } |
| |
| static unsigned |
| Field_bbi4_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 19) >> 31); |
| return tie_t; |
| } |
| |
| static void |
| Field_bbi4_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 31) >> 31; |
| insn[0] = (insn[0] & ~0x1000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_bbi_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 19) >> 31); |
| tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_bbi_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf0) | (tie_t << 4); |
| tie_t = (val << 27) >> 31; |
| insn[0] = (insn[0] & ~0x1000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_imm12_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 12) | ((insn[0] << 8) >> 20); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm12_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 20) >> 20; |
| insn[0] = (insn[0] & ~0xfff000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_imm8_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 8) | ((insn[0] << 8) >> 24); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm8_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 24) >> 24; |
| insn[0] = (insn[0] & ~0xff0000) | (tie_t << 16); |
| } |
| |
| static unsigned |
| Field_s_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_s_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf00) | (tie_t << 8); |
| } |
| |
| static unsigned |
| Field_imm12b_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28); |
| tie_t = (tie_t << 8) | ((insn[0] << 8) >> 24); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm12b_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 24) >> 24; |
| insn[0] = (insn[0] & ~0xff0000) | (tie_t << 16); |
| tie_t = (val << 20) >> 28; |
| insn[0] = (insn[0] & ~0xf00) | (tie_t << 8); |
| } |
| |
| static unsigned |
| Field_imm16_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 16) | ((insn[0] << 8) >> 16); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm16_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 16) >> 16; |
| insn[0] = (insn[0] & ~0xffff00) | (tie_t << 8); |
| } |
| |
| static unsigned |
| Field_offset_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 18) | ((insn[0] << 8) >> 14); |
| return tie_t; |
| } |
| |
| static void |
| Field_offset_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 14) >> 14; |
| insn[0] = (insn[0] & ~0xffffc0) | (tie_t << 6); |
| } |
| |
| static unsigned |
| Field_r_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_r_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_sa4_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 11) >> 31); |
| return tie_t; |
| } |
| |
| static void |
| Field_sa4_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 31) >> 31; |
| insn[0] = (insn[0] & ~0x100000) | (tie_t << 20); |
| } |
| |
| static unsigned |
| Field_sae4_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 15) >> 31); |
| return tie_t; |
| } |
| |
| static void |
| Field_sae4_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 31) >> 31; |
| insn[0] = (insn[0] & ~0x10000) | (tie_t << 16); |
| } |
| |
| static unsigned |
| Field_sae_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 15) >> 31); |
| tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_sae_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf00) | (tie_t << 8); |
| tie_t = (val << 27) >> 31; |
| insn[0] = (insn[0] & ~0x10000) | (tie_t << 16); |
| } |
| |
| static unsigned |
| Field_sal_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 11) >> 31); |
| tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_sal_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf0) | (tie_t << 4); |
| tie_t = (val << 27) >> 31; |
| insn[0] = (insn[0] & ~0x100000) | (tie_t << 20); |
| } |
| |
| static unsigned |
| Field_sargt_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 11) >> 31); |
| tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_sargt_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf00) | (tie_t << 8); |
| tie_t = (val << 27) >> 31; |
| insn[0] = (insn[0] & ~0x100000) | (tie_t << 20); |
| } |
| |
| static unsigned |
| Field_sas4_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 27) >> 31); |
| return tie_t; |
| } |
| |
| static void |
| Field_sas4_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 31) >> 31; |
| insn[0] = (insn[0] & ~0x10) | (tie_t << 4); |
| } |
| |
| static unsigned |
| Field_sas_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 27) >> 31); |
| tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_sas_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf00) | (tie_t << 8); |
| tie_t = (val << 27) >> 31; |
| insn[0] = (insn[0] & ~0x10) | (tie_t << 4); |
| } |
| |
| static unsigned |
| Field_sr_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_sr_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf00) | (tie_t << 8); |
| tie_t = (val << 24) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_sr_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_sr_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf00) | (tie_t << 8); |
| tie_t = (val << 24) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_st_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28); |
| tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_st_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf0) | (tie_t << 4); |
| tie_t = (val << 24) >> 28; |
| insn[0] = (insn[0] & ~0xf00) | (tie_t << 8); |
| } |
| |
| static unsigned |
| Field_st_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28); |
| tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_st_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf0) | (tie_t << 4); |
| tie_t = (val << 24) >> 28; |
| insn[0] = (insn[0] & ~0xf00) | (tie_t << 8); |
| } |
| |
| static unsigned |
| Field_imm4_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm4_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_imm4_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm4_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_imm4_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm4_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_mn_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 2) | ((insn[0] << 24) >> 30); |
| tie_t = (tie_t << 2) | ((insn[0] << 26) >> 30); |
| return tie_t; |
| } |
| |
| static void |
| Field_mn_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 30) >> 30; |
| insn[0] = (insn[0] & ~0x30) | (tie_t << 4); |
| tie_t = (val << 28) >> 30; |
| insn[0] = (insn[0] & ~0xc0) | (tie_t << 6); |
| } |
| |
| static unsigned |
| Field_i_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 24) >> 31); |
| return tie_t; |
| } |
| |
| static void |
| Field_i_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 31) >> 31; |
| insn[0] = (insn[0] & ~0x80) | (tie_t << 7); |
| } |
| |
| static unsigned |
| Field_imm6lo_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm6lo_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_imm6lo_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm6lo_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_imm6hi_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 2) | ((insn[0] << 26) >> 30); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm6hi_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 30) >> 30; |
| insn[0] = (insn[0] & ~0x30) | (tie_t << 4); |
| } |
| |
| static unsigned |
| Field_imm6hi_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 2) | ((insn[0] << 26) >> 30); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm6hi_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 30) >> 30; |
| insn[0] = (insn[0] & ~0x30) | (tie_t << 4); |
| } |
| |
| static unsigned |
| Field_imm7lo_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm7lo_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_imm7lo_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm7lo_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| } |
| |
| static unsigned |
| Field_imm7hi_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 3) | ((insn[0] << 25) >> 29); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm7hi_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 29) >> 29; |
| insn[0] = (insn[0] & ~0x70) | (tie_t << 4); |
| } |
| |
| static unsigned |
| Field_imm7hi_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 3) | ((insn[0] << 25) >> 29); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm7hi_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 29) >> 29; |
| insn[0] = (insn[0] & ~0x70) | (tie_t << 4); |
| } |
| |
| static unsigned |
| Field_z_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 25) >> 31); |
| return tie_t; |
| } |
| |
| static void |
| Field_z_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 31) >> 31; |
| insn[0] = (insn[0] & ~0x40) | (tie_t << 6); |
| } |
| |
| static unsigned |
| Field_imm6_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 2) | ((insn[0] << 26) >> 30); |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm6_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| tie_t = (val << 26) >> 30; |
| insn[0] = (insn[0] & ~0x30) | (tie_t << 4); |
| } |
| |
| static unsigned |
| Field_imm6_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 2) | ((insn[0] << 26) >> 30); |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm6_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| tie_t = (val << 26) >> 30; |
| insn[0] = (insn[0] & ~0x30) | (tie_t << 4); |
| } |
| |
| static unsigned |
| Field_imm7_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 3) | ((insn[0] << 25) >> 29); |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm7_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| tie_t = (val << 25) >> 29; |
| insn[0] = (insn[0] & ~0x70) | (tie_t << 4); |
| } |
| |
| static unsigned |
| Field_imm7_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 3) | ((insn[0] << 25) >> 29); |
| tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_imm7_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf000) | (tie_t << 12); |
| tie_t = (val << 25) >> 29; |
| insn[0] = (insn[0] & ~0x70) | (tie_t << 4); |
| } |
| |
| static unsigned |
| Field_xt_wbr15_imm_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 15) | ((insn[0] << 8) >> 17); |
| return tie_t; |
| } |
| |
| static void |
| Field_xt_wbr15_imm_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 17) >> 17; |
| insn[0] = (insn[0] & ~0xfffe00) | (tie_t << 9); |
| } |
| |
| static unsigned |
| Field_xt_wbr18_imm_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 18) | ((insn[0] << 8) >> 14); |
| return tie_t; |
| } |
| |
| static void |
| Field_xt_wbr18_imm_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 14) >> 14; |
| insn[0] = (insn[0] & ~0xffffc0) | (tie_t << 6); |
| } |
| |
| static unsigned |
| Field_bitindex_Slot_inst_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 23) >> 31); |
| tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_bitindex_Slot_inst_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf0) | (tie_t << 4); |
| tie_t = (val << 27) >> 31; |
| insn[0] = (insn[0] & ~0x100) | (tie_t << 8); |
| } |
| |
| static unsigned |
| Field_bitindex_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 23) >> 31); |
| tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_bitindex_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf0) | (tie_t << 4); |
| tie_t = (val << 27) >> 31; |
| insn[0] = (insn[0] & ~0x100) | (tie_t << 8); |
| } |
| |
| static unsigned |
| Field_bitindex_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 1) | ((insn[0] << 23) >> 31); |
| tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28); |
| return tie_t; |
| } |
| |
| static void |
| Field_bitindex_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 28) >> 28; |
| insn[0] = (insn[0] & ~0xf0) | (tie_t << 4); |
| tie_t = (val << 27) >> 31; |
| insn[0] = (insn[0] & ~0x100) | (tie_t << 8); |
| } |
| |
| static unsigned |
| Field_s3to1_Slot_inst16a_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 3) | ((insn[0] << 20) >> 29); |
| return tie_t; |
| } |
| |
| static void |
| Field_s3to1_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 29) >> 29; |
| insn[0] = (insn[0] & ~0xe00) | (tie_t << 9); |
| } |
| |
| static unsigned |
| Field_s3to1_Slot_inst16b_get (const xtensa_insnbuf insn) |
| { |
| unsigned tie_t = 0; |
| tie_t = (tie_t << 3) | ((insn[0] << 20) >> 29); |
| return tie_t; |
| } |
| |
| static void |
| Field_s3to1_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val) |
| { |
| uint32 tie_t; |
| tie_t = (val << 29) >> 29; |
| insn[0] = (insn[0] & ~0xe00) | (tie_t << 9); |
| } |
| |
| static void |
| Implicit_Field_set (xtensa_insnbuf insn ATTRIBUTE_UNUSED, |
| uint32 val ATTRIBUTE_UNUSED) |
| { |
| /* Do nothing. */ |
| } |
| |
| static unsigned |
| Implicit_Field_ar0_get (const xtensa_insnbuf insn ATTRIBUTE_UNUSED) |
| { |
| return 0; |
| } |
| |
| static unsigned |
| Implicit_Field_ar4_get (const xtensa_insnbuf insn ATTRIBUTE_UNUSED) |
| { |
| return 4; |
| } |
| |
| static unsigned |
| Implicit_Field_ar8_get (const xtensa_insnbuf insn ATTRIBUTE_UNUSED) |
| { |
| return 8; |
| } |
| |
| static unsigned |
| Implicit_Field_ar12_get (const xtensa_insnbuf insn ATTRIBUTE_UNUSED) |
| { |
| return 12; |
| } |
| |
| enum xtensa_field_id { |
| FIELD_t, |
| FIELD_bbi4, |
| FIELD_bbi, |
| FIELD_imm12, |
| FIELD_imm8, |
| FIELD_s, |
| FIELD_imm12b, |
| FIELD_imm16, |
| FIELD_m, |
| FIELD_n, |
| FIELD_offset, |
| FIELD_op0, |
| FIELD_op1, |
| FIELD_op2, |
| FIELD_r, |
| FIELD_sa4, |
| FIELD_sae4, |
| FIELD_sae, |
| FIELD_sal, |
| FIELD_sargt, |
| FIELD_sas4, |
| FIELD_sas, |
| FIELD_sr, |
| FIELD_st, |
| FIELD_thi3, |
| FIELD_imm4, |
| FIELD_mn, |
| FIELD_i, |
| FIELD_imm6lo, |
| FIELD_imm6hi, |
| FIELD_imm7lo, |
| FIELD_imm7hi, |
| FIELD_z, |
| FIELD_imm6, |
| FIELD_imm7, |
| FIELD_xt_wbr15_imm, |
| FIELD_xt_wbr18_imm, |
| FIELD_bitindex, |
| FIELD_s3to1, |
| FIELD__ar0, |
| FIELD__ar4, |
| FIELD__ar8, |
| FIELD__ar12 |
| }; |
| |
| |
| /* Functional units. */ |
| |
| #define funcUnits 0 |
| |
| |
| /* Register files. */ |
| |
| enum xtensa_regfile_id { |
| REGFILE_AR |
| }; |
| |
| static xtensa_regfile_internal regfiles[] = { |
| { "AR", "a", REGFILE_AR, 32, 32 } |
| }; |
| |
| |
| /* Interfaces. */ |
| |
| static xtensa_interface_internal interfaces[] = { |
| { "IMPWIRE", 32, 0, 0, 'i' } |
| }; |
| |
| enum xtensa_interface_id { |
| INTERFACE_IMPWIRE |
| }; |
| |
| |
| /* Constant tables. */ |
| |
| /* constant table ai4c */ |
| static const unsigned CONST_TBL_ai4c_0[] = { |
| 0xffffffff, |
| 0x1, |
| 0x2, |
| 0x3, |
| 0x4, |
| 0x5, |
| 0x6, |
| 0x7, |
| 0x8, |
| 0x9, |
| 0xa, |
| 0xb, |
| 0xc, |
| 0xd, |
| 0xe, |
| 0xf, |
| 0 |
| }; |
| |
| /* constant table b4c */ |
| static const unsigned CONST_TBL_b4c_0[] = { |
| 0xffffffff, |
| 0x1, |
| 0x2, |
| 0x3, |
| 0x4, |
| 0x5, |
| 0x6, |
| 0x7, |
| 0x8, |
| 0xa, |
| 0xc, |
| 0x10, |
| 0x20, |
| 0x40, |
| 0x80, |
| 0x100, |
| 0 |
| }; |
| |
| /* constant table b4cu */ |
| static const unsigned CONST_TBL_b4cu_0[] = { |
| 0x8000, |
| 0x10000, |
| 0x2, |
| 0x3, |
| 0x4, |
| 0x5, |
| 0x6, |
| 0x7, |
| 0x8, |
| 0xa, |
| 0xc, |
| 0x10, |
| 0x20, |
| 0x40, |
| 0x80, |
| 0x100, |
| 0 |
| }; |
| |
| |
| /* Instruction operands. */ |
| |
| static int |
| OperandSem_opnd_sem_soffsetx4_decode (uint32 *valp) |
| { |
| unsigned soffsetx4_out_0; |
| unsigned soffsetx4_in_0; |
| soffsetx4_in_0 = *valp & 0x3ffff; |
| soffsetx4_out_0 = 0x4 + ((((int) soffsetx4_in_0 << 14) >> 14) << 2); |
| *valp = soffsetx4_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_soffsetx4_encode (uint32 *valp) |
| { |
| unsigned soffsetx4_in_0; |
| unsigned soffsetx4_out_0; |
| soffsetx4_out_0 = *valp; |
| soffsetx4_in_0 = ((soffsetx4_out_0 - 0x4) >> 2) & 0x3ffff; |
| *valp = soffsetx4_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimm12x8_decode (uint32 *valp) |
| { |
| unsigned uimm12x8_out_0; |
| unsigned uimm12x8_in_0; |
| uimm12x8_in_0 = *valp & 0xfff; |
| uimm12x8_out_0 = uimm12x8_in_0 << 3; |
| *valp = uimm12x8_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimm12x8_encode (uint32 *valp) |
| { |
| unsigned uimm12x8_in_0; |
| unsigned uimm12x8_out_0; |
| uimm12x8_out_0 = *valp; |
| uimm12x8_in_0 = ((uimm12x8_out_0 >> 3) & 0xfff); |
| *valp = uimm12x8_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_simm4_decode (uint32 *valp) |
| { |
| unsigned simm4_out_0; |
| unsigned simm4_in_0; |
| simm4_in_0 = *valp & 0xf; |
| simm4_out_0 = ((int) simm4_in_0 << 28) >> 28; |
| *valp = simm4_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_simm4_encode (uint32 *valp) |
| { |
| unsigned simm4_in_0; |
| unsigned simm4_out_0; |
| simm4_out_0 = *valp; |
| simm4_in_0 = (simm4_out_0 & 0xf); |
| *valp = simm4_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_AR_decode (uint32 *valp ATTRIBUTE_UNUSED) |
| { |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_AR_encode (uint32 *valp) |
| { |
| return (*valp >= 32); |
| } |
| |
| static int |
| OperandSem_opnd_sem_AR_0_decode (uint32 *valp ATTRIBUTE_UNUSED) |
| { |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_AR_0_encode (uint32 *valp) |
| { |
| return (*valp >= 32); |
| } |
| |
| static int |
| OperandSem_opnd_sem_AR_1_decode (uint32 *valp ATTRIBUTE_UNUSED) |
| { |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_AR_1_encode (uint32 *valp) |
| { |
| return (*valp >= 32); |
| } |
| |
| static int |
| OperandSem_opnd_sem_AR_2_decode (uint32 *valp ATTRIBUTE_UNUSED) |
| { |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_AR_2_encode (uint32 *valp) |
| { |
| return (*valp >= 32); |
| } |
| |
| static int |
| OperandSem_opnd_sem_AR_3_decode (uint32 *valp ATTRIBUTE_UNUSED) |
| { |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_AR_3_encode (uint32 *valp) |
| { |
| return (*valp >= 32); |
| } |
| |
| static int |
| OperandSem_opnd_sem_AR_4_decode (uint32 *valp ATTRIBUTE_UNUSED) |
| { |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_AR_4_encode (uint32 *valp) |
| { |
| return (*valp >= 32); |
| } |
| |
| static int |
| OperandSem_opnd_sem_immrx4_decode (uint32 *valp) |
| { |
| unsigned immrx4_out_0; |
| unsigned immrx4_in_0; |
| immrx4_in_0 = *valp & 0xf; |
| immrx4_out_0 = (((0xfffffff) << 4) | immrx4_in_0) << 2; |
| *valp = immrx4_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_immrx4_encode (uint32 *valp) |
| { |
| unsigned immrx4_in_0; |
| unsigned immrx4_out_0; |
| immrx4_out_0 = *valp; |
| immrx4_in_0 = ((immrx4_out_0 >> 2) & 0xf); |
| *valp = immrx4_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_lsi4x4_decode (uint32 *valp) |
| { |
| unsigned lsi4x4_out_0; |
| unsigned lsi4x4_in_0; |
| lsi4x4_in_0 = *valp & 0xf; |
| lsi4x4_out_0 = lsi4x4_in_0 << 2; |
| *valp = lsi4x4_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_lsi4x4_encode (uint32 *valp) |
| { |
| unsigned lsi4x4_in_0; |
| unsigned lsi4x4_out_0; |
| lsi4x4_out_0 = *valp; |
| lsi4x4_in_0 = ((lsi4x4_out_0 >> 2) & 0xf); |
| *valp = lsi4x4_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_simm7_decode (uint32 *valp) |
| { |
| unsigned simm7_out_0; |
| unsigned simm7_in_0; |
| simm7_in_0 = *valp & 0x7f; |
| simm7_out_0 = ((((-((((simm7_in_0 >> 6) & 1)) & (((simm7_in_0 >> 5) & 1)))) & 0x1ffffff)) << 7) | simm7_in_0; |
| *valp = simm7_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_simm7_encode (uint32 *valp) |
| { |
| unsigned simm7_in_0; |
| unsigned simm7_out_0; |
| simm7_out_0 = *valp; |
| simm7_in_0 = (simm7_out_0 & 0x7f); |
| *valp = simm7_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimm6_decode (uint32 *valp) |
| { |
| unsigned uimm6_out_0; |
| unsigned uimm6_in_0; |
| uimm6_in_0 = *valp & 0x3f; |
| uimm6_out_0 = 0x4 + (((0) << 6) | uimm6_in_0); |
| *valp = uimm6_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimm6_encode (uint32 *valp) |
| { |
| unsigned uimm6_in_0; |
| unsigned uimm6_out_0; |
| uimm6_out_0 = *valp; |
| uimm6_in_0 = (uimm6_out_0 - 0x4) & 0x3f; |
| *valp = uimm6_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_ai4const_decode (uint32 *valp) |
| { |
| unsigned ai4const_out_0; |
| unsigned ai4const_in_0; |
| ai4const_in_0 = *valp & 0xf; |
| ai4const_out_0 = CONST_TBL_ai4c_0[ai4const_in_0 & 0xf]; |
| *valp = ai4const_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_ai4const_encode (uint32 *valp) |
| { |
| unsigned ai4const_in_0; |
| unsigned ai4const_out_0; |
| ai4const_out_0 = *valp; |
| switch (ai4const_out_0) |
| { |
| case 0xffffffff: ai4const_in_0 = 0; break; |
| case 0x1: ai4const_in_0 = 0x1; break; |
| case 0x2: ai4const_in_0 = 0x2; break; |
| case 0x3: ai4const_in_0 = 0x3; break; |
| case 0x4: ai4const_in_0 = 0x4; break; |
| case 0x5: ai4const_in_0 = 0x5; break; |
| case 0x6: ai4const_in_0 = 0x6; break; |
| case 0x7: ai4const_in_0 = 0x7; break; |
| case 0x8: ai4const_in_0 = 0x8; break; |
| case 0x9: ai4const_in_0 = 0x9; break; |
| case 0xa: ai4const_in_0 = 0xa; break; |
| case 0xb: ai4const_in_0 = 0xb; break; |
| case 0xc: ai4const_in_0 = 0xc; break; |
| case 0xd: ai4const_in_0 = 0xd; break; |
| case 0xe: ai4const_in_0 = 0xe; break; |
| default: ai4const_in_0 = 0xf; break; |
| } |
| *valp = ai4const_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_b4const_decode (uint32 *valp) |
| { |
| unsigned b4const_out_0; |
| unsigned b4const_in_0; |
| b4const_in_0 = *valp & 0xf; |
| b4const_out_0 = CONST_TBL_b4c_0[b4const_in_0 & 0xf]; |
| *valp = b4const_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_b4const_encode (uint32 *valp) |
| { |
| unsigned b4const_in_0; |
| unsigned b4const_out_0; |
| b4const_out_0 = *valp; |
| switch (b4const_out_0) |
| { |
| case 0xffffffff: b4const_in_0 = 0; break; |
| case 0x1: b4const_in_0 = 0x1; break; |
| case 0x2: b4const_in_0 = 0x2; break; |
| case 0x3: b4const_in_0 = 0x3; break; |
| case 0x4: b4const_in_0 = 0x4; break; |
| case 0x5: b4const_in_0 = 0x5; break; |
| case 0x6: b4const_in_0 = 0x6; break; |
| case 0x7: b4const_in_0 = 0x7; break; |
| case 0x8: b4const_in_0 = 0x8; break; |
| case 0xa: b4const_in_0 = 0x9; break; |
| case 0xc: b4const_in_0 = 0xa; break; |
| case 0x10: b4const_in_0 = 0xb; break; |
| case 0x20: b4const_in_0 = 0xc; break; |
| case 0x40: b4const_in_0 = 0xd; break; |
| case 0x80: b4const_in_0 = 0xe; break; |
| default: b4const_in_0 = 0xf; break; |
| } |
| *valp = b4const_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_b4constu_decode (uint32 *valp) |
| { |
| unsigned b4constu_out_0; |
| unsigned b4constu_in_0; |
| b4constu_in_0 = *valp & 0xf; |
| b4constu_out_0 = CONST_TBL_b4cu_0[b4constu_in_0 & 0xf]; |
| *valp = b4constu_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_b4constu_encode (uint32 *valp) |
| { |
| unsigned b4constu_in_0; |
| unsigned b4constu_out_0; |
| b4constu_out_0 = *valp; |
| switch (b4constu_out_0) |
| { |
| case 0x8000: b4constu_in_0 = 0; break; |
| case 0x10000: b4constu_in_0 = 0x1; break; |
| case 0x2: b4constu_in_0 = 0x2; break; |
| case 0x3: b4constu_in_0 = 0x3; break; |
| case 0x4: b4constu_in_0 = 0x4; break; |
| case 0x5: b4constu_in_0 = 0x5; break; |
| case 0x6: b4constu_in_0 = 0x6; break; |
| case 0x7: b4constu_in_0 = 0x7; break; |
| case 0x8: b4constu_in_0 = 0x8; break; |
| case 0xa: b4constu_in_0 = 0x9; break; |
| case 0xc: b4constu_in_0 = 0xa; break; |
| case 0x10: b4constu_in_0 = 0xb; break; |
| case 0x20: b4constu_in_0 = 0xc; break; |
| case 0x40: b4constu_in_0 = 0xd; break; |
| case 0x80: b4constu_in_0 = 0xe; break; |
| default: b4constu_in_0 = 0xf; break; |
| } |
| *valp = b4constu_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimm8_decode (uint32 *valp) |
| { |
| unsigned uimm8_out_0; |
| unsigned uimm8_in_0; |
| uimm8_in_0 = *valp & 0xff; |
| uimm8_out_0 = uimm8_in_0; |
| *valp = uimm8_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimm8_encode (uint32 *valp) |
| { |
| unsigned uimm8_in_0; |
| unsigned uimm8_out_0; |
| uimm8_out_0 = *valp; |
| uimm8_in_0 = (uimm8_out_0 & 0xff); |
| *valp = uimm8_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimm8x2_decode (uint32 *valp) |
| { |
| unsigned uimm8x2_out_0; |
| unsigned uimm8x2_in_0; |
| uimm8x2_in_0 = *valp & 0xff; |
| uimm8x2_out_0 = uimm8x2_in_0 << 1; |
| *valp = uimm8x2_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimm8x2_encode (uint32 *valp) |
| { |
| unsigned uimm8x2_in_0; |
| unsigned uimm8x2_out_0; |
| uimm8x2_out_0 = *valp; |
| uimm8x2_in_0 = ((uimm8x2_out_0 >> 1) & 0xff); |
| *valp = uimm8x2_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimm8x4_decode (uint32 *valp) |
| { |
| unsigned uimm8x4_out_0; |
| unsigned uimm8x4_in_0; |
| uimm8x4_in_0 = *valp & 0xff; |
| uimm8x4_out_0 = uimm8x4_in_0 << 2; |
| *valp = uimm8x4_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimm8x4_encode (uint32 *valp) |
| { |
| unsigned uimm8x4_in_0; |
| unsigned uimm8x4_out_0; |
| uimm8x4_out_0 = *valp; |
| uimm8x4_in_0 = ((uimm8x4_out_0 >> 2) & 0xff); |
| *valp = uimm8x4_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimm4x16_decode (uint32 *valp) |
| { |
| unsigned uimm4x16_out_0; |
| unsigned uimm4x16_in_0; |
| uimm4x16_in_0 = *valp & 0xf; |
| uimm4x16_out_0 = uimm4x16_in_0 << 4; |
| *valp = uimm4x16_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimm4x16_encode (uint32 *valp) |
| { |
| unsigned uimm4x16_in_0; |
| unsigned uimm4x16_out_0; |
| uimm4x16_out_0 = *valp; |
| uimm4x16_in_0 = ((uimm4x16_out_0 >> 4) & 0xf); |
| *valp = uimm4x16_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimmrx4_decode (uint32 *valp) |
| { |
| unsigned uimmrx4_out_0; |
| unsigned uimmrx4_in_0; |
| uimmrx4_in_0 = *valp & 0xf; |
| uimmrx4_out_0 = uimmrx4_in_0 << 2; |
| *valp = uimmrx4_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimmrx4_encode (uint32 *valp) |
| { |
| unsigned uimmrx4_in_0; |
| unsigned uimmrx4_out_0; |
| uimmrx4_out_0 = *valp; |
| uimmrx4_in_0 = ((uimmrx4_out_0 >> 2) & 0xf); |
| *valp = uimmrx4_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_simm8_decode (uint32 *valp) |
| { |
| unsigned simm8_out_0; |
| unsigned simm8_in_0; |
| simm8_in_0 = *valp & 0xff; |
| simm8_out_0 = ((int) simm8_in_0 << 24) >> 24; |
| *valp = simm8_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_simm8_encode (uint32 *valp) |
| { |
| unsigned simm8_in_0; |
| unsigned simm8_out_0; |
| simm8_out_0 = *valp; |
| simm8_in_0 = (simm8_out_0 & 0xff); |
| *valp = simm8_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_simm8x256_decode (uint32 *valp) |
| { |
| unsigned simm8x256_out_0; |
| unsigned simm8x256_in_0; |
| simm8x256_in_0 = *valp & 0xff; |
| simm8x256_out_0 = (((int) simm8x256_in_0 << 24) >> 24) << 8; |
| *valp = simm8x256_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_simm8x256_encode (uint32 *valp) |
| { |
| unsigned simm8x256_in_0; |
| unsigned simm8x256_out_0; |
| simm8x256_out_0 = *valp; |
| simm8x256_in_0 = ((simm8x256_out_0 >> 8) & 0xff); |
| *valp = simm8x256_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_simm12b_decode (uint32 *valp) |
| { |
| unsigned simm12b_out_0; |
| unsigned simm12b_in_0; |
| simm12b_in_0 = *valp & 0xfff; |
| simm12b_out_0 = ((int) simm12b_in_0 << 20) >> 20; |
| *valp = simm12b_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_simm12b_encode (uint32 *valp) |
| { |
| unsigned simm12b_in_0; |
| unsigned simm12b_out_0; |
| simm12b_out_0 = *valp; |
| simm12b_in_0 = (simm12b_out_0 & 0xfff); |
| *valp = simm12b_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_msalp32_decode (uint32 *valp) |
| { |
| unsigned msalp32_out_0; |
| unsigned msalp32_in_0; |
| msalp32_in_0 = *valp & 0x1f; |
| msalp32_out_0 = 0x20 - msalp32_in_0; |
| *valp = msalp32_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_msalp32_encode (uint32 *valp) |
| { |
| unsigned msalp32_in_0; |
| unsigned msalp32_out_0; |
| msalp32_out_0 = *valp; |
| msalp32_in_0 = (0x20 - msalp32_out_0) & 0x1f; |
| *valp = msalp32_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_op2p1_decode (uint32 *valp) |
| { |
| unsigned op2p1_out_0; |
| unsigned op2p1_in_0; |
| op2p1_in_0 = *valp & 0xf; |
| op2p1_out_0 = op2p1_in_0 + 0x1; |
| *valp = op2p1_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_op2p1_encode (uint32 *valp) |
| { |
| unsigned op2p1_in_0; |
| unsigned op2p1_out_0; |
| op2p1_out_0 = *valp; |
| op2p1_in_0 = (op2p1_out_0 - 0x1) & 0xf; |
| *valp = op2p1_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_label8_decode (uint32 *valp) |
| { |
| unsigned label8_out_0; |
| unsigned label8_in_0; |
| label8_in_0 = *valp & 0xff; |
| label8_out_0 = 0x4 + (((int) label8_in_0 << 24) >> 24); |
| *valp = label8_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_label8_encode (uint32 *valp) |
| { |
| unsigned label8_in_0; |
| unsigned label8_out_0; |
| label8_out_0 = *valp; |
| label8_in_0 = (label8_out_0 - 0x4) & 0xff; |
| *valp = label8_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_label12_decode (uint32 *valp) |
| { |
| unsigned label12_out_0; |
| unsigned label12_in_0; |
| label12_in_0 = *valp & 0xfff; |
| label12_out_0 = 0x4 + (((int) label12_in_0 << 20) >> 20); |
| *valp = label12_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_label12_encode (uint32 *valp) |
| { |
| unsigned label12_in_0; |
| unsigned label12_out_0; |
| label12_out_0 = *valp; |
| label12_in_0 = (label12_out_0 - 0x4) & 0xfff; |
| *valp = label12_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_soffset_decode (uint32 *valp) |
| { |
| unsigned soffset_out_0; |
| unsigned soffset_in_0; |
| soffset_in_0 = *valp & 0x3ffff; |
| soffset_out_0 = 0x4 + (((int) soffset_in_0 << 14) >> 14); |
| *valp = soffset_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_soffset_encode (uint32 *valp) |
| { |
| unsigned soffset_in_0; |
| unsigned soffset_out_0; |
| soffset_out_0 = *valp; |
| soffset_in_0 = (soffset_out_0 - 0x4) & 0x3ffff; |
| *valp = soffset_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimm16x4_decode (uint32 *valp) |
| { |
| unsigned uimm16x4_out_0; |
| unsigned uimm16x4_in_0; |
| uimm16x4_in_0 = *valp & 0xffff; |
| uimm16x4_out_0 = (((0xffff) << 16) | uimm16x4_in_0) << 2; |
| *valp = uimm16x4_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_uimm16x4_encode (uint32 *valp) |
| { |
| unsigned uimm16x4_in_0; |
| unsigned uimm16x4_out_0; |
| uimm16x4_out_0 = *valp; |
| uimm16x4_in_0 = (uimm16x4_out_0 >> 2) & 0xffff; |
| *valp = uimm16x4_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_bbi_decode (uint32 *valp) |
| { |
| unsigned bbi_out_0; |
| unsigned bbi_in_0; |
| bbi_in_0 = *valp & 0x1f; |
| bbi_out_0 = (0 << 5) | bbi_in_0; |
| *valp = bbi_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_bbi_encode (uint32 *valp) |
| { |
| unsigned bbi_in_0; |
| unsigned bbi_out_0; |
| bbi_out_0 = *valp; |
| bbi_in_0 = (bbi_out_0 & 0x1f); |
| *valp = bbi_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_s_decode (uint32 *valp) |
| { |
| unsigned s_out_0; |
| unsigned s_in_0; |
| s_in_0 = *valp & 0xf; |
| s_out_0 = (0 << 4) | s_in_0; |
| *valp = s_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_s_encode (uint32 *valp) |
| { |
| unsigned s_in_0; |
| unsigned s_out_0; |
| s_out_0 = *valp; |
| s_in_0 = (s_out_0 & 0xf); |
| *valp = s_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_immt_decode (uint32 *valp) |
| { |
| unsigned immt_out_0; |
| unsigned immt_in_0; |
| immt_in_0 = *valp & 0xf; |
| immt_out_0 = immt_in_0; |
| *valp = immt_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_immt_encode (uint32 *valp) |
| { |
| unsigned immt_in_0; |
| unsigned immt_out_0; |
| immt_out_0 = *valp; |
| immt_in_0 = immt_out_0 & 0xf; |
| *valp = immt_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_tp7_decode (uint32 *valp) |
| { |
| unsigned tp7_out_0; |
| unsigned tp7_in_0; |
| tp7_in_0 = *valp & 0xf; |
| tp7_out_0 = tp7_in_0 + 0x7; |
| *valp = tp7_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_tp7_encode (uint32 *valp) |
| { |
| unsigned tp7_in_0; |
| unsigned tp7_out_0; |
| tp7_out_0 = *valp; |
| tp7_in_0 = (tp7_out_0 - 0x7) & 0xf; |
| *valp = tp7_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_xt_wbr15_label_decode (uint32 *valp) |
| { |
| unsigned xt_wbr15_label_out_0; |
| unsigned xt_wbr15_label_in_0; |
| xt_wbr15_label_in_0 = *valp & 0x7fff; |
| xt_wbr15_label_out_0 = 0x4 + (((int) xt_wbr15_label_in_0 << 17) >> 17); |
| *valp = xt_wbr15_label_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_xt_wbr15_label_encode (uint32 *valp) |
| { |
| unsigned xt_wbr15_label_in_0; |
| unsigned xt_wbr15_label_out_0; |
| xt_wbr15_label_out_0 = *valp; |
| xt_wbr15_label_in_0 = (xt_wbr15_label_out_0 - 0x4) & 0x7fff; |
| *valp = xt_wbr15_label_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_xt_wbr18_label_decode (uint32 *valp) |
| { |
| unsigned xt_wbr18_label_out_0; |
| unsigned xt_wbr18_label_in_0; |
| xt_wbr18_label_in_0 = *valp & 0x3ffff; |
| xt_wbr18_label_out_0 = 0x4 + (((int) xt_wbr18_label_in_0 << 14) >> 14); |
| *valp = xt_wbr18_label_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_xt_wbr18_label_encode (uint32 *valp) |
| { |
| unsigned xt_wbr18_label_in_0; |
| unsigned xt_wbr18_label_out_0; |
| xt_wbr18_label_out_0 = *valp; |
| xt_wbr18_label_in_0 = (xt_wbr18_label_out_0 - 0x4) & 0x3ffff; |
| *valp = xt_wbr18_label_in_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_bitindex_decode (uint32 *valp) |
| { |
| unsigned bitindex_out_0; |
| unsigned bitindex_in_0; |
| bitindex_in_0 = *valp & 0x1f; |
| bitindex_out_0 = (0 << 5) | bitindex_in_0; |
| *valp = bitindex_out_0; |
| return 0; |
| } |
| |
| static int |
| OperandSem_opnd_sem_bitindex_encode (uint32 *valp) |
| { |
| unsigned bitindex_in_0; |
| unsigned bitindex_out_0; |
| bitindex_out_0 = *valp; |
| bitindex_in_0 = (bitindex_out_0 & 0x1f); |
| *valp = bitindex_in_0; |
| return 0; |
| } |
| |
| static int |
| Operand_soffsetx4_ator (uint32 *valp, uint32 pc) |
| { |
| *valp -= (pc & ~0x3); |
| return 0; |
| } |
| |
| static int |
| Operand_soffsetx4_rtoa (uint32 *valp, uint32 pc) |
| { |
| *valp += (pc & ~0x3); |
| return 0; |
| } |
| |
| static int |
| Operand_uimm6_ator (uint32 *valp, uint32 pc) |
| { |
| *valp -= pc; |
| return 0; |
| } |
| |
| static int |
| Operand_uimm6_rtoa (uint32 *valp, uint32 pc) |
| { |
| *valp += pc; |
| return 0; |
| } |
| |
| static int |
| Operand_label8_ator (uint32 *valp, uint32 pc) |
| { |
| *valp -= pc; |
| return 0; |
| } |
| |
| static int |
| Operand_label8_rtoa (uint32 *valp, uint32 pc) |
| { |
| *valp += pc; |
| return 0; |
| } |
| |
| static int |
| Operand_label12_ator (uint32 *valp, uint32 pc) |
| { |
| *valp -= pc; |
| return 0; |
| } |
| |
| static int |
| Operand_label12_rtoa (uint32 *valp, uint32 pc) |
| { |
| *valp += pc; |
| return 0; |
| } |
| |
| static int |
| Operand_soffset_ator (uint32 *valp, uint32 pc) |
| { |
| *valp -= pc; |
| return 0; |
| } |
| |
| static int |
| Operand_soffset_rtoa (uint32 *valp, uint32 pc) |
| { |
| *valp += pc; |
| return 0; |
| } |
| |
| static int |
| Operand_uimm16x4_ator (uint32 *valp, uint32 pc) |
| { |
| *valp -= ((pc + 3) & ~0x3); |
| return 0; |
| } |
| |
| static int |
| Operand_uimm16x4_rtoa (uint32 *valp, uint32 pc) |
| { |
| *valp += ((pc + 3) & ~0x3); |
| return 0; |
| } |
| |
| static int |
| Operand_xt_wbr15_label_ator (uint32 *valp, uint32 pc) |
| { |
| *valp -= pc; |
| return 0; |
| } |
| |
| static int |
| Operand_xt_wbr15_label_rtoa (uint32 *valp, uint32 pc) |
| { |
| *valp += pc; |
| return 0; |
| } |
| |
| static int |
| Operand_xt_wbr18_label_ator (uint32 *valp, uint32 pc) |
| { |
| *valp -= pc; |
| return 0; |
| } |
| |
| static int |
| Operand_xt_wbr18_label_rtoa (uint32 *valp, uint32 pc) |
| { |
| *valp += pc; |
| return 0; |
| } |
| |
| static xtensa_operand_internal operands[] = { |
| { "soffsetx4", FIELD_offset, -1, 0, |
| XTENSA_OPERAND_IS_PCRELATIVE, |
| OperandSem_opnd_sem_soffsetx4_encode, OperandSem_opnd_sem_soffsetx4_decode, |
| Operand_soffsetx4_ator, Operand_soffsetx4_rtoa }, |
| { "uimm12x8", FIELD_imm12, -1, 0, |
| 0, |
| OperandSem_opnd_sem_uimm12x8_encode, OperandSem_opnd_sem_uimm12x8_decode, |
| 0, 0 }, |
| { "simm4", FIELD_mn, -1, 0, |
| 0, |
| OperandSem_opnd_sem_simm4_encode, OperandSem_opnd_sem_simm4_decode, |
| 0, 0 }, |
| { "arr", FIELD_r, REGFILE_AR, 1, |
| XTENSA_OPERAND_IS_REGISTER, |
| OperandSem_opnd_sem_AR_encode, OperandSem_opnd_sem_AR_decode, |
| 0, 0 }, |
| { "ars", FIELD_s, REGFILE_AR, 1, |
| XTENSA_OPERAND_IS_REGISTER, |
| OperandSem_opnd_sem_AR_encode, OperandSem_opnd_sem_AR_decode, |
| 0, 0 }, |
| { "*ars_invisible", FIELD_s, REGFILE_AR, 1, |
| XTENSA_OPERAND_IS_REGISTER | XTENSA_OPERAND_IS_INVISIBLE, |
| OperandSem_opnd_sem_AR_encode, OperandSem_opnd_sem_AR_decode, |
| 0, 0 }, |
| { "art", FIELD_t, REGFILE_AR, 1, |
| XTENSA_OPERAND_IS_REGISTER, |
| OperandSem_opnd_sem_AR_encode, OperandSem_opnd_sem_AR_decode, |
| 0, 0 }, |
| { "ar0", FIELD__ar0, REGFILE_AR, 1, |
| XTENSA_OPERAND_IS_REGISTER | XTENSA_OPERAND_IS_INVISIBLE, |
| OperandSem_opnd_sem_AR_0_encode, OperandSem_opnd_sem_AR_0_decode, |
| 0, 0 }, |
| { "ar4", FIELD__ar4, REGFILE_AR, 1, |
| XTENSA_OPERAND_IS_REGISTER | XTENSA_OPERAND_IS_INVISIBLE, |
| OperandSem_opnd_sem_AR_1_encode, OperandSem_opnd_sem_AR_1_decode, |
| 0, 0 }, |
| { "ar8", FIELD__ar8, REGFILE_AR, 1, |
| XTENSA_OPERAND_IS_REGISTER | XTENSA_OPERAND_IS_INVISIBLE, |
| OperandSem_opnd_sem_AR_2_encode, OperandSem_opnd_sem_AR_2_decode, |
| 0, 0 }, |
| { "ar12", FIELD__ar12, REGFILE_AR, 1, |
| XTENSA_OPERAND_IS_REGISTER | XTENSA_OPERAND_IS_INVISIBLE, |
| OperandSem_opnd_sem_AR_3_encode, OperandSem_opnd_sem_AR_3_decode, |
| 0, 0 }, |
| { "ars_entry", FIELD_s, REGFILE_AR, 1, |
| XTENSA_OPERAND_IS_REGISTER, |
| OperandSem_opnd_sem_AR_4_encode, OperandSem_opnd_sem_AR_4_decode, |
| 0, 0 }, |
| { "immrx4", FIELD_r, -1, 0, |
| 0, |
| OperandSem_opnd_sem_immrx4_encode, OperandSem_opnd_sem_immrx4_decode, |
| 0, 0 }, |
| { "lsi4x4", FIELD_r, -1, 0, |
| 0, |
| OperandSem_opnd_sem_lsi4x4_encode, OperandSem_opnd_sem_lsi4x4_decode, |
| 0, 0 }, |
| { "simm7", FIELD_imm7, -1, 0, |
| 0, |
| OperandSem_opnd_sem_simm7_encode, OperandSem_opnd_sem_simm7_decode, |
| 0, 0 }, |
| { "uimm6", FIELD_imm6, -1, 0, |
| XTENSA_OPERAND_IS_PCRELATIVE, |
| OperandSem_opnd_sem_uimm6_encode, OperandSem_opnd_sem_uimm6_decode, |
| Operand_uimm6_ator, Operand_uimm6_rtoa }, |
| { "ai4const", FIELD_t, -1, 0, |
| 0, |
| OperandSem_opnd_sem_ai4const_encode, OperandSem_opnd_sem_ai4const_decode, |
| 0, 0 }, |
| { "b4const", FIELD_r, -1, 0, |
| 0, |
| OperandSem_opnd_sem_b4const_encode, OperandSem_opnd_sem_b4const_decode, |
| 0, 0 }, |
| { "b4constu", FIELD_r, -1, 0, |
| 0, |
| OperandSem_opnd_sem_b4constu_encode, OperandSem_opnd_sem_b4constu_decode, |
| 0, 0 }, |
| { "uimm8", FIELD_imm8, -1, 0, |
| 0, |
| OperandSem_opnd_sem_uimm8_encode, OperandSem_opnd_sem_uimm8_decode, |
| 0, 0 }, |
| { "uimm8x2", FIELD_imm8, -1, 0, |
| 0, |
| OperandSem_opnd_sem_uimm8x2_encode, OperandSem_opnd_sem_uimm8x2_decode, |
| 0, 0 }, |
| { "uimm8x4", FIELD_imm8, -1, 0, |
| 0, |
| OperandSem_opnd_sem_uimm8x4_encode, OperandSem_opnd_sem_uimm8x4_decode, |
| 0, 0 }, |
| { "uimm4x16", FIELD_op2, -1, 0, |
| 0, |
| OperandSem_opnd_sem_uimm4x16_encode, OperandSem_opnd_sem_uimm4x16_decode, |
| 0, 0 }, |
| { "uimmrx4", FIELD_r, -1, 0, |
| 0, |
| OperandSem_opnd_sem_uimmrx4_encode, OperandSem_opnd_sem_uimmrx4_decode, |
| 0, 0 }, |
| { "simm8", FIELD_imm8, -1, 0, |
| 0, |
| OperandSem_opnd_sem_simm8_encode, OperandSem_opnd_sem_simm8_decode, |
| 0, 0 }, |
| { "simm8x256", FIELD_imm8, -1, 0, |
| 0, |
| OperandSem_opnd_sem_simm8x256_encode, OperandSem_opnd_sem_simm8x256_decode, |
| 0, 0 }, |
| { "simm12b", FIELD_imm12b, -1, 0, |
| 0, |
| OperandSem_opnd_sem_simm12b_encode, OperandSem_opnd_sem_simm12b_decode, |
| 0, 0 }, |
| { "msalp32", FIELD_sal, -1, 0, |
| 0, |
| OperandSem_opnd_sem_msalp32_encode, OperandSem_opnd_sem_msalp32_decode, |
| 0, 0 }, |
| { "op2p1", FIELD_op2, -1, 0, |
| 0, |
| OperandSem_opnd_sem_op2p1_encode, OperandSem_opnd_sem_op2p1_decode, |
| 0, 0 }, |
| { "label8", FIELD_imm8, -1, 0, |
| XTENSA_OPERAND_IS_PCRELATIVE, |
| OperandSem_opnd_sem_label8_encode, OperandSem_opnd_sem_label8_decode, |
| Operand_label8_ator, Operand_label8_rtoa }, |
| { "label12", FIELD_imm12, -1, 0, |
| XTENSA_OPERAND_IS_PCRELATIVE, |
| OperandSem_opnd_sem_label12_encode, OperandSem_opnd_sem_label12_decode, |
| Operand_label12_ator, Operand_label12_rtoa }, |
| { "soffset", FIELD_offset, -1, 0, |
| XTENSA_OPERAND_IS_PCRELATIVE, |
| OperandSem_opnd_sem_soffset_encode, OperandSem_opnd_sem_soffset_decode, |
| Operand_soffset_ator, Operand_soffset_rtoa }, |
| { "uimm16x4", FIELD_imm16, -1, 0, |
| XTENSA_OPERAND_IS_PCRELATIVE, |
| OperandSem_opnd_sem_uimm16x4_encode, OperandSem_opnd_sem_uimm16x4_decode, |
| Operand_uimm16x4_ator, Operand_uimm16x4_rtoa }, |
| { "bbi", FIELD_bbi, -1, 0, |
| 0, |
| OperandSem_opnd_sem_bbi_encode, OperandSem_opnd_sem_bbi_decode, |
| 0, 0 }, |
| { "sae", FIELD_sae, -1, 0, |
| 0, |
| OperandSem_opnd_sem_bbi_encode, OperandSem_opnd_sem_bbi_decode, |
| 0, 0 }, |
| { "sas", FIELD_sas, -1, 0, |
| 0, |
| OperandSem_opnd_sem_bbi_encode, OperandSem_opnd_sem_bbi_decode, |
| 0, 0 }, |
| { "sargt", FIELD_sargt, -1, 0, |
| 0, |
| OperandSem_opnd_sem_bbi_encode, OperandSem_opnd_sem_bbi_decode, |
| 0, 0 }, |
| { "s", FIELD_s, -1, 0, |
| 0, |
| OperandSem_opnd_sem_s_encode, OperandSem_opnd_sem_s_decode, |
| 0, 0 }, |
| { "immt", FIELD_t, -1, 0, |
| 0, |
| OperandSem_opnd_sem_immt_encode, OperandSem_opnd_sem_immt_decode, |
| 0, 0 }, |
| { "imms", FIELD_s, -1, 0, |
| 0, |
| OperandSem_opnd_sem_immt_encode, OperandSem_opnd_sem_immt_decode, |
| 0, 0 }, |
| { "tp7", FIELD_t, -1, 0, |
| 0, |
| OperandSem_opnd_sem_tp7_encode, OperandSem_opnd_sem_tp7_decode, |
| 0, 0 }, |
| { "xt_wbr15_label", FIELD_xt_wbr15_imm, -1, 0, |
| XTENSA_OPERAND_IS_PCRELATIVE, |
| OperandSem_opnd_sem_xt_wbr15_label_encode, OperandSem_opnd_sem_xt_wbr15_label_decode, |
| Operand_xt_wbr15_label_ator, Operand_xt_wbr15_label_rtoa }, |
| { "xt_wbr18_label", FIELD_xt_wbr18_imm, -1, 0, |
| XTENSA_OPERAND_IS_PCRELATIVE, |
| OperandSem_opnd_sem_xt_wbr18_label_encode, OperandSem_opnd_sem_xt_wbr18_label_decode, |
| Operand_xt_wbr18_label_ator, Operand_xt_wbr18_label_rtoa }, |
| { "bitindex", FIELD_bitindex, -1, 0, |
| 0, |
| OperandSem_opnd_sem_bitindex_encode, OperandSem_opnd_sem_bitindex_decode, |
| 0, 0 }, |
| { "t", FIELD_t, -1, 0, 0, 0, 0, 0, 0 }, |
| { "bbi4", FIELD_bbi4, -1, 0, 0, 0, 0, 0, 0 }, |
| { "imm12", FIELD_imm12, -1, 0, 0, 0, 0, 0, 0 }, |
| { "imm8", FIELD_imm8, -1, 0, 0, 0, 0, 0, 0 }, |
| { "imm12b", FIELD_imm12b, -1, 0, 0, 0, 0, 0, 0 }, |
| { "imm16", FIELD_imm16, -1, 0, 0, 0, 0, 0, 0 }, |
| { "m", FIELD_m, -1, 0, 0, 0, 0, 0, 0 }, |
| { "n", FIELD_n, -1, 0, 0, 0, 0, 0, 0 }, |
| { "offset", FIELD_offset, -1, 0, 0, 0, 0, 0, 0 }, |
| { "op0", FIELD_op0, -1, 0, 0, 0, 0, 0, 0 }, |
| { "op1", FIELD_op1, -1, 0, 0, 0, 0, 0, 0 }, |
| { "op2", FIELD_op2, -1, 0, 0, 0, 0, 0, 0 }, |
| { "r", FIELD_r, -1, 0, 0, 0, 0, 0, 0 }, |
| { "sa4", FIELD_sa4, -1, 0, 0, 0, 0, 0, 0 }, |
| { "sae4", FIELD_sae4, -1, 0, 0, 0, 0, 0, 0 }, |
| { "sal", FIELD_sal, -1, 0, 0, 0, 0, 0, 0 }, |
| { "sas4", FIELD_sas4, -1, 0, 0, 0, 0, 0, 0 }, |
| { "sr", FIELD_sr, -1, 0, 0, 0, 0, 0, 0 }, |
| { "st", FIELD_st, -1, 0, 0, 0, 0, 0, 0 }, |
| { "thi3", FIELD_thi3, -1, 0, 0, 0, 0, 0, 0 }, |
| { "imm4", FIELD_imm4, -1, 0, 0, 0, 0, 0, 0 }, |
| { "mn", FIELD_mn, -1, 0, 0, 0, 0, 0, 0 }, |
| { "i", FIELD_i, -1, 0, 0, 0, 0, 0, 0 }, |
| { "imm6lo", FIELD_imm6lo, -1, 0, 0, 0, 0, 0, 0 }, |
| { "imm6hi", FIELD_imm6hi, -1, 0, 0, 0, 0, 0, 0 }, |
| { "imm7lo", FIELD_imm7lo, -1, 0, 0, 0, 0, 0, 0 }, |
| { "imm7hi", FIELD_imm7hi, -1, 0, 0, 0, 0, 0, 0 }, |
| { "z", FIELD_z, -1, 0, 0, 0, 0, 0, 0 }, |
| { "imm6", FIELD_imm6, -1, 0, 0, 0, 0, 0, 0 }, |
| { "imm7", FIELD_imm7, -1, 0, 0, 0, 0, 0, 0 }, |
| { "xt_wbr15_imm", FIELD_xt_wbr15_imm, -1, 0, 0, 0, 0, 0, 0 }, |
| { "xt_wbr18_imm", FIELD_xt_wbr18_imm, -1, 0, 0, 0, 0, 0, 0 }, |
| { "s3to1", FIELD_s3to1, -1, 0, 0, 0, 0, 0, 0 } |
| }; |
| |
| enum xtensa_operand_id { |
| OPERAND_soffsetx4, |
| OPERAND_uimm12x8, |
| OPERAND_simm4, |
| OPERAND_arr, |
| OPERAND_ars, |
| OPERAND__ars_invisible, |
| OPERAND_art, |
| OPERAND_ar0, |
| OPERAND_ar4, |
| OPERAND_ar8, |
| OPERAND_ar12, |
| OPERAND_ars_entry, |
| OPERAND_immrx4, |
| OPERAND_lsi4x4, |
| OPERAND_simm7, |
| OPERAND_uimm6, |
| OPERAND_ai4const, |
| OPERAND_b4const, |
| OPERAND_b4constu, |
| OPERAND_uimm8, |
| OPERAND_uimm8x2, |
| OPERAND_uimm8x4, |
| OPERAND_uimm4x16, |
| OPERAND_uimmrx4, |
| OPERAND_simm8, |
| OPERAND_simm8x256, |
| OPERAND_simm12b, |
| OPERAND_msalp32, |
| OPERAND_op2p1, |
| OPERAND_label8, |
| OPERAND_label12, |
| OPERAND_soffset, |
| OPERAND_uimm16x4, |
| OPERAND_bbi, |
| OPERAND_sae, |
| OPERAND_sas, |
| OPERAND_sargt, |
| OPERAND_s, |
| OPERAND_immt, |
| OPERAND_imms, |
| OPERAND_tp7, |
| OPERAND_xt_wbr15_label, |
| OPERAND_xt_wbr18_label, |
| OPERAND_bitindex, |
| OPERAND_t, |
| OPERAND_bbi4, |
| OPERAND_imm12, |
| OPERAND_imm8, |
| OPERAND_imm12b, |
| OPERAND_imm16, |
| OPERAND_m, |
| OPERAND_n, |
| OPERAND_offset, |
| OPERAND_op0, |
| OPERAND_op1, |
| OPERAND_op2, |
| OPERAND_r, |
| OPERAND_sa4, |
| OPERAND_sae4, |
| OPERAND_sal, |
| OPERAND_sas4, |
| OPERAND_sr, |
| OPERAND_st, |
| OPERAND_thi3, |
| OPERAND_imm4, |
| OPERAND_mn, |
| OPERAND_i, |
| OPERAND_imm6lo, |
| OPERAND_imm6hi, |
| OPERAND_imm7lo, |
| OPERAND_imm7hi, |
| OPERAND_z, |
| OPERAND_imm6, |
| OPERAND_imm7, |
| OPERAND_xt_wbr15_imm, |
| OPERAND_xt_wbr18_imm, |
| OPERAND_s3to1 |
| }; |
| |
| |
| /* Iclass table. */ |
| |
| static xtensa_arg_internal Iclass_xt_iclass_rfe_stateArgs[] = { |
| { { STATE_PSEXCM }, 'o' }, |
| { { STATE_EPC1 }, 'i' } |
| }; |
| |
| static xtensa_arg_internal Iclass_xt_iclass_rfde_stateArgs[] = { |
| { { STATE_DEPC }, 'i' } |
| }; |
| |
| static xtensa_arg_internal Iclass_xt_iclass_call12_args[] = { |
| { { OPERAND_soffsetx4 }, 'i' }, |
| { { OPERAND_ar12 }, 'o' } |
| }; |
| |
| static xtensa_arg_internal Iclass_xt_iclass_call12_stateArgs[] = { |
| { { STATE_PSCALLINC }, 'o' } |
| }; |
| |
| static xtensa_arg_internal Iclass_xt_iclass_call8_args[] = { |
| { { OPERAND_soffsetx4 }, 'i' }, |
| { { OPERAND_ar8 }, 'o' } |
| }; |
| |
| static xtensa_arg_internal Iclass_xt_iclass_call8_stateArgs[] = { |
| { { STATE_PSCALLINC }, 'o' } |
| }; |
| |
| static xtensa_arg_internal Iclass_xt_iclass_call4_args[] = { |
| { { OPERAND_soffsetx4 }, 'i' }, |
| { { OPERAND_ar4 }, 'o' } |
| }; |
| |
| static xtensa_arg_internal Iclass_xt_iclass_call4_stateArgs[] = { |
| { { STATE_PSCALLINC }, 'o' } |
| }; |
| |
| static xtensa_arg_internal Iclass_xt_iclass_callx12_args[] = { |
| { { OPERAND_ars }, 'i' }, |
| { { OPERAND_ar12 }, 'o' } |
| }; |
| |
| static xtensa_arg_internal Iclass_xt_iclass_callx12_stateArgs[] = { |
| { { STATE_PSCALLINC }, 'o' } |
| }; |
| |
| static xtensa_arg_internal Iclass_xt_iclass_callx8_args[] = { |
| { { OPERAND_ars }, 'i' }, |
| { { OPERAND_ar8 }, 'o' } |
| }; |
| |
| |