* compile.c: Fix formatting.
+2000-06-13 Kazu Hirata <kazu@hxi.com>
+
+ * compile.c: Fix formatting.
+
Tue May 23 21:39:23 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
Tue May 23 21:39:23 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
-/* The rate at which to call the host's poll_quit callback. */
+/* The rate at which to call the host's poll_quit callback. */
#define POLL_QUIT_INTERVAL 0x80000
#define POLL_QUIT_INTERVAL 0x80000
lvalue (x, rn)
{
switch (x / 4)
lvalue (x, rn)
{
switch (x / 4)
return X (OP_REG, SP);
case OP_MEM:
return X (OP_REG, SP);
case OP_MEM:
int rd = 0;
int rdisp = 0;
int abs = 0;
int rd = 0;
int rdisp = 0;
int abs = 0;
struct h8_opcode *q = h8_opcodes;
int size = 0;
struct h8_opcode *q = h8_opcodes;
int size = 0;
dst->dst.type = -1;
dst->src.type = -1;
dst->dst.type = -1;
dst->src.type = -1;
- /* Find the exact opcode/arg combo */
+
+ /* Find the exact opcode/arg combo. */
while (q->name)
{
op_type *nib;
while (q->name)
{
op_type *nib;
{
if (!(((int) thisnib & 0x8) != 0))
goto fail;
{
if (!(((int) thisnib & 0x8) != 0))
goto fail;
- looking_for = (op_type) ((int) looking_for & ~(int)
- B31);
+
+ looking_for = (op_type) ((int) looking_for & ~(int) B31);
if ((int) looking_for & (int) B30)
{
if (!(((int) thisnib & 0x8) == 0))
goto fail;
if ((int) looking_for & (int) B30)
{
if (!(((int) thisnib & 0x8) == 0))
goto fail;
looking_for = (op_type) ((int) looking_for & ~(int) B30);
}
looking_for = (op_type) ((int) looking_for & ~(int) B30);
}
if (looking_for & DBIT)
{
if ((looking_for & 5) != (thisnib & 5))
goto fail;
if (looking_for & DBIT)
{
if ((looking_for & 5) != (thisnib & 5))
goto fail;
abs = (thisnib & 0x8) ? 2 : 1;
}
else if (looking_for & (REG | IND | INC | DEC))
{
if (looking_for & REG)
{
abs = (thisnib & 0x8) ? 2 : 1;
}
else if (looking_for & (REG | IND | INC | DEC))
{
if (looking_for & REG)
{
- /*
- * Can work out size from the
- * register
- */
+ /* Can work out size from the register. */
size = bitfrom (looking_for);
}
if (looking_for & SRC)
size = bitfrom (looking_for);
}
if (looking_for & SRC)
}
else if (looking_for & L_16)
{
}
else if (looking_for & L_16)
{
}
else if (looking_for & ABSJMP)
{
}
else if (looking_for & ABSJMP)
{
- abs =
- (data[1] << 16)
- | (data[2] << 8)
- | (data[3]);
+ abs = (data[1] << 16) | (data[2] << 8) | (data[3]);
}
else if (looking_for & MEMIND)
{
}
else if (looking_for & MEMIND)
{
else if (looking_for & L_32)
{
int i = len >> 1;
else if (looking_for & L_32)
{
int i = len >> 1;
abs = (data[i] << 24)
| (data[i + 1] << 16)
| (data[i + 2] << 8)
abs = (data[i] << 24)
| (data[i + 1] << 16)
| (data[i + 2] << 8)
else if (looking_for & L_24)
{
int i = len >> 1;
else if (looking_for & L_24)
{
int i = len >> 1;
abs = (data[i] << 16) | (data[i + 1] << 8) | (data[i + 2]);
plen = 24;
}
else if (looking_for & IGNORE)
{
abs = (data[i] << 16) | (data[i + 1] << 8) | (data[i + 2]);
plen = 24;
}
else if (looking_for & IGNORE)
{
}
else if (looking_for & DISPREG)
{
}
else if (looking_for & DISPREG)
{
{
plen = 8;
abs = h8300hmode ? ~0xff0000ff : ~0xffff00ff;
{
plen = 8;
abs = h8300hmode ? ~0xff0000ff : ~0xffff00ff;
- abs |= data[len >> 1] & 0xff ;
+ abs |= data[len >> 1] & 0xff;
{
abs = data[len >> 1] & 0xff;
}
{
abs = data[len >> 1] & 0xff;
}
+ /* Fill in the args. */
{
op_type *args = q->args.nib;
int hadone = 0;
{
op_type *args = q->args.nib;
int hadone = 0;
- {
- p = &(dst->dst);
- }
- {
- p = &(dst->src);
- }
{
p->type = X (OP_IMM, size);
p->literal = bit;
{
p->type = X (OP_IMM, size);
p->literal = bit;
- /*
- * But a jmp or a jsr gets
- * automagically lvalued, since we
- * branch to their address not their
- * contents
- */
+ /* But a jmp or a jsr gets automagically lvalued,
+ since we branch to their address not their
+ contents. */
if (q->how == O (O_JSR, SB)
|| q->how == O (O_JMP, SB))
{
if (q->how == O (O_JSR, SB)
|| q->how == O (O_JMP, SB))
{
dst->opcode = q->how;
dst->cycles = q->time;
dst->opcode = q->how;
dst->cycles = q->time;
- /* And a jsr to 0xc4 is turned into a magic trap */
+ /* And a jsr to 0xc4 is turned into a magic trap. */
if (dst->opcode == O (O_JSR, SB))
{
if (dst->opcode == O (O_JSR, SB))
{
- {
- printf ("Dont understand %x \n", looking_for);
- }
+ printf ("Dont understand %x \n", looking_for);
+ /* Fell off the end. */
dst->opcode = O (O_ILL, SB);
}
dst->opcode = O (O_ILL, SB);
}
static void
compile (pc)
{
static void
compile (pc)
{