diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 16:24:55 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 16:24:55 +0900 |
commit | 56e8d7b5786dc2f7d1f701500f8914fd2c52b111 (patch) | |
tree | 68654c185bdf5badbddd9698dd14bb0166b9270e /include | |
parent | 2549b3222f588c188674aed0b9a0ef78bbba5c6c (diff) |
sh: kgdb stub cleanups.
Some kgdb cleanup. Move hexchars/highhex/lowhex to the header, so it can
be reused by sh-sci. Also drop silly ctrl_inl/outl() overloading being
done by the kgdb stub.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-sh/kgdb.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asm-sh/kgdb.h b/include/asm-sh/kgdb.h index 1653ffb75fb..7b26f53fe34 100644 --- a/include/asm-sh/kgdb.h +++ b/include/asm-sh/kgdb.h @@ -128,4 +128,19 @@ extern int setjmp(jmp_buf __jmpb); #define KGDB_ASSERT(condition, message) #endif +/* Taken from sh-stub.c of GDB 4.18 */ +static const char hexchars[] = "0123456789abcdef"; + +/* Get high hex bits */ +static inline char highhex(const int x) +{ + return hexchars[(x >> 4) & 0xf]; +} + +/* Get low hex bits */ +static inline char lowhex(const int x) +{ + return hexchars[x & 0xf]; +} + #endif |