/* ia64.h -- Header file for ia64 opcode table Copyright (C) 1998, 1999, 2000, 2002, 2005, 2006 Free Software Foundation, Inc. Contributed by David Mosberger-Tang */ #ifndef opcode_ia64_h #define opcode_ia64_h #include #include "dis-asm.h" typedef BFD_HOST_U_64_BIT ia64_insn; enum ia64_insn_type { IA64_TYPE_NIL = 0, /* illegal type */ IA64_TYPE_A, /* integer alu (I- or M-unit) */ IA64_TYPE_I, /* non-alu integer (I-unit) */ IA64_TYPE_M, /* memory (M-unit) */ IA64_TYPE_B, /* branch (B-unit) */ IA64_TYPE_F, /* floating-point (F-unit) */ IA64_TYPE_X, /* long encoding (X-unit) */ IA64_TYPE_DYN, /* Dynamic opcode */ IA64_NUM_TYPES }; enum ia64_unit { IA64_UNIT_NIL = 0, /* illegal unit */ IA64_UNIT_I, /* integer unit */ IA64_UNIT_M, /* memory unit */ IA64_UNIT_B, /* branching unit */ IA64_UNIT_F, /* floating-point unit */ IA64_UNIT_L, /* long "unit" */ IA64_UNIT_X, /* may be integer or branch unit */ IA64_NUM_UNITS }; /* Changes to this enumeration must be propagated to the operand table in bfd/cpu-ia64-opc.c */ enum ia64_opnd { IA64_OPND_NIL, /* no operand---MUST BE FIRST!*/ /* constants */ IA64_OPND_AR_CSD, /* application register csd (ar.csd) */ IA64_OPND_AR_CCV, /* application register ccv (ar.ccv) */ IA64_OPND_AR_PFS, /* application register pfs (ar.pfs) */ IA64_OPND_C1, /* the constant 1 */ IA64_OPND_C8, /* the constant 8 */ IA64_OPND_C16, /* the constant 16 */ IA64_OPND_GR0, /* gr0 */ IA64_OPND_IP, /* instruction pointer (ip) */ IA64_OPND_PR, /* predicate register (pr) */ IA64_OPND_PR_ROT, /* rotating predicate register (pr.rot) */ IA64_OPND_PSR, /* processor status register (psr) */ IA64_OPND_PSR_L, /* processor status register L (psr.l) */ IA64_OPND_PSR_UM, /* processor status register UM (psr.um) */ /* register operands: */ IA64_OPND_AR3, /* third application register # (bits 20-26) */ IA64_OPND_B1, /* branch register # (bits 6-8) */ IA64_OPND_B2, /* branch register # (bits 13-15) */ IA64_OPND_CR3, /* third control register # (bits 20-26) */ IA64_OPND_F1, /* first floating-point register # */ IA64_OPND_F2, /* second floating-point register # */ IA64_OPND_F3, /* third floating-point register # */ IA64_OPND_F4, /* fourth floating-point register # */ IA64_OPND_P1, /* first predicate # */ IA64_OPND_P2, /* second predicate # */ IA64_OPND_R1, /* first register # */ IA64_OPND_R2, /* second register # */ IA64_OPND_R3, /* third register # */ IA64_OPND_R3_2, /* third register # (limited to gr0-gr3) */ /* memory operands: */ IA64_OPND_MR3, /* memory at addr of third register # */ /* indirect operands: */ IA64_OPND_CPUID_R3, /* cpuid[reg] */ IA64_OPND_DBR_R3, /* dbr[reg] */ IA64_OPND_DTR_R3, /* dtr[reg] */ IA64_OPND_ITR_R3, /* itr[reg] */ IA64_OPND_IBR_R3, /* ibr[reg] */ IA64_OPND_MSR_R3, /* msr[reg] */ IA64_OPND_PKR_R3, /* pkr[reg] */ IA64_OPND_PMC_R3, /* pmc[reg] */ IA64_OPND_PMD_R3, /* pmd[reg] */ IA64_OPND_RR_R3, /* rr[reg] */ /* immediate operands: */ IA64_OPND_CCNT5, /* 5-bit count (31 - bits 20-24) */ IA64_OPND_CNT2a, /* 2-bit count (1 + bits 27-28) */ IA64_OPND_CNT2b, /* 2-bit count (bits 27-28): 1, 2, 3 */ IA64_OPND_CNT2c, /* 2-bit count (bits 30-31): 0, 7, 15, or 16 */ IA64_OPND_CNT5, /* 5-bit count (bits 14-18) */ IA64_OPND_CNT6, /* 6-bit count (bits 27-32) */ IA64_OPND_CPOS6a, /* 6-bit count (63 - bits 20-25) */ IA64_OPND_CPOS6b, /* 6-bit count (63 - bits 14-19) */ IA64_OPND_CPOS6c, /* 6-bit count (63 - bits 31-36) */ IA64_OPND_IMM1, /* signed 1-bit immediate (bit 36) */ IA64_OPND_IMMU2, /* unsigned 2-bit immediate (bits 13-14) */ IA64_OPND_IMMU5b, /* unsigned 5-bit immediate (32 + bits 14-18) */ IA64_OPND_IMMU7a, /* unsigned 7-bit immediate (bits 13-19) */ IA64_OPND_IMMU7b, /* unsigned 7-bit immediate (bits 20-26) */ IA64_OPND_SOF, /* 8-bit stack frame size */ IA64_OPND_SOL, /* 8-bit size of locals */ IA64_OPND_SOR, /* 6-bit number of rotating registers (scaled by 8) */ IA64_OPND_IMM8, /* signed 8-bit immediate (bits 13-19 & 36) */ IA64_OPND_IMM8U4, /* cmp4*u signed 8-bit immediate (bits 13-19 & 36) */ IA64_OPND_IMM8M1, /* signed 8-bit immediate -1 (bits 13-19 & 36) */ IA64_OPND_IMM8M1U4, /* cmp4*u signed 8-bit immediate -1 (bits 13-19 & 36)*/ IA64_OPND_IMM8M1U8, /* cmp*u signed 8-bit immediate -1 (bits 13-19 & 36) */ IA64_OPND_IMMU9, /* unsigned 9-bit immediate (bits 33-34, 20-26) */ IA64_OPND_IMM9a, /* signed 9-bit immediate (bits 6-12, 27, 36) */ IA64_OPND_IMM9b, /* signed 9-bit immediate (bits 13-19, 27, 36) */ IA64_OPND_IMM14, /* signed 14-bit immediate (bits 13-19, 27-32, 36) */ IA64_OPND_IMM17, /* signed 17-bit immediate (2*bits 6-12, 24-31, 36) */ IA64_OPND_IMMU21, /* unsigned 21-bit immediate (bits 6-25, 36) */ IA64_OPND_IMM22, /* signed 22-bit immediate (bits 13-19, 22-36) */ IA64_OPND_IMMU24, /* unsigned 24-bit immediate (bits 6-26, 31-32, 36) */ IA64_OPND_IMM44, /* signed 44-bit immediate (2^16*bits 6-32, 36) */ IA64_OPND_IMMU62, /* unsigned 62-bit immediate */ IA64_OPND_IMMU64, /* unsigned 64-bit immediate (lotsa bits...) */ IA64_OPND_INC3, /* signed 3-bit (bits 13-15): +/-1, 4, 8, 16 */ IA64_OPND_LEN4, /* 4-bit count (bits 27-30 + 1) */ IA64_OPND_LEN6, /* 6-bit count (bits 27-32 + 1) */ IA64_OPND_MBTYPE4, /* 4-bit mux type (bits 20-23) */ IA64_OPND_MHTYPE8, /* 8-bit mux type (bits 20-27) */ IA64_OPND_POS6, /* 6-bit count (bits 14-19) */ IA64_OPND_TAG13, /* signed 13-bit tag (ip + 16*bits 6-12, 33-34) */ IA64_OPND_TAG13b, /* signed 13-bit tag (ip + 16*bits 24-32) */ IA64_OPND_TGT25, /* signed 25-bit (ip + 16*bits 6-25, 36) */ IA64_OPND_TGT25b, /* signed 25-bit (ip + 16*bits 6-12, 20-32, 36) */ IA64_OPND_TGT25c, /* signed 25-bit (ip + 16*bits 13-32, 36) */ IA64_OPND_TGT64, /* 64-bit (
/*
    ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/

/**
 * @file    nullstreams.h
 * @brief   Null streams structures and macros.
 
 * @addtogroup null_streams
 * @{
 */

