
/!\  NOT TESTED /!\

/* Copyright (c) 2011 Yann Guidon <whygee@f-cpu.org>
 * This file is part of DeforaOS Devel asm
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>. */

/* version : sat. dec.  3 17:47:35 CET 2011 : init */

#define ARCH_yasep32

/* The YASEP architecture is normally LE: */
#define ARCH_ENDIAN        ARCH_ENDIAN_LITTLE

define ALLOW_YASEP_ALIASES

/* NdYG : I put that here so it's not in the other included files */
/* platform-specific */
#if !defined(W)
# if defined(ARCH_yasep16)
#  define W     16
# else
#  define W     32
# endif
#endif

/* from yasep_fields.js :  (should it be exported by .js ?) */
#define FIELD_IMMREG             1 /* LSB : short/long flag */
#define FIELD_EXTFORM            2 /* imm4 or extended ? */
#define FIELD_GROUP           0x1C /* 8 groups */
#define FIELD_FUNCTION        0xE0 /* 8 functions */
#define FIELD_OPCODE          0xFC
#define FIELD_SND            0xF00
#define FIELD_SI4           0xF000
#define FIELD_IMM16     0xFFFF0000
/*      FIELD_EXTxxx    0x00010000  unused yet */
#define FIELD_EXTIMM4   0x00020000 /* imm4 ? */
/*      FIELD_EXTPTR    0x001C0000  unused yet */
#define FIELD_EXTCOND   0x00E00000 /* 3 bits, among them : */
#define FIELD_EXTNEG    0x00200000 /*   negation of the condition */
#define FIELD_EXTBIT    0x00800000 /*   =1 for LSB/MSB */
#define FIELD_EXTDST3   0x0F000000 /* destination register #3 */
#define FIELD_EXTSRC4   0xF0000000

#define OFFSET_SND      8
#define OFFSET_SI4      12
#define OFFSET_EXTCOND  21
#define OFFSET_EXTDST3  24
#define OFFSET_EXTSRC4  28
