From 93013a0f533fb3dd6875ca670d8e0bb4166a796e Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Mon, 2 May 2011 13:49:14 -0400 Subject: arch/tile: refactor backtracing code This change is the result of some work to make the backtrace code more shareable between kernel, libc, and gdb. For the kernel, some good effects are to eliminate the hacky "VirtualAddress" typedef in favor of "unsigned long", to eliminate a bunch of spurious kernel doc comments, to remove the dead "bt_read_memory" function, and to use "__tilegx__" in #ifdefs instead of "TILE_CHIP". Signed-off-by: Chris Metcalf --- arch/tile/kernel/tile-desc_32.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'arch/tile/kernel/tile-desc_32.c') diff --git a/arch/tile/kernel/tile-desc_32.c b/arch/tile/kernel/tile-desc_32.c index 69af0e150f78..7e31a1285788 100644 --- a/arch/tile/kernel/tile-desc_32.c +++ b/arch/tile/kernel/tile-desc_32.c @@ -2413,12 +2413,13 @@ const struct tile_operand tile_operands[43] = -/* Given a set of bundle bits and the lookup FSM for a specific pipe, - * returns which instruction the bundle contains in that pipe. +/* Given a set of bundle bits and a specific pipe, returns which + * instruction the bundle contains in that pipe. */ -static const struct tile_opcode * -find_opcode(tile_bundle_bits bits, const unsigned short *table) +const struct tile_opcode * +find_opcode(tile_bundle_bits bits, tile_pipeline pipe) { + const unsigned short *table = tile_bundle_decoder_fsms[pipe]; int index = 0; while (1) @@ -2465,7 +2466,7 @@ parse_insn_tile(tile_bundle_bits bits, int i; d = &decoded[num_instructions++]; - opc = find_opcode (bits, tile_bundle_decoder_fsms[pipe]); + opc = find_opcode (bits, (tile_pipeline)pipe); d->opcode = opc; /* Decode each operand, sign extending, etc. as appropriate. */ -- cgit v1.2.3