#ifndef _NULLSTREAMS_H_
#define _NULLSTREAMS_H_

/*===========================================================================*/
/* Driver constants.                                                         */
/*===========================================================================*/

/*===========================================================================*/
/* Driver pre-compile time settings.                                         */
/*===========================================================================*/

/*===========================================================================*/
/* Derived constants and error checks.                                       */
/*===========================================================================*/

/*===========================================================================*/
/* Driver data structures and types.                                         */
/*===========================================================================*/

/**
 * @brief   @p NullStream specific data.
 */
#define _null_stream_data                                                   \
  _base_sequential_stream_data

/**
 * @brief   @p NullStream virtual methods table.
 */
struct NullStreamVMT {
  _base_sequential_stream_methods
};

/**
 * @extends BaseSequentialStream
 *
 * @brief   Null stream object.
 */
typedef struct {
  /** @brief Virtual Methods Table.*/
  const struct NullStreamVMT *vmt;
  _null_stream_data
} NullStream;

/*===========================================================================*/
/* Driver macros.                                                            */
/*===========================================================================*/

/*===========================================================================*/
/* External declarations.                                                    */
/*===========================================================================*/

#ifdef __cplusplus
extern "C" {
#endif
  void nullObjectInit(NullStream *nsp);
#ifdef __cplusplus
}
#endif

#endif /* _NULLSTREAMS_H_ */

/** @} */