diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/alpha-dis.c | 2 | ||||
-rw-r--r-- | src/determine_slotting.c | 77 |
2 files changed, 1 insertions, 78 deletions
diff --git a/src/alpha-dis.c b/src/alpha-dis.c index 8b7a6fa..72e70e4 100644 --- a/src/alpha-dis.c +++ b/src/alpha-dis.c @@ -109,7 +109,7 @@ print_insn_alpha (memaddr, info) (*info->memory_error_func) (status, memaddr, info); return -1; } - insn = bfd_getl32 (buffer); + memcpy(&insn, buffer, 4); } /* Get the major opcode of the instruction. */ diff --git a/src/determine_slotting.c b/src/determine_slotting.c index 32d6927..d79162b 100644 --- a/src/determine_slotting.c +++ b/src/determine_slotting.c @@ -7,62 +7,6 @@ #define CLUSTER_0 0 #define CLUSTER_1 1 -#if defined DEBUG && DEBUG == 1 - -#include <stdio.h> - -#define PRINT_DEBUG printf("%c%c%c%c\n", octaword.instr[3].slot, octaword.instr[2].slot, octaword.instr[1].slot, octaword.instr[0].slot) - -#define RULE1() \ - octaword.instr[3].slot = 'U'; \ - octaword.instr[2].slot = 'U'; \ - octaword.instr[1].slot = 'U'; \ - octaword.instr[0].slot = 'U' - -#define RULE2() \ - octaword.instr[3].slot = 'E'; \ - octaword.instr[2].slot = 'U'; \ - octaword.instr[1].slot = 'U'; \ - octaword.instr[0].slot = 'U' - -#define RULE3() \ - octaword.instr[3].slot = 'U'; \ - octaword.instr[2].slot = 'U'; \ - octaword.instr[1].slot = 'E'; \ - octaword.instr[0].slot = 'L' - -#define RULE3B() \ - octaword.instr[3].slot = 'E'; \ - octaword.instr[2].slot = 'E'; \ - octaword.instr[1].slot = 'L'; \ - octaword.instr[0].slot = 'L' - -#define RULE4C() \ - octaword.instr[3].slot = 'E'; \ - octaword.instr[2].slot = 'E'; \ - octaword.instr[1].slot = 'E'; \ - octaword.instr[0].slot = 'U' - -#define RULE4A() \ - octaword.instr[3].slot = 'E'; \ - octaword.instr[2].slot = 'L'; \ - octaword.instr[1].slot = 'E'; \ - octaword.instr[0].slot = 'U' - -#define RULE4AD() \ - octaword.instr[3].slot = 'U'; \ - octaword.instr[2].slot = 'L'; \ - octaword.instr[1].slot = 'E'; \ - octaword.instr[0].slot = 'E' - -#define RULE4CD() \ - octaword.instr[3].slot = 'E'; \ - octaword.instr[2].slot = 'E'; \ - octaword.instr[1].slot = 'E'; \ - octaword.instr[0].slot = 'E' - -#endif /* DEBUG */ - struct octaword_t { struct { @@ -236,24 +180,3 @@ determine_slotting(struct octaword_t octaword) return octaword; } - -#if defined DEBUG && DEBUG == 1 -int main() { - struct octaword_t octaword; - -// RULE3(); -// RULE3B(); -// RULE4C(); - RULE4A(); -// RULE4AD(); -// RULE4CD(); - - PRINT_DEBUG; - - octaword = determine_slotting(octaword); - - PRINT_DEBUG; - - return 0; -} -#endif |