-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[POWERPC] Make xmon disassembly optional
While adding spu disassembly support it struck me that we're actually carrying quite a lot of code around, just to do disassembly in the case of a crash. While on large systems it's not an issue, on smaller ones it might be nice to have xmon - but without the weight of the disassembly support. For a Cell build this saves ~230KB (!), and for pSeries ~195KB. We still support the 'di' and 'sdi' commands, however they just dump the instruction in hex. Move the definitions into a header to clean xmon.c just a tiny bit. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
- Loading branch information
Michael Ellerman
authored and
Paul Mackerras
committed
Dec 4, 2006
1 parent
af89fb8
commit e042604
Showing
6 changed files
with
49 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#ifndef _POWERPC_XMON_DIS_ASM_H | ||
#define _POWERPC_XMON_DIS_ASM_H | ||
/* | ||
* Copyright (C) 2006 Michael Ellerman, IBM Corporation. | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version | ||
* 2 of the License, or (at your option) any later version. | ||
*/ | ||
|
||
extern void print_address (unsigned long memaddr); | ||
|
||
#ifdef CONFIG_XMON_DISASSEMBLY | ||
extern int print_insn_powerpc(unsigned long insn, unsigned long memaddr); | ||
extern int print_insn_spu(unsigned long insn, unsigned long memaddr); | ||
#else | ||
static inline int print_insn_powerpc(unsigned long insn, unsigned long memaddr) | ||
{ | ||
printf("%.8x", insn); | ||
return 0; | ||
} | ||
|
||
static inline int print_insn_spu(unsigned long insn, unsigned long memaddr) | ||
{ | ||
printf("%.8x", insn); | ||
return 0; | ||
} | ||
#endif | ||
|
||
#endif /* _POWERPC_XMON_DIS_ASM_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters