mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 19:09:31 +08:00
* interp.c (do_format_4): Get operands correctly and
call the target function. * simops.c: Rough cut at "sld.b", "sld.h", "sld.w", "sst.b", "sst.h", and "sst.w".
This commit is contained in:
@ -1,5 +1,10 @@
|
|||||||
Thu Aug 29 13:53:29 1996 Jeffrey A Law (law@cygnus.com)
|
Thu Aug 29 13:53:29 1996 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
|
* interp.c (do_format_4): Get operands correctly and
|
||||||
|
call the target function.
|
||||||
|
* simops.c: Rough cut at "sld.b", "sld.h", "sld.w", "sst.b",
|
||||||
|
"sst.h", and "sst.w".
|
||||||
|
|
||||||
* v850_sim.h: The V850 doesn't have split I&D spaces. Change
|
* v850_sim.h: The V850 doesn't have split I&D spaces. Change
|
||||||
accordingly. Remove many unused definitions.
|
accordingly. Remove many unused definitions.
|
||||||
* interp.c: The V850 doesn't have split I&D spaces. Change
|
* interp.c: The V850 doesn't have split I&D spaces. Change
|
||||||
|
@ -154,7 +154,13 @@ static void
|
|||||||
do_format_4 (insn)
|
do_format_4 (insn)
|
||||||
uint32 insn;
|
uint32 insn;
|
||||||
{
|
{
|
||||||
|
struct hash_entry *h;
|
||||||
printf("format 4 0x%x\n", insn);
|
printf("format 4 0x%x\n", insn);
|
||||||
|
|
||||||
|
h = lookup_hash (insn);
|
||||||
|
OP[0] = (insn >> 11) & 0x1f;
|
||||||
|
OP[1] = (insn & 0x7f);
|
||||||
|
(h->ops->func) ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -6,36 +6,86 @@
|
|||||||
void
|
void
|
||||||
OP_300 ()
|
OP_300 ()
|
||||||
{
|
{
|
||||||
|
unsigned int op0, op1, op2;
|
||||||
|
int result, temp;
|
||||||
|
|
||||||
|
temp = OP[1];
|
||||||
|
temp = (temp << 25) >> 25;
|
||||||
|
op2 = temp;
|
||||||
|
result = get_byte (State.mem + State.regs[30] + op2);
|
||||||
|
result = (result << 24) >> 24;
|
||||||
|
State.regs[OP[0]] = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sld.h */
|
/* sld.h */
|
||||||
void
|
void
|
||||||
OP_400 ()
|
OP_400 ()
|
||||||
{
|
{
|
||||||
|
unsigned int op0, op1, op2;
|
||||||
|
int result, temp;
|
||||||
|
|
||||||
|
temp = OP[1];
|
||||||
|
temp = (temp << 25) >> 25;
|
||||||
|
op2 = temp << 1;
|
||||||
|
result = get_half (State.mem + State.regs[30] + op2);
|
||||||
|
result = (result << 16) >> 16;
|
||||||
|
State.regs[OP[0]] = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sld.w */
|
/* sld.w */
|
||||||
void
|
void
|
||||||
OP_500 ()
|
OP_500 ()
|
||||||
{
|
{
|
||||||
|
unsigned int op0, op1, op2;
|
||||||
|
int result, temp;
|
||||||
|
|
||||||
|
temp = OP[1];
|
||||||
|
temp = (temp << 25) >> 25;
|
||||||
|
op2 = temp << 2;
|
||||||
|
result = get_word (State.mem + State.regs[30] + op2);
|
||||||
|
State.regs[OP[0]] = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sst.b */
|
/* sst.b */
|
||||||
void
|
void
|
||||||
OP_380 ()
|
OP_380 ()
|
||||||
{
|
{
|
||||||
|
unsigned int op0, op1, op2;
|
||||||
|
int result, temp;
|
||||||
|
|
||||||
|
op0 = State.regs[OP[0]];
|
||||||
|
temp = OP[1];
|
||||||
|
temp = (temp << 25) >> 25;
|
||||||
|
op1 = temp;
|
||||||
|
put_byte (State.mem + State.regs[30] + op1, op0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sst.h */
|
/* sst.h */
|
||||||
void
|
void
|
||||||
OP_480 ()
|
OP_480 ()
|
||||||
{
|
{
|
||||||
|
unsigned int op0, op1, op2;
|
||||||
|
int result, temp;
|
||||||
|
|
||||||
|
op0 = State.regs[OP[0]];
|
||||||
|
temp = OP[1];
|
||||||
|
temp = (temp << 25) >> 25;
|
||||||
|
op1 = temp << 1;
|
||||||
|
put_half (State.mem + State.regs[30] + op1, op0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sst.w */
|
/* sst.w */
|
||||||
void
|
void
|
||||||
OP_501 ()
|
OP_501 ()
|
||||||
{
|
{
|
||||||
|
unsigned int op0, op1, op2;
|
||||||
|
int result, temp;
|
||||||
|
|
||||||
|
op0 = State.regs[OP[0]];
|
||||||
|
temp = OP[1];
|
||||||
|
temp = (temp << 25) >> 25;
|
||||||
|
op1 = temp << 2;
|
||||||
|
put_word (State.mem + State.regs[30] + op1, op0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ld.b */
|
/* ld.b */
|
||||||
|
Reference in New Issue
Block a user