opcodes/ChangeLog
* cr16-dis.c (match_opcode,make_instruction: Remove static declaration. (dwordU,wordU): Moved typedefs to opcode/cr16.h (cr16_words,cr16_allWords,cr16_currInsn): Added prefix 'cr16_' bfd/Changelog * config.bfd (cr16*-*-uclinux*): New target support. include/opcode/ChangeLog * cr16.h (dwordU,wordU): Moved typedefs from cr16-dis.c (make_instruction,match_opcode): Added function prototypes. (cr16_words,cr16_allWords,cr16_currInsn): Declare as extern.
This commit is contained in:
parent
3b1c1875dd
commit
ff84dbd31f
@ -1,3 +1,9 @@
|
||||
2013-01-02 Kaushik Phatak <kaushik.phatak@kpitcummins.com>
|
||||
|
||||
* cr16.h (dwordU,wordU): Moved typedefs from cr16-dis.c
|
||||
(make_instruction,match_opcode): Added function prototypes.
|
||||
(cr16_words,cr16_allWords,cr16_currInsn): Declare as extern.
|
||||
|
||||
2012-11-23 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* ppc.h (ppc_parse_cpu): Update prototype.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* cr16.h -- Header file for CR16 opcode and register tables.
|
||||
Copyright 2007, 2008, 2010 Free Software Foundation, Inc.
|
||||
Copyright 2007, 2008, 2010, 2013 Free Software Foundation, Inc.
|
||||
Contributed by M R Swami Reddy
|
||||
|
||||
This file is part of GAS, GDB and the GNU binutils.
|
||||
@ -26,7 +26,7 @@
|
||||
Therefore, order MUST be preserved. */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
{
|
||||
/* 16-bit general purpose registers. */
|
||||
r0, r1, r2, r3,
|
||||
r4, r5, r6, r7,
|
||||
@ -40,7 +40,7 @@ typedef enum
|
||||
/* Not a register. */
|
||||
nullregister,
|
||||
MAX_REG
|
||||
}
|
||||
}
|
||||
reg;
|
||||
|
||||
/* CR16 processor registers and special registers :
|
||||
@ -48,7 +48,7 @@ reg;
|
||||
(cr16_pregtab). Therefore, order MUST be preserved. */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
{
|
||||
/* processor registers. */
|
||||
dbs = MAX_REG,
|
||||
dsr, dcrl, dcrh,
|
||||
@ -64,17 +64,17 @@ typedef enum
|
||||
/* Not a processor register. */
|
||||
nullpregister = usph + 1,
|
||||
MAX_PREG
|
||||
}
|
||||
}
|
||||
preg;
|
||||
|
||||
/* CR16 Register types. */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
{
|
||||
CR16_R_REGTYPE, /* r<N> */
|
||||
CR16_RP_REGTYPE, /* reg pair */
|
||||
CR16_P_REGTYPE /* Processor register */
|
||||
}
|
||||
}
|
||||
reg_type;
|
||||
|
||||
/* CR16 argument types :
|
||||
@ -89,10 +89,10 @@ reg_type;
|
||||
idxrp - index with register pair
|
||||
rbase - register base
|
||||
rpbase - register pair base
|
||||
pr - processor register */
|
||||
pr - processor register. */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
{
|
||||
arg_r,
|
||||
arg_c,
|
||||
arg_cr,
|
||||
@ -110,13 +110,13 @@ typedef enum
|
||||
arg_ra,
|
||||
/* Not an argument. */
|
||||
nullargs
|
||||
}
|
||||
}
|
||||
argtype;
|
||||
|
||||
/* CR16 operand types:The operand types correspond to instructions operands.*/
|
||||
/* CR16 operand types:The operand types correspond to instructions operands. */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
{
|
||||
dummy,
|
||||
/* N-bit signed immediate. */
|
||||
imm3, imm4, imm5, imm6, imm16, imm20, imm32,
|
||||
@ -151,7 +151,7 @@ typedef enum
|
||||
nulloperand,
|
||||
/* Maximum supported operand. */
|
||||
MAX_OPRD
|
||||
}
|
||||
}
|
||||
operand_type;
|
||||
|
||||
/* CR16 instruction types. */
|
||||
@ -239,18 +239,18 @@ operand_type;
|
||||
/* Single operand description. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
{
|
||||
/* Operand type. */
|
||||
operand_type op_type;
|
||||
/* Operand location within the opcode. */
|
||||
unsigned int shift;
|
||||
}
|
||||
}
|
||||
operand_desc;
|
||||
|
||||
/* Instruction data structure used in instruction table. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
{
|
||||
/* Name. */
|
||||
const char *mnemonic;
|
||||
/* Size (in words). */
|
||||
@ -264,13 +264,13 @@ typedef struct
|
||||
unsigned int flags;
|
||||
/* Operands (always last, so unreferenced operands are initialized). */
|
||||
operand_desc operands[MAX_OPERANDS];
|
||||
}
|
||||
}
|
||||
inst;
|
||||
|
||||
/* Data structure for a single instruction's arguments (Operands). */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
{
|
||||
/* Register or base register. */
|
||||
reg r;
|
||||
/* Register pair register. */
|
||||
@ -293,14 +293,14 @@ typedef struct
|
||||
int size;
|
||||
/* The type of the expression. */
|
||||
unsigned char X_op;
|
||||
}
|
||||
}
|
||||
argument;
|
||||
|
||||
/* Internal structure to hold the various entities
|
||||
corresponding to the current assembling instruction. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
{
|
||||
/* Number of arguments. */
|
||||
int nargs;
|
||||
/* The argument data structure for storing args (operands). */
|
||||
@ -313,37 +313,37 @@ typedef struct
|
||||
#endif /* TC_CR16 */
|
||||
/* Instruction size (in bytes). */
|
||||
int size;
|
||||
}
|
||||
}
|
||||
ins;
|
||||
|
||||
/* Structure to hold information about predefined operands. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
{
|
||||
/* Size (in bits). */
|
||||
unsigned int bit_size;
|
||||
/* Argument type. */
|
||||
argtype arg_type;
|
||||
/* One bit syntax flags. */
|
||||
int flags;
|
||||
}
|
||||
}
|
||||
operand_entry;
|
||||
|
||||
/* Structure to hold trap handler information. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
{
|
||||
/* Trap name. */
|
||||
char *name;
|
||||
/* Index in dispatch table. */
|
||||
unsigned int entry;
|
||||
}
|
||||
}
|
||||
trap_entry;
|
||||
|
||||
/* Structure to hold information about predefined registers. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
{
|
||||
/* Name (string representation). */
|
||||
char *name;
|
||||
/* Value (enum representation). */
|
||||
@ -358,7 +358,7 @@ typedef struct
|
||||
int image;
|
||||
/* Register type. */
|
||||
reg_type type;
|
||||
}
|
||||
}
|
||||
reg_entry;
|
||||
|
||||
/* CR16 opcode table. */
|
||||
@ -435,4 +435,17 @@ extern const inst *instruction;
|
||||
typedef long long int LONGLONG;
|
||||
typedef unsigned long long ULONGLONG;
|
||||
|
||||
/* Data types for opcode handling. */
|
||||
typedef unsigned long dwordU;
|
||||
typedef unsigned short wordU;
|
||||
|
||||
/* Globals to store opcode data and build the instruction. */
|
||||
extern wordU cr16_words[3];
|
||||
extern ULONGLONG cr16_allWords;
|
||||
extern ins cr16_currInsn;
|
||||
|
||||
/* Prototypes for function in cr16-dis.c. */
|
||||
extern void make_instruction (void);
|
||||
extern int match_opcode (void);
|
||||
|
||||
#endif /* _CR16_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user