qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 4/9] adding instructions encodings for LE and BE com


From: Michael Rolnik
Subject: [Qemu-devel] [PATCH 4/9] adding instructions encodings for LE and BE compilers.
Date: Sun, 29 May 2016 18:23:03 -0700

    I am aware of bad portability of bit fields as compilers
    for LE and BE hosts lists bit fields in different order
    However they won't "parse" in target memory but a data prepared by me

Signed-off-by: Michael Rolnik <address@hidden>
---
 target-avr/inst-be.h | 1018 ++++++++++++++++++++++++++++++++++++++++++++++++++
 target-avr/inst-le.h | 1018 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 2036 insertions(+)
 create mode 100644 target-avr/inst-be.h
 create mode 100644 target-avr/inst-le.h

diff --git a/target-avr/inst-be.h b/target-avr/inst-be.h
new file mode 100644
index 0000000..99897c0
--- /dev/null
+++ b/target-avr/inst-be.h
@@ -0,0 +1,1018 @@
+/*
+ * QEMU AVR CPU
+ *
+ * Copyright (c) 2016 Michael Rolnik
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see
+ * <http://www.gnu.org/licenses/lgpl-2.1.html>
+ */
+
+
+typedef struct DisasContext    DisasContext;
+typedef struct CPUAVRState     CPUAVRState;
+
+typedef union avr_opcode_NOP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 0000000000000000 */
+    };
+} avr_opcode_NOP_t;
+int     avr_translate_NOP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_NOP_t const *inst);
+
+typedef union avr_opcode_MOVW_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:8; /* 00000001 */
+        uint16_t    Rd:4;
+        uint16_t    Rr:4;
+    };
+} avr_opcode_MOVW_t;
+int     avr_translate_MOVW(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_MOVW_t const *inst);
+
+typedef union avr_opcode_MULS_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:8; /* 00000010 */
+        uint16_t    Rd:4;
+        uint16_t    Rr:4;
+    };
+} avr_opcode_MULS_t;
+int     avr_translate_MULS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_MULS_t const *inst);
+
+typedef union avr_opcode_MULSU_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:9; /* 000000110 */
+        uint16_t    Rd:3;
+        uint16_t:1; /* 0 */
+        uint16_t    Rr:3;
+    };
+} avr_opcode_MULSU_t;
+int     avr_translate_MULSU(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_MULSU_t const *inst);
+
+typedef union avr_opcode_FMUL_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:9; /* 000000110 */
+        uint16_t    Rd:3;
+        uint16_t:1; /* 1 */
+        uint16_t    Rr:3;
+    };
+} avr_opcode_FMUL_t;
+int     avr_translate_FMUL(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_FMUL_t const *inst);
+
+typedef union avr_opcode_FMULS_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:9; /* 000000111 */
+        uint16_t    Rd:3;
+        uint16_t:1; /* 0 */
+        uint16_t    Rr:3;
+    };
+} avr_opcode_FMULS_t;
+int     avr_translate_FMULS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_FMULS_t const *inst);
+
+typedef union avr_opcode_FMULSU_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:9; /* 000000111 */
+        uint16_t    Rd:3;
+        uint16_t:1; /* 1 */
+        uint16_t    Rr:3;
+    };
+} avr_opcode_FMULSU_t;
+int     avr_translate_FMULSU(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_FMULSU_t const *inst);
+
+typedef union avr_opcode_CPC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:6; /* 000001 */
+        uint16_t    hRr:1;
+        uint16_t    Rd:5;
+        uint16_t    lRr:4;
+    };
+} avr_opcode_CPC_t;
+int     avr_translate_CPC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_CPC_t const *inst);
+
+typedef union avr_opcode_SBC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:6; /* 000010 */
+        uint16_t    hRr:1;
+        uint16_t    Rd:5;
+        uint16_t    lRr:4;
+    };
+} avr_opcode_SBC_t;
+int     avr_translate_SBC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBC_t const *inst);
+
+typedef union avr_opcode_ADD_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:6; /* 000011 */
+        uint16_t    hRr:1;
+        uint16_t    Rd:5;
+        uint16_t    lRr:4;
+    };
+} avr_opcode_ADD_t;
+int     avr_translate_ADD(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ADD_t const *inst);
+
+typedef union avr_opcode_AND_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:6; /* 001000 */
+        uint16_t    hRr:1;
+        uint16_t    Rd:5;
+        uint16_t    lRr:4;
+    };
+} avr_opcode_AND_t;
+int     avr_translate_AND(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_AND_t const *inst);
+
+typedef union avr_opcode_EOR_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:6; /* 001001 */
+        uint16_t    hRr:1;
+        uint16_t    Rd:5;
+        uint16_t    lRr:4;
+    };
+} avr_opcode_EOR_t;
+int     avr_translate_EOR(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_EOR_t const *inst);
+
+typedef union avr_opcode_OR_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:6; /* 001010 */
+        uint16_t    hRr:1;
+        uint16_t    Rd:5;
+        uint16_t    lRr:4;
+    };
+} avr_opcode_OR_t;
+int     avr_translate_OR(CPUAVRState *env, DisasContext *ctx, avr_opcode_OR_t 
const *inst);
+
+typedef union avr_opcode_MOV_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:6; /* 001011 */
+        uint16_t    hRr:1;
+        uint16_t    Rd:5;
+        uint16_t    lRr:4;
+    };
+} avr_opcode_MOV_t;
+int     avr_translate_MOV(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_MOV_t const *inst);
+
+typedef union avr_opcode_CPSE_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:6; /* 000100 */
+        uint16_t    hRr:1;
+        uint16_t    Rd:5;
+        uint16_t    lRr:4;
+    };
+} avr_opcode_CPSE_t;
+int     avr_translate_CPSE(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_CPSE_t const *inst);
+
+typedef union avr_opcode_CP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:6; /* 000101 */
+        uint16_t    hRr:1;
+        uint16_t    Rd:5;
+        uint16_t    lRr:4;
+    };
+} avr_opcode_CP_t;
+int     avr_translate_CP(CPUAVRState *env, DisasContext *ctx, avr_opcode_CP_t 
const *inst);
+
+typedef union avr_opcode_SUB_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:6; /* 000110 */
+        uint16_t    hRr:1;
+        uint16_t    Rd:5;
+        uint16_t    lRr:4;
+    };
+} avr_opcode_SUB_t;
+int     avr_translate_SUB(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SUB_t const *inst);
+
+typedef union avr_opcode_ADC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:6; /* 000111 */
+        uint16_t    hRr:1;
+        uint16_t    Rd:5;
+        uint16_t    lRr:4;
+    };
+} avr_opcode_ADC_t;
+int     avr_translate_ADC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ADC_t const *inst);
+
+typedef union avr_opcode_CPI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0011 */
+        uint16_t    hImm:4;
+        uint16_t    Rd:4;
+        uint16_t    lImm:4;
+    };
+} avr_opcode_CPI_t;
+int     avr_translate_CPI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_CPI_t const *inst);
+
+typedef union avr_opcode_SBCI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0100 */
+        uint16_t    hImm:4;
+        uint16_t    Rd:4;
+        uint16_t    lImm:4;
+    };
+} avr_opcode_SBCI_t;
+int     avr_translate_SBCI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBCI_t const *inst);
+
+typedef union avr_opcode_ORI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0110 */
+        uint16_t    hImm:4;
+        uint16_t    Rd:4;
+        uint16_t    lImm:4;
+    };
+} avr_opcode_ORI_t;
+int     avr_translate_ORI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ORI_t const *inst);
+
+typedef union avr_opcode_SUBI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0101 */
+        uint16_t    hImm:4;
+        uint16_t    Rd:4;
+        uint16_t    lImm:4;
+    };
+} avr_opcode_SUBI_t;
+int     avr_translate_SUBI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SUBI_t const *inst);
+
+typedef union avr_opcode_ANDI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0111 */
+        uint16_t    hImm:4;
+        uint16_t    Rd:4;
+        uint16_t    lImm:4;
+    };
+} avr_opcode_ANDI_t;
+int     avr_translate_ANDI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ANDI_t const *inst);
+
+typedef union avr_opcode_LDDZ_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:2; /* 10 */
+        uint16_t    hImm:1;
+        uint16_t:1; /* 0 */
+        uint16_t    mImm:2;
+        uint16_t:1; /* 0 */
+        uint16_t    Rd:5;
+        uint16_t:1; /* 0 */
+        uint16_t    lImm:3;
+    };
+} avr_opcode_LDDZ_t;
+int     avr_translate_LDDZ(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDDZ_t const *inst);
+
+typedef union avr_opcode_LDDY_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:2; /* 10 */
+        uint16_t    hImm:1;
+        uint16_t:1; /* 0 */
+        uint16_t    mImm:2;
+        uint16_t:1; /* 0 */
+        uint16_t    Rd:5;
+        uint16_t:1; /* 1 */
+        uint16_t    lImm:3;
+    };
+} avr_opcode_LDDY_t;
+int     avr_translate_LDDY(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDDY_t const *inst);
+
+typedef union avr_opcode_STDZ_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:2; /* 10 */
+        uint16_t    hImm:1;
+        uint16_t:1; /* 0 */
+        uint16_t    mImm:2;
+        uint16_t:1; /* 1 */
+        uint16_t    Rd:5;
+        uint16_t:1; /* 0 */
+        uint16_t    lImm:3;
+    };
+} avr_opcode_STDZ_t;
+int     avr_translate_STDZ(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STDZ_t const *inst);
+
+typedef union avr_opcode_STDY_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:2; /* 10 */
+        uint16_t    hImm:1;
+        uint16_t:1; /* 0 */
+        uint16_t    mImm:2;
+        uint16_t:1; /* 1 */
+        uint16_t    Rd:5;
+        uint16_t:1; /* 1 */
+        uint16_t    lImm:3;
+    };
+} avr_opcode_STDY_t;
+int     avr_translate_STDY(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STDY_t const *inst);
+
+typedef union avr_opcode_LDS_u {
+    uint32_t    opcode;
+    struct {
+        uint32_t:7; /* 1001000 */
+        uint32_t    Rd:5;
+        uint32_t:4; /* 0000 */
+        uint32_t    Imm:16;
+    };
+} avr_opcode_LDS_t;
+int     avr_translate_LDS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDS_t const *inst);
+
+typedef union avr_opcode_LDZ2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001000 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0001 */
+    };
+} avr_opcode_LDZ2_t;
+int     avr_translate_LDZ2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDZ2_t const *inst);
+
+typedef union avr_opcode_LDZ3_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001000 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0010 */
+    };
+} avr_opcode_LDZ3_t;
+int     avr_translate_LDZ3(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDZ3_t const *inst);
+
+typedef union avr_opcode_LPM2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001000 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0100 */
+    };
+} avr_opcode_LPM2_t;
+int     avr_translate_LPM2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LPM2_t const *inst);
+
+typedef union avr_opcode_LPMX_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001000 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0101 */
+    };
+} avr_opcode_LPMX_t;
+int     avr_translate_LPMX(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LPMX_t const *inst);
+
+typedef union avr_opcode_ELPM2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001000 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0110 */
+    };
+} avr_opcode_ELPM2_t;
+int     avr_translate_ELPM2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ELPM2_t const *inst);
+
+typedef union avr_opcode_ELPMX_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001000 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0111 */
+    };
+} avr_opcode_ELPMX_t;
+int     avr_translate_ELPMX(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ELPMX_t const *inst);
+
+typedef union avr_opcode_LDY2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001000 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 1001 */
+    };
+} avr_opcode_LDY2_t;
+int     avr_translate_LDY2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDY2_t const *inst);
+
+typedef union avr_opcode_LDY3_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001000 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 1010 */
+    };
+} avr_opcode_LDY3_t;
+int     avr_translate_LDY3(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDY3_t const *inst);
+
+typedef union avr_opcode_LDX1_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001000 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 1100 */
+    };
+} avr_opcode_LDX1_t;
+int     avr_translate_LDX1(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDX1_t const *inst);
+
+typedef union avr_opcode_LDX2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001000 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 1101 */
+    };
+} avr_opcode_LDX2_t;
+int     avr_translate_LDX2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDX2_t const *inst);
+
+typedef union avr_opcode_LDX3_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001000 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 1110 */
+    };
+} avr_opcode_LDX3_t;
+int     avr_translate_LDX3(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDX3_t const *inst);
+
+typedef union avr_opcode_POP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001000 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 1111 */
+    };
+} avr_opcode_POP_t;
+int     avr_translate_POP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_POP_t const *inst);
+
+typedef union avr_opcode_STS_u {
+    uint32_t    opcode;
+    struct {
+        uint32_t:7; /* 1001001 */
+        uint32_t    Rd:5;
+        uint32_t:4; /* 0000 */
+        uint32_t    Imm:16;
+    };
+} avr_opcode_STS_t;
+int     avr_translate_STS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STS_t const *inst);
+
+typedef union avr_opcode_STZ2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001001 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0001 */
+    };
+} avr_opcode_STZ2_t;
+int     avr_translate_STZ2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STZ2_t const *inst);
+
+typedef union avr_opcode_STZ3_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001001 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0010 */
+    };
+} avr_opcode_STZ3_t;
+int     avr_translate_STZ3(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STZ3_t const *inst);
+
+typedef union avr_opcode_XCH_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001001 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0100 */
+    };
+} avr_opcode_XCH_t;
+int     avr_translate_XCH(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_XCH_t const *inst);
+
+typedef union avr_opcode_LAS_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001001 */
+        uint16_t    Rr:5;
+        uint16_t:4; /* 0101 */
+    };
+} avr_opcode_LAS_t;
+int     avr_translate_LAS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LAS_t const *inst);
+
+typedef union avr_opcode_LAC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001001 */
+        uint16_t    Rr:5;
+        uint16_t:4; /* 0110 */
+    };
+} avr_opcode_LAC_t;
+int     avr_translate_LAC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LAC_t const *inst);
+
+typedef union avr_opcode_LAT_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001001 */
+        uint16_t    Rr:5;
+        uint16_t:4; /* 0111 */
+    };
+} avr_opcode_LAT_t;
+int     avr_translate_LAT(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LAT_t const *inst);
+
+typedef union avr_opcode_STY2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001001 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 1001 */
+    };
+} avr_opcode_STY2_t;
+int     avr_translate_STY2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STY2_t const *inst);
+
+typedef union avr_opcode_STY3_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001001 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 1010 */
+    };
+} avr_opcode_STY3_t;
+int     avr_translate_STY3(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STY3_t const *inst);
+
+typedef union avr_opcode_STX1_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001001 */
+        uint16_t    Rr:5;
+        uint16_t:4; /* 1100 */
+    };
+} avr_opcode_STX1_t;
+int     avr_translate_STX1(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STX1_t const *inst);
+
+typedef union avr_opcode_STX2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001001 */
+        uint16_t    Rr:5;
+        uint16_t:4; /* 1101 */
+    };
+} avr_opcode_STX2_t;
+int     avr_translate_STX2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STX2_t const *inst);
+
+typedef union avr_opcode_STX3_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001001 */
+        uint16_t    Rr:5;
+        uint16_t:4; /* 1110 */
+    };
+} avr_opcode_STX3_t;
+int     avr_translate_STX3(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STX3_t const *inst);
+
+typedef union avr_opcode_PUSH_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001001 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 1111 */
+    };
+} avr_opcode_PUSH_t;
+int     avr_translate_PUSH(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_PUSH_t const *inst);
+
+typedef union avr_opcode_COM_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001010 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0000 */
+    };
+} avr_opcode_COM_t;
+int     avr_translate_COM(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_COM_t const *inst);
+
+typedef union avr_opcode_NEG_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001010 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0001 */
+    };
+} avr_opcode_NEG_t;
+int     avr_translate_NEG(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_NEG_t const *inst);
+
+typedef union avr_opcode_SWAP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001010 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0010 */
+    };
+} avr_opcode_SWAP_t;
+int     avr_translate_SWAP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SWAP_t const *inst);
+
+typedef union avr_opcode_INC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001010 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0011 */
+    };
+} avr_opcode_INC_t;
+int     avr_translate_INC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_INC_t const *inst);
+
+typedef union avr_opcode_ASR_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001010 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0101 */
+    };
+} avr_opcode_ASR_t;
+int     avr_translate_ASR(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ASR_t const *inst);
+
+typedef union avr_opcode_LSR_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001010 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0110 */
+    };
+} avr_opcode_LSR_t;
+int     avr_translate_LSR(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LSR_t const *inst);
+
+typedef union avr_opcode_ROR_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001010 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 0111 */
+    };
+} avr_opcode_ROR_t;
+int     avr_translate_ROR(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ROR_t const *inst);
+
+typedef union avr_opcode_BSET_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:9; /* 100101000 */
+        uint16_t    Bit:3;
+        uint16_t:4; /* 1000 */
+    };
+} avr_opcode_BSET_t;
+int     avr_translate_BSET(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_BSET_t const *inst);
+
+typedef union avr_opcode_IJMP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010000001001 */
+    };
+} avr_opcode_IJMP_t;
+int     avr_translate_IJMP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_IJMP_t const *inst);
+
+typedef union avr_opcode_EIJMP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010000011001 */
+    };
+} avr_opcode_EIJMP_t;
+int     avr_translate_EIJMP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_EIJMP_t const *inst);
+
+typedef union avr_opcode_BCLR_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:9; /* 100101001 */
+        uint16_t    Bit:3;
+        uint16_t:4; /* 1000 */
+    };
+} avr_opcode_BCLR_t;
+int     avr_translate_BCLR(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_BCLR_t const *inst);
+
+typedef union avr_opcode_RET_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010100001000 */
+    };
+} avr_opcode_RET_t;
+int     avr_translate_RET(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_RET_t const *inst);
+
+typedef union avr_opcode_RETI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010100011000 */
+    };
+} avr_opcode_RETI_t;
+int     avr_translate_RETI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_RETI_t const *inst);
+
+typedef union avr_opcode_ICALL_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010100001001 */
+    };
+} avr_opcode_ICALL_t;
+int     avr_translate_ICALL(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ICALL_t const *inst);
+
+typedef union avr_opcode_EICALL_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010100011001 */
+    };
+} avr_opcode_EICALL_t;
+int     avr_translate_EICALL(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_EICALL_t const *inst);
+
+typedef union avr_opcode_SLEEP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010110001000 */
+    };
+} avr_opcode_SLEEP_t;
+int     avr_translate_SLEEP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SLEEP_t const *inst);
+
+typedef union avr_opcode_BREAK_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010110011000 */
+    };
+} avr_opcode_BREAK_t;
+int     avr_translate_BREAK(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_BREAK_t const *inst);
+
+typedef union avr_opcode_WDR_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010110101000 */
+    };
+} avr_opcode_WDR_t;
+int     avr_translate_WDR(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_WDR_t const *inst);
+
+typedef union avr_opcode_LPM1_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010111001000 */
+    };
+} avr_opcode_LPM1_t;
+int     avr_translate_LPM1(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LPM1_t const *inst);
+
+typedef union avr_opcode_ELPM1_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010111011000 */
+    };
+} avr_opcode_ELPM1_t;
+int     avr_translate_ELPM1(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ELPM1_t const *inst);
+
+typedef union avr_opcode_SPM_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010111101000 */
+    };
+} avr_opcode_SPM_t;
+int     avr_translate_SPM(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SPM_t const *inst);
+
+typedef union avr_opcode_SPMX_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010111111000 */
+    };
+} avr_opcode_SPMX_t;
+int     avr_translate_SPMX(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SPMX_t const *inst);
+
+typedef union avr_opcode_DEC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1001010 */
+        uint16_t    Rd:5;
+        uint16_t:4; /* 1010 */
+    };
+} avr_opcode_DEC_t;
+int     avr_translate_DEC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_DEC_t const *inst);
+
+typedef union avr_opcode_DES_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:8; /* 10010100 */
+        uint16_t    Imm:4;
+        uint16_t:4; /* 1011 */
+    };
+} avr_opcode_DES_t;
+int     avr_translate_DES(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_DES_t const *inst);
+
+typedef union avr_opcode_JMP_u {
+    uint32_t    opcode;
+    struct {
+        uint32_t:7; /* 1001010 */
+        uint32_t    hImm:5;
+        uint32_t:3; /* 110 */
+        uint32_t    lImm:17;
+    };
+} avr_opcode_JMP_t;
+int     avr_translate_JMP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_JMP_t const *inst);
+
+typedef union avr_opcode_CALL_u {
+    uint32_t    opcode;
+    struct {
+        uint32_t:7; /* 1001010 */
+        uint32_t    hImm:5;
+        uint32_t:3; /* 111 */
+        uint32_t    lImm:17;
+    };
+} avr_opcode_CALL_t;
+int     avr_translate_CALL(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_CALL_t const *inst);
+
+typedef union avr_opcode_ADIW_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:8; /* 10010110 */
+        uint16_t    hImm:2;
+        uint16_t    Rd:2;
+        uint16_t    lImm:4;
+    };
+} avr_opcode_ADIW_t;
+int     avr_translate_ADIW(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ADIW_t const *inst);
+
+typedef union avr_opcode_SBIW_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:8; /* 10010111 */
+        uint16_t    hImm:2;
+        uint16_t    Rd:2;
+        uint16_t    lImm:4;
+    };
+} avr_opcode_SBIW_t;
+int     avr_translate_SBIW(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBIW_t const *inst);
+
+typedef union avr_opcode_CBI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:8; /* 10011000 */
+        uint16_t    Imm:5;
+        uint16_t    Bit:3;
+    };
+} avr_opcode_CBI_t;
+int     avr_translate_CBI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_CBI_t const *inst);
+
+typedef union avr_opcode_SBIC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:8; /* 10011001 */
+        uint16_t    Imm:5;
+        uint16_t    Bit:3;
+    };
+} avr_opcode_SBIC_t;
+int     avr_translate_SBIC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBIC_t const *inst);
+
+typedef union avr_opcode_SBI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:8; /* 10011010 */
+        uint16_t    Imm:5;
+        uint16_t    Bit:3;
+    };
+} avr_opcode_SBI_t;
+int     avr_translate_SBI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBI_t const *inst);
+
+typedef union avr_opcode_SBIS_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:8; /* 10011011 */
+        uint16_t    Imm:5;
+        uint16_t    Bit:3;
+    };
+} avr_opcode_SBIS_t;
+int     avr_translate_SBIS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBIS_t const *inst);
+
+typedef union avr_opcode_MUL_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:6; /* 100111 */
+        uint16_t    hRr:1;
+        uint16_t    Rd:5;
+        uint16_t    lRr:4;
+    };
+} avr_opcode_MUL_t;
+int     avr_translate_MUL(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_MUL_t const *inst);
+
+typedef union avr_opcode_IN_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:5; /* 10110 */
+        uint16_t    hImm:2;
+        uint16_t    Rd:5;
+        uint16_t    lImm:4;
+    };
+} avr_opcode_IN_t;
+int     avr_translate_IN(CPUAVRState *env, DisasContext *ctx, avr_opcode_IN_t 
const *inst);
+
+typedef union avr_opcode_OUT_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:5; /* 10111 */
+        uint16_t    hImm:2;
+        uint16_t    Rd:5;
+        uint16_t    lImm:4;
+    };
+} avr_opcode_OUT_t;
+int     avr_translate_OUT(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_OUT_t const *inst);
+
+typedef union avr_opcode_RJMP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1100 */
+        uint16_t    Imm:12;
+    };
+} avr_opcode_RJMP_t;
+int     avr_translate_RJMP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_RJMP_t const *inst);
+
+typedef union avr_opcode_LDI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1110 */
+        uint16_t    hImm:4;
+        uint16_t    Rd:4;
+        uint16_t    lImm:4;
+    };
+} avr_opcode_LDI_t;
+int     avr_translate_LDI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDI_t const *inst);
+
+typedef union avr_opcode_RCALL_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1101 */
+        uint16_t    Imm:12;
+    };
+} avr_opcode_RCALL_t;
+int     avr_translate_RCALL(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_RCALL_t const *inst);
+
+typedef union avr_opcode_BRBS_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:6; /* 111100 */
+        uint16_t    Imm:7;
+        uint16_t    Bit:3;
+    };
+} avr_opcode_BRBS_t;
+int     avr_translate_BRBS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_BRBS_t const *inst);
+
+typedef union avr_opcode_BRBC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:6; /* 111101 */
+        uint16_t    Imm:7;
+        uint16_t    Bit:3;
+    };
+} avr_opcode_BRBC_t;
+int     avr_translate_BRBC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_BRBC_t const *inst);
+
+typedef union avr_opcode_BLD_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1111100 */
+        uint16_t    Rd:5;
+        uint16_t:1; /* 0 */
+        uint16_t    Bit:3;
+    };
+} avr_opcode_BLD_t;
+int     avr_translate_BLD(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_BLD_t const *inst);
+
+typedef union avr_opcode_BST_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1111101 */
+        uint16_t    Rd:5;
+        uint16_t:1; /* 0 */
+        uint16_t    Bit:3;
+    };
+} avr_opcode_BST_t;
+int     avr_translate_BST(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_BST_t const *inst);
+
+typedef union avr_opcode_SBRC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1111110 */
+        uint16_t    Rr:5;
+        uint16_t:1; /* 0 */
+        uint16_t    Bit:3;
+    };
+} avr_opcode_SBRC_t;
+int     avr_translate_SBRC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBRC_t const *inst);
+
+typedef union avr_opcode_SBRS_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:7; /* 1111111 */
+        uint16_t    Rr:5;
+        uint16_t:1; /* 0 */
+        uint16_t    Bit:3;
+    };
+} avr_opcode_SBRS_t;
+int     avr_translate_SBRS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBRS_t const *inst);
+
diff --git a/target-avr/inst-le.h b/target-avr/inst-le.h
new file mode 100644
index 0000000..d73293f
--- /dev/null
+++ b/target-avr/inst-le.h
@@ -0,0 +1,1018 @@
+/*
+ * QEMU AVR CPU
+ *
+ * Copyright (c) 2016 Michael Rolnik
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see
+ * <http://www.gnu.org/licenses/lgpl-2.1.html>
+ */
+
+
+typedef struct DisasContext    DisasContext;
+typedef struct CPUAVRState     CPUAVRState;
+
+typedef union avr_opcode_NOP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 0000000000000000 */
+    };
+} avr_opcode_NOP_t;
+int     avr_translate_NOP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_NOP_t const *inst);
+
+typedef union avr_opcode_MOVW_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Rr:4;
+        uint16_t    Rd:4;
+        uint16_t:8; /* 00000001 */
+    };
+} avr_opcode_MOVW_t;
+int     avr_translate_MOVW(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_MOVW_t const *inst);
+
+typedef union avr_opcode_MULS_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Rr:4;
+        uint16_t    Rd:4;
+        uint16_t:8; /* 00000010 */
+    };
+} avr_opcode_MULS_t;
+int     avr_translate_MULS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_MULS_t const *inst);
+
+typedef union avr_opcode_MULSU_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Rr:3;
+        uint16_t:1; /* 0 */
+        uint16_t    Rd:3;
+        uint16_t:9; /* 000000110 */
+    };
+} avr_opcode_MULSU_t;
+int     avr_translate_MULSU(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_MULSU_t const *inst);
+
+typedef union avr_opcode_FMUL_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Rr:3;
+        uint16_t:1; /* 1 */
+        uint16_t    Rd:3;
+        uint16_t:9; /* 000000110 */
+    };
+} avr_opcode_FMUL_t;
+int     avr_translate_FMUL(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_FMUL_t const *inst);
+
+typedef union avr_opcode_FMULS_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Rr:3;
+        uint16_t:1; /* 0 */
+        uint16_t    Rd:3;
+        uint16_t:9; /* 000000111 */
+    };
+} avr_opcode_FMULS_t;
+int     avr_translate_FMULS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_FMULS_t const *inst);
+
+typedef union avr_opcode_FMULSU_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Rr:3;
+        uint16_t:1; /* 1 */
+        uint16_t    Rd:3;
+        uint16_t:9; /* 000000111 */
+    };
+} avr_opcode_FMULSU_t;
+int     avr_translate_FMULSU(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_FMULSU_t const *inst);
+
+typedef union avr_opcode_CPC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lRr:4;
+        uint16_t    Rd:5;
+        uint16_t    hRr:1;
+        uint16_t:6; /* 000001 */
+    };
+} avr_opcode_CPC_t;
+int     avr_translate_CPC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_CPC_t const *inst);
+
+typedef union avr_opcode_SBC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lRr:4;
+        uint16_t    Rd:5;
+        uint16_t    hRr:1;
+        uint16_t:6; /* 000010 */
+    };
+} avr_opcode_SBC_t;
+int     avr_translate_SBC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBC_t const *inst);
+
+typedef union avr_opcode_ADD_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lRr:4;
+        uint16_t    Rd:5;
+        uint16_t    hRr:1;
+        uint16_t:6; /* 000011 */
+    };
+} avr_opcode_ADD_t;
+int     avr_translate_ADD(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ADD_t const *inst);
+
+typedef union avr_opcode_AND_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lRr:4;
+        uint16_t    Rd:5;
+        uint16_t    hRr:1;
+        uint16_t:6; /* 001000 */
+    };
+} avr_opcode_AND_t;
+int     avr_translate_AND(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_AND_t const *inst);
+
+typedef union avr_opcode_EOR_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lRr:4;
+        uint16_t    Rd:5;
+        uint16_t    hRr:1;
+        uint16_t:6; /* 001001 */
+    };
+} avr_opcode_EOR_t;
+int     avr_translate_EOR(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_EOR_t const *inst);
+
+typedef union avr_opcode_OR_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lRr:4;
+        uint16_t    Rd:5;
+        uint16_t    hRr:1;
+        uint16_t:6; /* 001010 */
+    };
+} avr_opcode_OR_t;
+int     avr_translate_OR(CPUAVRState *env, DisasContext *ctx, avr_opcode_OR_t 
const *inst);
+
+typedef union avr_opcode_MOV_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lRr:4;
+        uint16_t    Rd:5;
+        uint16_t    hRr:1;
+        uint16_t:6; /* 001011 */
+    };
+} avr_opcode_MOV_t;
+int     avr_translate_MOV(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_MOV_t const *inst);
+
+typedef union avr_opcode_CPSE_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lRr:4;
+        uint16_t    Rd:5;
+        uint16_t    hRr:1;
+        uint16_t:6; /* 000100 */
+    };
+} avr_opcode_CPSE_t;
+int     avr_translate_CPSE(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_CPSE_t const *inst);
+
+typedef union avr_opcode_CP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lRr:4;
+        uint16_t    Rd:5;
+        uint16_t    hRr:1;
+        uint16_t:6; /* 000101 */
+    };
+} avr_opcode_CP_t;
+int     avr_translate_CP(CPUAVRState *env, DisasContext *ctx, avr_opcode_CP_t 
const *inst);
+
+typedef union avr_opcode_SUB_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lRr:4;
+        uint16_t    Rd:5;
+        uint16_t    hRr:1;
+        uint16_t:6; /* 000110 */
+    };
+} avr_opcode_SUB_t;
+int     avr_translate_SUB(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SUB_t const *inst);
+
+typedef union avr_opcode_ADC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lRr:4;
+        uint16_t    Rd:5;
+        uint16_t    hRr:1;
+        uint16_t:6; /* 000111 */
+    };
+} avr_opcode_ADC_t;
+int     avr_translate_ADC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ADC_t const *inst);
+
+typedef union avr_opcode_CPI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lImm:4;
+        uint16_t    Rd:4;
+        uint16_t    hImm:4;
+        uint16_t:4; /* 0011 */
+    };
+} avr_opcode_CPI_t;
+int     avr_translate_CPI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_CPI_t const *inst);
+
+typedef union avr_opcode_SBCI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lImm:4;
+        uint16_t    Rd:4;
+        uint16_t    hImm:4;
+        uint16_t:4; /* 0100 */
+    };
+} avr_opcode_SBCI_t;
+int     avr_translate_SBCI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBCI_t const *inst);
+
+typedef union avr_opcode_ORI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lImm:4;
+        uint16_t    Rd:4;
+        uint16_t    hImm:4;
+        uint16_t:4; /* 0110 */
+    };
+} avr_opcode_ORI_t;
+int     avr_translate_ORI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ORI_t const *inst);
+
+typedef union avr_opcode_SUBI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lImm:4;
+        uint16_t    Rd:4;
+        uint16_t    hImm:4;
+        uint16_t:4; /* 0101 */
+    };
+} avr_opcode_SUBI_t;
+int     avr_translate_SUBI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SUBI_t const *inst);
+
+typedef union avr_opcode_ANDI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lImm:4;
+        uint16_t    Rd:4;
+        uint16_t    hImm:4;
+        uint16_t:4; /* 0111 */
+    };
+} avr_opcode_ANDI_t;
+int     avr_translate_ANDI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ANDI_t const *inst);
+
+typedef union avr_opcode_LDDZ_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lImm:3;
+        uint16_t:1; /* 0 */
+        uint16_t    Rd:5;
+        uint16_t:1; /* 0 */
+        uint16_t    mImm:2;
+        uint16_t:1; /* 0 */
+        uint16_t    hImm:1;
+        uint16_t:2; /* 10 */
+    };
+} avr_opcode_LDDZ_t;
+int     avr_translate_LDDZ(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDDZ_t const *inst);
+
+typedef union avr_opcode_LDDY_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lImm:3;
+        uint16_t:1; /* 1 */
+        uint16_t    Rd:5;
+        uint16_t:1; /* 0 */
+        uint16_t    mImm:2;
+        uint16_t:1; /* 0 */
+        uint16_t    hImm:1;
+        uint16_t:2; /* 10 */
+    };
+} avr_opcode_LDDY_t;
+int     avr_translate_LDDY(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDDY_t const *inst);
+
+typedef union avr_opcode_STDZ_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lImm:3;
+        uint16_t:1; /* 0 */
+        uint16_t    Rd:5;
+        uint16_t:1; /* 1 */
+        uint16_t    mImm:2;
+        uint16_t:1; /* 0 */
+        uint16_t    hImm:1;
+        uint16_t:2; /* 10 */
+    };
+} avr_opcode_STDZ_t;
+int     avr_translate_STDZ(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STDZ_t const *inst);
+
+typedef union avr_opcode_STDY_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lImm:3;
+        uint16_t:1; /* 1 */
+        uint16_t    Rd:5;
+        uint16_t:1; /* 1 */
+        uint16_t    mImm:2;
+        uint16_t:1; /* 0 */
+        uint16_t    hImm:1;
+        uint16_t:2; /* 10 */
+    };
+} avr_opcode_STDY_t;
+int     avr_translate_STDY(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STDY_t const *inst);
+
+typedef union avr_opcode_LDS_u {
+    uint32_t    opcode;
+    struct {
+        uint32_t    Imm:16;
+        uint32_t:4; /* 0000 */
+        uint32_t    Rd:5;
+        uint32_t:7; /* 1001000 */
+    };
+} avr_opcode_LDS_t;
+int     avr_translate_LDS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDS_t const *inst);
+
+typedef union avr_opcode_LDZ2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0001 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001000 */
+    };
+} avr_opcode_LDZ2_t;
+int     avr_translate_LDZ2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDZ2_t const *inst);
+
+typedef union avr_opcode_LDZ3_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0010 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001000 */
+    };
+} avr_opcode_LDZ3_t;
+int     avr_translate_LDZ3(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDZ3_t const *inst);
+
+typedef union avr_opcode_LPM2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0100 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001000 */
+    };
+} avr_opcode_LPM2_t;
+int     avr_translate_LPM2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LPM2_t const *inst);
+
+typedef union avr_opcode_LPMX_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0101 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001000 */
+    };
+} avr_opcode_LPMX_t;
+int     avr_translate_LPMX(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LPMX_t const *inst);
+
+typedef union avr_opcode_ELPM2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0110 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001000 */
+    };
+} avr_opcode_ELPM2_t;
+int     avr_translate_ELPM2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ELPM2_t const *inst);
+
+typedef union avr_opcode_ELPMX_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0111 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001000 */
+    };
+} avr_opcode_ELPMX_t;
+int     avr_translate_ELPMX(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ELPMX_t const *inst);
+
+typedef union avr_opcode_LDY2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1001 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001000 */
+    };
+} avr_opcode_LDY2_t;
+int     avr_translate_LDY2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDY2_t const *inst);
+
+typedef union avr_opcode_LDY3_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1010 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001000 */
+    };
+} avr_opcode_LDY3_t;
+int     avr_translate_LDY3(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDY3_t const *inst);
+
+typedef union avr_opcode_LDX1_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1100 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001000 */
+    };
+} avr_opcode_LDX1_t;
+int     avr_translate_LDX1(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDX1_t const *inst);
+
+typedef union avr_opcode_LDX2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1101 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001000 */
+    };
+} avr_opcode_LDX2_t;
+int     avr_translate_LDX2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDX2_t const *inst);
+
+typedef union avr_opcode_LDX3_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1110 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001000 */
+    };
+} avr_opcode_LDX3_t;
+int     avr_translate_LDX3(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDX3_t const *inst);
+
+typedef union avr_opcode_POP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1111 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001000 */
+    };
+} avr_opcode_POP_t;
+int     avr_translate_POP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_POP_t const *inst);
+
+typedef union avr_opcode_STS_u {
+    uint32_t    opcode;
+    struct {
+        uint32_t    Imm:16;
+        uint32_t:4; /* 0000 */
+        uint32_t    Rd:5;
+        uint32_t:7; /* 1001001 */
+    };
+} avr_opcode_STS_t;
+int     avr_translate_STS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STS_t const *inst);
+
+typedef union avr_opcode_STZ2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0001 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001001 */
+    };
+} avr_opcode_STZ2_t;
+int     avr_translate_STZ2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STZ2_t const *inst);
+
+typedef union avr_opcode_STZ3_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0010 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001001 */
+    };
+} avr_opcode_STZ3_t;
+int     avr_translate_STZ3(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STZ3_t const *inst);
+
+typedef union avr_opcode_XCH_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0100 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001001 */
+    };
+} avr_opcode_XCH_t;
+int     avr_translate_XCH(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_XCH_t const *inst);
+
+typedef union avr_opcode_LAS_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0101 */
+        uint16_t    Rr:5;
+        uint16_t:7; /* 1001001 */
+    };
+} avr_opcode_LAS_t;
+int     avr_translate_LAS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LAS_t const *inst);
+
+typedef union avr_opcode_LAC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0110 */
+        uint16_t    Rr:5;
+        uint16_t:7; /* 1001001 */
+    };
+} avr_opcode_LAC_t;
+int     avr_translate_LAC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LAC_t const *inst);
+
+typedef union avr_opcode_LAT_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0111 */
+        uint16_t    Rr:5;
+        uint16_t:7; /* 1001001 */
+    };
+} avr_opcode_LAT_t;
+int     avr_translate_LAT(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LAT_t const *inst);
+
+typedef union avr_opcode_STY2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1001 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001001 */
+    };
+} avr_opcode_STY2_t;
+int     avr_translate_STY2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STY2_t const *inst);
+
+typedef union avr_opcode_STY3_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1010 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001001 */
+    };
+} avr_opcode_STY3_t;
+int     avr_translate_STY3(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STY3_t const *inst);
+
+typedef union avr_opcode_STX1_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1100 */
+        uint16_t    Rr:5;
+        uint16_t:7; /* 1001001 */
+    };
+} avr_opcode_STX1_t;
+int     avr_translate_STX1(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STX1_t const *inst);
+
+typedef union avr_opcode_STX2_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1101 */
+        uint16_t    Rr:5;
+        uint16_t:7; /* 1001001 */
+    };
+} avr_opcode_STX2_t;
+int     avr_translate_STX2(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STX2_t const *inst);
+
+typedef union avr_opcode_STX3_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1110 */
+        uint16_t    Rr:5;
+        uint16_t:7; /* 1001001 */
+    };
+} avr_opcode_STX3_t;
+int     avr_translate_STX3(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_STX3_t const *inst);
+
+typedef union avr_opcode_PUSH_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1111 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001001 */
+    };
+} avr_opcode_PUSH_t;
+int     avr_translate_PUSH(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_PUSH_t const *inst);
+
+typedef union avr_opcode_COM_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0000 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001010 */
+    };
+} avr_opcode_COM_t;
+int     avr_translate_COM(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_COM_t const *inst);
+
+typedef union avr_opcode_NEG_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0001 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001010 */
+    };
+} avr_opcode_NEG_t;
+int     avr_translate_NEG(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_NEG_t const *inst);
+
+typedef union avr_opcode_SWAP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0010 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001010 */
+    };
+} avr_opcode_SWAP_t;
+int     avr_translate_SWAP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SWAP_t const *inst);
+
+typedef union avr_opcode_INC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0011 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001010 */
+    };
+} avr_opcode_INC_t;
+int     avr_translate_INC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_INC_t const *inst);
+
+typedef union avr_opcode_ASR_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0101 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001010 */
+    };
+} avr_opcode_ASR_t;
+int     avr_translate_ASR(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ASR_t const *inst);
+
+typedef union avr_opcode_LSR_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0110 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001010 */
+    };
+} avr_opcode_LSR_t;
+int     avr_translate_LSR(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LSR_t const *inst);
+
+typedef union avr_opcode_ROR_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 0111 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001010 */
+    };
+} avr_opcode_ROR_t;
+int     avr_translate_ROR(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ROR_t const *inst);
+
+typedef union avr_opcode_BSET_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1000 */
+        uint16_t    Bit:3;
+        uint16_t:9; /* 100101000 */
+    };
+} avr_opcode_BSET_t;
+int     avr_translate_BSET(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_BSET_t const *inst);
+
+typedef union avr_opcode_IJMP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010000001001 */
+    };
+} avr_opcode_IJMP_t;
+int     avr_translate_IJMP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_IJMP_t const *inst);
+
+typedef union avr_opcode_EIJMP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010000011001 */
+    };
+} avr_opcode_EIJMP_t;
+int     avr_translate_EIJMP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_EIJMP_t const *inst);
+
+typedef union avr_opcode_BCLR_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1000 */
+        uint16_t    Bit:3;
+        uint16_t:9; /* 100101001 */
+    };
+} avr_opcode_BCLR_t;
+int     avr_translate_BCLR(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_BCLR_t const *inst);
+
+typedef union avr_opcode_RET_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010100001000 */
+    };
+} avr_opcode_RET_t;
+int     avr_translate_RET(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_RET_t const *inst);
+
+typedef union avr_opcode_RETI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010100011000 */
+    };
+} avr_opcode_RETI_t;
+int     avr_translate_RETI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_RETI_t const *inst);
+
+typedef union avr_opcode_ICALL_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010100001001 */
+    };
+} avr_opcode_ICALL_t;
+int     avr_translate_ICALL(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ICALL_t const *inst);
+
+typedef union avr_opcode_EICALL_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010100011001 */
+    };
+} avr_opcode_EICALL_t;
+int     avr_translate_EICALL(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_EICALL_t const *inst);
+
+typedef union avr_opcode_SLEEP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010110001000 */
+    };
+} avr_opcode_SLEEP_t;
+int     avr_translate_SLEEP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SLEEP_t const *inst);
+
+typedef union avr_opcode_BREAK_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010110011000 */
+    };
+} avr_opcode_BREAK_t;
+int     avr_translate_BREAK(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_BREAK_t const *inst);
+
+typedef union avr_opcode_WDR_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010110101000 */
+    };
+} avr_opcode_WDR_t;
+int     avr_translate_WDR(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_WDR_t const *inst);
+
+typedef union avr_opcode_LPM1_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010111001000 */
+    };
+} avr_opcode_LPM1_t;
+int     avr_translate_LPM1(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LPM1_t const *inst);
+
+typedef union avr_opcode_ELPM1_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010111011000 */
+    };
+} avr_opcode_ELPM1_t;
+int     avr_translate_ELPM1(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ELPM1_t const *inst);
+
+typedef union avr_opcode_SPM_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010111101000 */
+    };
+} avr_opcode_SPM_t;
+int     avr_translate_SPM(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SPM_t const *inst);
+
+typedef union avr_opcode_SPMX_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:16; /* 1001010111111000 */
+    };
+} avr_opcode_SPMX_t;
+int     avr_translate_SPMX(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SPMX_t const *inst);
+
+typedef union avr_opcode_DEC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1010 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1001010 */
+    };
+} avr_opcode_DEC_t;
+int     avr_translate_DEC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_DEC_t const *inst);
+
+typedef union avr_opcode_DES_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t:4; /* 1011 */
+        uint16_t    Imm:4;
+        uint16_t:8; /* 10010100 */
+    };
+} avr_opcode_DES_t;
+int     avr_translate_DES(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_DES_t const *inst);
+
+typedef union avr_opcode_JMP_u {
+    uint32_t    opcode;
+    struct {
+        uint32_t    lImm:17;
+        uint32_t:3; /* 110 */
+        uint32_t    hImm:5;
+        uint32_t:7; /* 1001010 */
+    };
+} avr_opcode_JMP_t;
+int     avr_translate_JMP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_JMP_t const *inst);
+
+typedef union avr_opcode_CALL_u {
+    uint32_t    opcode;
+    struct {
+        uint32_t    lImm:17;
+        uint32_t:3; /* 111 */
+        uint32_t    hImm:5;
+        uint32_t:7; /* 1001010 */
+    };
+} avr_opcode_CALL_t;
+int     avr_translate_CALL(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_CALL_t const *inst);
+
+typedef union avr_opcode_ADIW_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lImm:4;
+        uint16_t    Rd:2;
+        uint16_t    hImm:2;
+        uint16_t:8; /* 10010110 */
+    };
+} avr_opcode_ADIW_t;
+int     avr_translate_ADIW(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_ADIW_t const *inst);
+
+typedef union avr_opcode_SBIW_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lImm:4;
+        uint16_t    Rd:2;
+        uint16_t    hImm:2;
+        uint16_t:8; /* 10010111 */
+    };
+} avr_opcode_SBIW_t;
+int     avr_translate_SBIW(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBIW_t const *inst);
+
+typedef union avr_opcode_CBI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Bit:3;
+        uint16_t    Imm:5;
+        uint16_t:8; /* 10011000 */
+    };
+} avr_opcode_CBI_t;
+int     avr_translate_CBI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_CBI_t const *inst);
+
+typedef union avr_opcode_SBIC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Bit:3;
+        uint16_t    Imm:5;
+        uint16_t:8; /* 10011001 */
+    };
+} avr_opcode_SBIC_t;
+int     avr_translate_SBIC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBIC_t const *inst);
+
+typedef union avr_opcode_SBI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Bit:3;
+        uint16_t    Imm:5;
+        uint16_t:8; /* 10011010 */
+    };
+} avr_opcode_SBI_t;
+int     avr_translate_SBI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBI_t const *inst);
+
+typedef union avr_opcode_SBIS_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Bit:3;
+        uint16_t    Imm:5;
+        uint16_t:8; /* 10011011 */
+    };
+} avr_opcode_SBIS_t;
+int     avr_translate_SBIS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBIS_t const *inst);
+
+typedef union avr_opcode_MUL_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lRr:4;
+        uint16_t    Rd:5;
+        uint16_t    hRr:1;
+        uint16_t:6; /* 100111 */
+    };
+} avr_opcode_MUL_t;
+int     avr_translate_MUL(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_MUL_t const *inst);
+
+typedef union avr_opcode_IN_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lImm:4;
+        uint16_t    Rd:5;
+        uint16_t    hImm:2;
+        uint16_t:5; /* 10110 */
+    };
+} avr_opcode_IN_t;
+int     avr_translate_IN(CPUAVRState *env, DisasContext *ctx, avr_opcode_IN_t 
const *inst);
+
+typedef union avr_opcode_OUT_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lImm:4;
+        uint16_t    Rd:5;
+        uint16_t    hImm:2;
+        uint16_t:5; /* 10111 */
+    };
+} avr_opcode_OUT_t;
+int     avr_translate_OUT(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_OUT_t const *inst);
+
+typedef union avr_opcode_RJMP_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Imm:12;
+        uint16_t:4; /* 1100 */
+    };
+} avr_opcode_RJMP_t;
+int     avr_translate_RJMP(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_RJMP_t const *inst);
+
+typedef union avr_opcode_LDI_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    lImm:4;
+        uint16_t    Rd:4;
+        uint16_t    hImm:4;
+        uint16_t:4; /* 1110 */
+    };
+} avr_opcode_LDI_t;
+int     avr_translate_LDI(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_LDI_t const *inst);
+
+typedef union avr_opcode_RCALL_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Imm:12;
+        uint16_t:4; /* 1101 */
+    };
+} avr_opcode_RCALL_t;
+int     avr_translate_RCALL(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_RCALL_t const *inst);
+
+typedef union avr_opcode_BRBS_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Bit:3;
+        uint16_t    Imm:7;
+        uint16_t:6; /* 111100 */
+    };
+} avr_opcode_BRBS_t;
+int     avr_translate_BRBS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_BRBS_t const *inst);
+
+typedef union avr_opcode_BRBC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Bit:3;
+        uint16_t    Imm:7;
+        uint16_t:6; /* 111101 */
+    };
+} avr_opcode_BRBC_t;
+int     avr_translate_BRBC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_BRBC_t const *inst);
+
+typedef union avr_opcode_BLD_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Bit:3;
+        uint16_t:1; /* 0 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1111100 */
+    };
+} avr_opcode_BLD_t;
+int     avr_translate_BLD(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_BLD_t const *inst);
+
+typedef union avr_opcode_BST_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Bit:3;
+        uint16_t:1; /* 0 */
+        uint16_t    Rd:5;
+        uint16_t:7; /* 1111101 */
+    };
+} avr_opcode_BST_t;
+int     avr_translate_BST(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_BST_t const *inst);
+
+typedef union avr_opcode_SBRC_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Bit:3;
+        uint16_t:1; /* 0 */
+        uint16_t    Rr:5;
+        uint16_t:7; /* 1111110 */
+    };
+} avr_opcode_SBRC_t;
+int     avr_translate_SBRC(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBRC_t const *inst);
+
+typedef union avr_opcode_SBRS_u {
+    uint16_t    opcode;
+    struct {
+        uint16_t    Bit:3;
+        uint16_t:1; /* 0 */
+        uint16_t    Rr:5;
+        uint16_t:7; /* 1111111 */
+    };
+} avr_opcode_SBRS_t;
+int     avr_translate_SBRS(CPUAVRState *env, DisasContext *ctx, 
avr_opcode_SBRS_t const *inst);
+
-- 
2.4.9 (Apple Git-60)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]