diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2006-03-17 15:31:13 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2006-03-17 15:31:13 +0000 |
commit | 26d61ce4d309779e1e36f537c2d5408fb438342b (patch) | |
tree | b0f9bdf128d2fbaf4e930b3cb39d0b77fd2d5b88 /c | |
parent | Apply @sysdirpattern@ (diff) | |
download | rtems-26d61ce4d309779e1e36f537c2d5408fb438342b.tar.bz2 |
2006-03-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* shared/interrupts/vectorexceptions.c: Merger with submission from
Bruce Robinson <brucer@pmccorp.com>.
Make some arrays static const.
Diffstat (limited to 'c')
-rw-r--r-- | c/src/lib/libcpu/mips/ChangeLog | 6 | ||||
-rw-r--r-- | c/src/lib/libcpu/mips/shared/interrupts/vectorexceptions.c | 17 |
2 files changed, 17 insertions, 6 deletions
diff --git a/c/src/lib/libcpu/mips/ChangeLog b/c/src/lib/libcpu/mips/ChangeLog index 26780e63c3..e8d4c47b9e 100644 --- a/c/src/lib/libcpu/mips/ChangeLog +++ b/c/src/lib/libcpu/mips/ChangeLog @@ -1,3 +1,9 @@ +2006-03-17 Ralf Corsépius <ralf.corsepius@rtems.org> + + * shared/interrupts/vectorexceptions.c: Merger with submission from + Bruce Robinson <brucer@pmccorp.com>. + Make some arrays static const. + 2006-03-16 Ralf Corsépius <ralf.corsepius@rtems.org> * Makefile.am, configure.ac: Reflect addition of rm52xx, tx49. diff --git a/c/src/lib/libcpu/mips/shared/interrupts/vectorexceptions.c b/c/src/lib/libcpu/mips/shared/interrupts/vectorexceptions.c index 80ddd0fd82..2781b8dfb9 100644 --- a/c/src/lib/libcpu/mips/shared/interrupts/vectorexceptions.c +++ b/c/src/lib/libcpu/mips/shared/interrupts/vectorexceptions.c @@ -14,7 +14,7 @@ #include <rtems/mips/idtcpu.h> #include <rtems/bspIo.h> -char *cause_strings[32] = +static const char *cause_strings[32] = { /* 0 */ "Int", /* 1 */ "TLB Mods", @@ -55,7 +55,7 @@ struct regdef char *name; }; -struct regdef dumpregs[]= { +static const struct regdef dumpregs[]= { { R_RA, "R_RA" }, { R_V0, "R_V0" }, { R_V1, "R_V1" }, { R_A0, "R_A0" }, { R_A1, "R_A1" }, { R_A2, "R_A2" }, { R_A3, "R_A3" }, { R_T0, "R_T0" }, { R_T1, "R_T1" }, @@ -68,23 +68,28 @@ struct regdef dumpregs[]= { void mips_dump_exception_frame( CPU_Interrupt_frame *frame ) { - unsigned int *frame_u32; + uint32_t *frame_u32; int i, j; - frame_u32 = (uint32_t*)frame; + frame_u32 = (uint32_t *)frame; for(i=0; dumpregs[i].offset > -1; i++) { printk(" %s", dumpregs[i].name); for(j=0; j< 7-strlen(dumpregs[i].name); j++) printk(" "); +#if (__mips == 1 ) || (__mips == 32) printk(" %08X%c", frame_u32[dumpregs[i].offset], (i%3) ? '\t' : '\n' ); +#elif __mips == 3 + printk(" %08X", frame_u32[2 * dumpregs[i].offset + 1] ); + printk("%08X%c", frame_u32[2 * dumpregs[i].offset], (i%2) ? '\t' : '\n' ); +#endif } printk( "\n" ); } void mips_default_exception_code_handler( int exc, CPU_Interrupt_frame *frame ) { - unsigned int sr; - unsigned int cause; + uint32_t sr; + uint32_t cause; mips_get_sr( sr ); mips_get_cause( cause ); |