diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-06-01 15:44:41 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-06-01 15:44:41 +0000 |
commit | ac9a91a77ce5ce484bf8f62582292ef1f5b4dcf3 (patch) | |
tree | 00ebb9456083a2ad26b6a4e64c40b9b28f570ef4 /gdb/d10v-tdep.c | |
parent | aa903cfb1b8b2b9d5d5d23364cbf0a31b7c8d29a (diff) | |
download | gdb-ac9a91a77ce5ce484bf8f62582292ef1f5b4dcf3.zip gdb-ac9a91a77ce5ce484bf8f62582292ef1f5b4dcf3.tar.gz gdb-ac9a91a77ce5ce484bf8f62582292ef1f5b4dcf3.tar.bz2 |
import gdb-1999-06-01 snapshot
Diffstat (limited to 'gdb/d10v-tdep.c')
-rw-r--r-- | gdb/d10v-tdep.c | 50 |
1 files changed, 35 insertions, 15 deletions
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index 0ceee9f..e5f4d6d 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -151,24 +151,43 @@ d10v_register_virtual_type (reg_nr) return builtin_type_short; } -#if 0 /* convert $pc and $sp to/from virtual addresses */ -#define REGISTER_CONVERTIBLE(N) ((N) == PC_REGNUM || (N) == SP_REGNUM) -#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \ -{ \ - ULONGEST x = extract_unsigned_integer ((FROM), REGISTER_RAW_SIZE (REGNUM)); \ - if (REGNUM == PC_REGNUM) x = (x << 2) | IMEM_START; \ - else x |= DMEM_START; \ - store_unsigned_integer ((TO), TYPE_LENGTH(TYPE), x); \ +int +d10v_register_convertible (nr) + int nr; +{ + return ((nr) == PC_REGNUM || (nr) == SP_REGNUM); +} + +void +d10v_register_convert_to_virtual (regnum, type, from, to) + int regnum; + struct type *type; + char *from; + char *to; +{ + ULONGEST x = extract_unsigned_integer (from, REGISTER_RAW_SIZE (regnum)); + if (regnum == PC_REGNUM) + x = (x << 2) | IMEM_START; + else + x |= DMEM_START; + store_unsigned_integer (to, TYPE_LENGTH (type), x); } -#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \ -{ \ - ULONGEST x = extract_unsigned_integer ((FROM), TYPE_LENGTH(TYPE)); \ - x &= 0x3ffff; \ - if (REGNUM == PC_REGNUM) x >>= 2; \ - store_unsigned_integer ((TO), 2, x); \ + +void +d10v_register_convert_to_raw (type, regnum, from, to) + struct type *type; + int regnum; + char *from; + char *to; +{ + ULONGEST x = extract_unsigned_integer (from, TYPE_LENGTH (type)); + x &= 0x3ffff; + if (regnum == PC_REGNUM) + x >>= 2; + store_unsigned_integer (to, 2, x); } -#endif + CORE_ADDR d10v_make_daddr (x) @@ -1263,6 +1282,7 @@ display_trace (low, high) } } + extern void (*target_resume_hook) PARAMS ((void)); extern void (*target_wait_loop_hook) PARAMS ((void)); |