diff options
author | Jim Blandy <jimb@codesourcery.com> | 2001-05-09 02:44:01 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2001-05-09 02:44:01 +0000 |
commit | ae83b20d8f8eff60f8bd9d7a131f7f60b06db772 (patch) | |
tree | aeaa7e456aedb3bb9fd4920c45000ce961d4dff0 /gdb/config | |
parent | bf4b70a5e89748322ccec3aa1c2423fee502e100 (diff) | |
download | gdb-ae83b20d8f8eff60f8bd9d7a131f7f60b06db772.zip gdb-ae83b20d8f8eff60f8bd9d7a131f7f60b06db772.tar.gz gdb-ae83b20d8f8eff60f8bd9d7a131f7f60b06db772.tar.bz2 |
Correct and expand handling of `movm' instruction, and register
saves in general.
* config/mn10300/tm-mn10300.h (D0_REGNUM, A0_REGNUM, MDRQ_REGNUM,
MCRH_REGNUM, MCRL_REGNUM, MCVF_REGNUM): New definitions.
(enum movm_register_bits): New enum.
* mn10300-tdep.c (set_movm_offsets): Use symbolic names for the
bits, not hex literals. Handle the `other', `exreg0', and
`exother' bits. Correct handling of `exreg1': it saves r4, r5,
r6, and r7, not r2, r3, r4, and r5.
(saved_regs_size): New function.
(mn10300_frame_chain, mn10300_frame_saved_pc): Use it, instead
of computing the same thing inline, incorrectly.
Diffstat (limited to 'gdb/config')
-rw-r--r-- | gdb/config/mn10300/tm-mn10300.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/config/mn10300/tm-mn10300.h b/gdb/config/mn10300/tm-mn10300.h index 87d8423..5178015 100644 --- a/gdb/config/mn10300/tm-mn10300.h +++ b/gdb/config/mn10300/tm-mn10300.h @@ -43,8 +43,10 @@ #define REGISTER_RAW_SIZE(REG) 4 #endif +#define D0_REGNUM 0 #define D2_REGNUM 2 #define D3_REGNUM 3 +#define A0_REGNUM 4 #define A2_REGNUM 6 #define A3_REGNUM 7 #define SP_REGNUM 8 @@ -53,7 +55,22 @@ #define PSW_REGNUM 11 #define LIR_REGNUM 12 #define LAR_REGNUM 13 +#define MDRQ_REGNUM 14 #define E0_REGNUM 15 +#define MCRH_REGNUM 26 +#define MCRL_REGNUM 27 +#define MCVF_REGNUM 28 + +enum movm_register_bits { + movm_exother_bit = 0x01, + movm_exreg1_bit = 0x02, + movm_exreg0_bit = 0x04, + movm_other_bit = 0x08, + movm_a3_bit = 0x10, + movm_a2_bit = 0x20, + movm_d3_bit = 0x40, + movm_d2_bit = 0x80 +}; #define INIT_FRAME_PC /* Not necessary */ |