| OLD | NEW |
| 1 /* ia64-gen.c -- Generate a shrunk set of opcode tables | 1 /* ia64-gen.c -- Generate a shrunk set of opcode tables |
| 2 Copyright 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2012 | 2 Copyright 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2012 |
| 3 Free Software Foundation, Inc. | 3 Free Software Foundation, Inc. |
| 4 Written by Bob Manson, Cygnus Solutions, <manson@cygnus.com> | 4 Written by Bob Manson, Cygnus Solutions, <manson@cygnus.com> |
| 5 | 5 |
| 6 This file is part of the GNU opcodes library. | 6 This file is part of the GNU opcodes library. |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or modify | 8 This library is free software; you can redistribute it and/or modify |
| 9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
| 10 the Free Software Foundation; either version 3, or (at your option) | 10 the Free Software Foundation; either version 3, or (at your option) |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 #define _opcode_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff)) | 62 #define _opcode_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff)) |
| 63 #define opcode_fprintf_vma(s,x) \ | 63 #define opcode_fprintf_vma(s,x) \ |
| 64 fprintf ((s), "%08lx%08lx", _opcode_int64_high (x), _opcode_int64_low (x)) | 64 fprintf ((s), "%08lx%08lx", _opcode_int64_high (x), _opcode_int64_low (x)) |
| 65 | 65 |
| 66 const char * program_name = NULL; | 66 const char * program_name = NULL; |
| 67 int debug = 0; | 67 int debug = 0; |
| 68 | 68 |
| 69 #define NELEMS(a) (sizeof (a) / sizeof ((a)[0])) | 69 #define NELEMS(a) (sizeof (a) / sizeof ((a)[0])) |
| 70 #define tmalloc(X) (X *) xmalloc (sizeof (X)) | 70 #define tmalloc(X) (X *) xmalloc (sizeof (X)) |
| 71 | 71 |
| 72 typedef unsigned long long ci_t; |
| 72 /* The main opcode table entry. Each entry is a unique combination of | 73 /* The main opcode table entry. Each entry is a unique combination of |
| 73 name and flags (no two entries in the table compare as being equal | 74 name and flags (no two entries in the table compare as being equal |
| 74 via opcodes_eq). */ | 75 via opcodes_eq). */ |
| 75 struct main_entry | 76 struct main_entry |
| 76 { | 77 { |
| 77 /* The base name of this opcode. The names of its completers are | 78 /* The base name of this opcode. The names of its completers are |
| 78 appended to it to generate the full instruction name. */ | 79 appended to it to generate the full instruction name. */ |
| 79 struct string_entry *name; | 80 struct string_entry *name; |
| 80 /* The base opcode entry. Which one to use is a fairly arbitrary choice; | 81 /* The base opcode entry. Which one to use is a fairly arbitrary choice; |
| 81 it uses the first one passed to add_opcode_entry. */ | 82 it uses the first one passed to add_opcode_entry. */ |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 /* The index into the ia64_name_dis array for this entry. */ | 140 /* The index into the ia64_name_dis array for this entry. */ |
| 140 int ournum; | 141 int ournum; |
| 141 | 142 |
| 142 /* The index into the main_table[] array. */ | 143 /* The index into the main_table[] array. */ |
| 143 int insn; | 144 int insn; |
| 144 | 145 |
| 145 /* The disassmbly priority of this entry. */ | 146 /* The disassmbly priority of this entry. */ |
| 146 int priority; | 147 int priority; |
| 147 | 148 |
| 148 /* The completer_index value for this entry. */ | 149 /* The completer_index value for this entry. */ |
| 149 int completer_index; | 150 ci_t completer_index; |
| 150 | 151 |
| 151 /* How many other entries share this decode. */ | 152 /* How many other entries share this decode. */ |
| 152 int nextcnt; | 153 int nextcnt; |
| 153 | 154 |
| 154 /* The next entry sharing the same decode. */ | 155 /* The next entry sharing the same decode. */ |
| 155 struct disent *nexte; | 156 struct disent *nexte; |
| 156 | 157 |
| 157 /* The next entry in the name list. */ | 158 /* The next entry in the name list. */ |
| 158 struct disent *next_ent; | 159 struct disent *next_ent; |
| 159 } *disinsntable = NULL; | 160 } *disinsntable = NULL; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 static int get_prefix_len (const char *); | 281 static int get_prefix_len (const char *); |
| 281 static void compute_completer_bits (struct main_entry *, struct completer_entry
*); | 282 static void compute_completer_bits (struct main_entry *, struct completer_entry
*); |
| 282 static void collapse_redundant_completers (void); | 283 static void collapse_redundant_completers (void); |
| 283 static int insert_opcode_dependencies (struct ia64_opcode *, struct completer_e
ntry *); | 284 static int insert_opcode_dependencies (struct ia64_opcode *, struct completer_e
ntry *); |
| 284 static void insert_completer_entry (struct ia64_opcode *, struct main_entry *, i
nt); | 285 static void insert_completer_entry (struct ia64_opcode *, struct main_entry *, i
nt); |
| 285 static void print_completer_entry (struct completer_entry *); | 286 static void print_completer_entry (struct completer_entry *); |
| 286 static void print_completer_table (void); | 287 static void print_completer_table (void); |
| 287 static int opcodes_eq (struct ia64_opcode *, struct ia64_opcode *); | 288 static int opcodes_eq (struct ia64_opcode *, struct ia64_opcode *); |
| 288 static void add_opcode_entry (struct ia64_opcode *); | 289 static void add_opcode_entry (struct ia64_opcode *); |
| 289 static void print_main_table (void); | 290 static void print_main_table (void); |
error: old chunk mismatch |
None
| OLD | NEW |