* config/tc-tic30.c: Fix formatting.
* config/tc-tic80.c: Likewise.
* config/tc-v850.c: Likewise.
* config/tc-vax.c: Likewise.
* config/tc-w65.c: Likewise.
* config/tc-z8k.c: Likewise.
+2000-11-15 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-tic30.c: Fix formatting.
+ * config/tc-tic80.c: Likewise.
+ * config/tc-v850.c: Likewise.
+ * config/tc-vax.c: Likewise.
+ * config/tc-w65.c: Likewise.
+ * config/tc-z8k.c: Likewise.
+
2000-11-14 DJ Delorie <dj@redhat.com>
* config/tc-v850.c: Support dwarf2.
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/*
- Texas Instruments TMS320C30 machine specific gas.
+/* Texas Instruments TMS320C30 machine specific gas.
Written by Steven Haworth (steve@pm.cse.rmit.edu.au).
Bugs & suggestions are completely welcome. This is free software.
- Please help us make it better.
- */
+ Please help us make it better. */
#include "as.h"
#include "opcode/tic30.h"
-/* put here all non-digit non-letter charcters that may occur in an operand */
+/* Put here all non-digit non-letter charcters that may occur in an
+ operand. */
static char operand_special_chars[] = "%$-+(,)*._~/<>&^!:[@]";
-static char *ordinal_names[] =
-{"first", "second", "third", "fourth", "fifth"};
+static char *ordinal_names[] = {
+ "first", "second", "third", "fourth", "fifth"
+};
const int md_reloc_size = 0;
const char line_separator_chars[] = "";
const char *md_shortopts = "";
-struct option md_longopts[] =
-{
+struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
size_t md_longopts_size = sizeof (md_longopts);
-/* Chars that mean this number is a floating point constant */
+/* Chars that mean this number is a floating point constant. */
/* As in 0f12.456 */
/* or 0d1.2345e12 */
const char FLT_CHARS[] = "fFdDxX";
-/* Chars that can be used to separate mant from exp in floating point nums */
+/* Chars that can be used to separate mant from exp in floating point
+ nums. */
const char EXP_CHARS[] = "eE";
/* tables for lexical analysis */
#define is_identifier_char(x) (identifier_chars[(unsigned char) x])
#define is_digit_char(x) (digit_chars[(unsigned char) x])
-const pseudo_typeS md_pseudo_table[] =
-{
+const pseudo_typeS md_pseudo_table[] = {
{0, 0, 0}
};
#include <stdarg.h>
int
-debug (const char *string,...)
+debug (const char *string, ...)
{
if (flag_debug)
{
#define PC_Register 0x00000000
#define PC_Relative 0x02000000
-typedef struct
-{
+typedef struct {
unsigned op_type;
- struct
- {
- int resolved;
- unsigned address;
- char *label;
- expressionS direct_expr;
- }
- direct;
- struct
- {
- unsigned mod;
- int ARnum;
- unsigned char disp;
- }
- indirect;
- struct
- {
- unsigned opcode;
- }
- reg;
- struct
- {
- int resolved;
- int decimal_found;
- float f_number;
- int s_number;
- unsigned int u_number;
- char *label;
- expressionS imm_expr;
- }
- immediate;
-}
-operand;
+ struct {
+ int resolved;
+ unsigned address;
+ char *label;
+ expressionS direct_expr;
+ } direct;
+ struct {
+ unsigned mod;
+ int ARnum;
+ unsigned char disp;
+ } indirect;
+ struct {
+ unsigned opcode;
+ } reg;
+ struct {
+ int resolved;
+ int decimal_found;
+ float f_number;
+ int s_number;
+ unsigned int u_number;
+ char *label;
+ expressionS imm_expr;
+ } immediate;
+} operand;
int tic30_parallel_insn PARAMS ((char *));
operand *tic30_operand PARAMS ((char *));
template *opcode;
-struct tic30_insn
- {
- template *tm; /* Template of current instruction */
- unsigned opcode; /* Final opcode */
- int operands; /* Number of given operands */
- /* Type of operand given in instruction */
- operand *operand_type[MAX_OPERANDS];
- unsigned addressing_mode; /* Final addressing mode of instruction */
- };
+struct tic30_insn {
+ template *tm; /* Template of current instruction */
+ unsigned opcode; /* Final opcode */
+ int operands; /* Number of given operands */
+ /* Type of operand given in instruction */
+ operand *operand_type[MAX_OPERANDS];
+ unsigned addressing_mode; /* Final addressing mode of instruction */
+};
struct tic30_insn insn;
static int found_parallel_insn;
debug ("\n");
}
-struct tic30_par_insn
-{
+struct tic30_par_insn {
partemplate *tm; /* Template of current parallel instruction */
int operands[2]; /* Number of given operands for each insn */
/* Type of operand given in instruction */
extern void obj_coff_section ();
-const pseudo_typeS md_pseudo_table[] =
-{
+const pseudo_typeS md_pseudo_table[] = {
{ "align", s_align_bytes, 4 }, /* Do byte alignment, default is a 4 byte boundary */
{ "word", cons, 4 }, /* FIXME: Should this be machine independent? */
{ "bss", s_lcomm_bytes, 1 },
static int processor_mask = -1;
\f
/* Structure to hold information about predefined registers. */
-struct reg_name
-{
+struct reg_name {
const char *name;
int value;
};
as in 0d1.0. */
const char FLT_CHARS[] = "dD";
\f
-const relax_typeS md_relax_table[] =
-{
+const relax_typeS md_relax_table[] = {
/* Conditional branches. */
{0xff, -0x100, 2, 1},
{0x1fffff, -0x200000, 6, 0},
/* Fixups. */
#define MAX_INSN_FIXUPS (5)
-struct v850_fixup
-{
+struct v850_fixup {
expressionS exp;
int opindex;
bfd_reloc_code_real_type reloc;
}
/* The target specific pseudo-ops which we support. */
-const pseudo_typeS md_pseudo_table[] =
-{
+const pseudo_typeS md_pseudo_table[] = {
{"sdata", v850_sdata, 0},
{"tdata", v850_tdata, 0},
{"zdata", v850_zdata, 0},
static struct hash_control *v850_hash;
/* This table is sorted. Suitable for searching by a binary search. */
-static const struct reg_name pre_defined_registers[] =
-{
+static const struct reg_name pre_defined_registers[] = {
{ "ep", 30 }, /* ep - element ptr */
{ "gp", 4 }, /* gp - global ptr */
{ "hp", 2 }, /* hp - handler stack ptr */
#define REG_NAME_CNT \
(sizeof (pre_defined_registers) / sizeof (struct reg_name))
-static const struct reg_name system_registers[] =
-{
+static const struct reg_name system_registers[] = {
{ "ctbp", 20 },
{ "ctpc", 16 },
{ "ctpsw", 17 },
#define SYSREG_NAME_CNT \
(sizeof (system_registers) / sizeof (struct reg_name))
-static const struct reg_name system_list_registers[] =
-{
+static const struct reg_name system_list_registers[] = {
{"PS", 5 },
{"SR", 0 + 1}
};
#define SYSREGLIST_NAME_CNT \
(sizeof (system_list_registers) / sizeof (struct reg_name))
-static const struct reg_name cc_names[] =
-{
+static const struct reg_name cc_names[] = {
{ "c", 0x1 },
{ "e", 0x2 },
{ "ge", 0xe },
CONST char *md_shortopts = "m:";
-struct option md_longopts[] =
-{
+struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
void
md_convert_frag (abfd, sec, fragP)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- fragS *fragP;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ fragS *fragP;
{
subseg_change (sec, 0);
as_bad (_("Unable to determine default target processor from string: %s"),
TARGET_CPU);
- v850_hash = hash_new();
+ v850_hash = hash_new ();
/* Insert unique names into hash table. The V850 instruction set
has many identical opcode names that have different opcodes based
#define OP_BVS 0x70
void s_longa ();
-const pseudo_typeS md_pseudo_table[] =
-{
+
+const pseudo_typeS md_pseudo_table[] = {
{"int", cons, 2},
{"word", cons, 2},
{"longa", s_longa, 0},
const char EXP_CHARS[] = "eE";
-/* Chars that mean this number is a floating point constant */
+/* Chars that mean this number is a floating point constant. */
/* As in 0f12.456 */
/* or 0d1.2345e12 */
const char FLT_CHARS[] = "rRsSfFdDxXpP";
-static struct hash_control *opcode_hash_control; /* Opcode mnemonics */
+/* Opcode mnemonics */
+static struct hash_control *opcode_hash_control;
int M; /* M flag */
int X; /* X flag */
linkrelax = 1;
}
-struct z8k_exp
-{
+struct z8k_exp {
char *e_beg;
char *e_end;
expressionS e_exp;
};
-typedef struct z8k_op
-{
+typedef struct z8k_op {
/* 'b','w','r','q'. */
char regsize;
/* Any expression. */
expressionS exp;
-}
-
-op_type;
+} op_type;
static expressionS *da_operand;
static expressionS *imm_operand;
}
}
-struct ctrl_names
-{
+struct ctrl_names {
int value;
char *name;
};
return;
}
-struct flag_names
-{
+struct flag_names {
int value;
char *name;
return;
}
-struct interrupt_names
-{
+struct interrupt_names {
int value;
char *name;
};
-struct interrupt_names intr_table[] =
-{
+struct interrupt_names intr_table[] = {
0x1, "nvi",
0x2, "vi",
0x3, "both",
return;
}
-struct cc_names
-{
+struct cc_names {
int value;
char *name;
/* Now we know what sort of opcodes it is. Let's build the bytes. */
#define INSERT(x,y) *x++ = y>>24; *x++ = y>> 16; *x++=y>>8; *x++ =y;
+
static void
build_bytes (this_try, operand)
opcode_entry_type *this_try;