diff options
author | Mike Frysinger <vapier@gentoo.org> | 2024-01-08 20:44:02 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2024-01-08 21:21:58 -0500 |
commit | d2704ed59bfa5fcfcc8d5441a837eff5312604a5 (patch) | |
tree | 9ef798e71bbd0ea4b34e2b13c1171f4143176a2f /sim | |
parent | f64e47a22ca2a9c10c4ceb19b84d687f902fa725 (diff) | |
download | gdb-d2704ed59bfa5fcfcc8d5441a837eff5312604a5.zip gdb-d2704ed59bfa5fcfcc8d5441a837eff5312604a5.tar.gz gdb-d2704ed59bfa5fcfcc8d5441a837eff5312604a5.tar.bz2 |
sim: warnings: fix unused variable warnings
Leave the igen code in place as it's meant to be used with newer
(to-be-written) code ported from the ppc version.
The sh code isn't really necessary as the opcodes enums have been
maintained independently from here, and the lists are out-of-sync
already.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/igen/ld-decode.c | 2 | ||||
-rw-r--r-- | sim/igen/table.c | 11 | ||||
-rw-r--r-- | sim/sh/gencode.c | 70 |
3 files changed, 7 insertions, 76 deletions
diff --git a/sim/igen/ld-decode.c b/sim/igen/ld-decode.c index 6edd7c8..6a2d859 100644 --- a/sim/igen/ld-decode.c +++ b/sim/igen/ld-decode.c @@ -61,12 +61,14 @@ static const name_map decode_combine_map[] = { {NULL, 0}, }; +#if 0 static const name_map decode_search_map[] = { {"constants", decode_find_constants}, {"mixed", decode_find_mixed}, {"strings", decode_find_strings}, {NULL, decode_find_mixed}, }; +#endif static void diff --git a/sim/igen/table.c b/sim/igen/table.c index fdca9cb..90b4102 100644 --- a/sim/igen/table.c +++ b/sim/igen/table.c @@ -490,7 +490,6 @@ extern void table_print_code (lf *file, const table_entry *entry) { int field_nr; - int nr = 0; for (field_nr = 0; field_nr < entry->nr_fields; field_nr++) { char *chp = entry->field[field_nr]; @@ -502,20 +501,20 @@ table_print_code (lf *file, const table_entry *entry) if (chp[0] == '{' && !isspace (chp[1]) && chp[1] != '\0') { in_bit_field = 1; - nr += lf_putchr (file, '_'); + lf_putchr (file, '_'); } else if (in_bit_field && chp[0] == ':') { - nr += lf_putchr (file, '_'); + lf_putchr (file, '_'); } else if (in_bit_field && *chp == '}') { - nr += lf_putchr (file, '_'); + lf_putchr (file, '_'); in_bit_field = 0; } else { - nr += lf_putchr (file, *chp); + lf_putchr (file, *chp); } chp++; } @@ -525,7 +524,7 @@ table_print_code (lf *file, const table_entry *entry) line.line_nr += field_nr; error (&line, "Bit field brace miss match\n"); } - nr += lf_putchr (file, '\n'); + lf_putchr (file, '\n'); } } diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c index 8246e894..b00a16a 100644 --- a/sim/sh/gencode.c +++ b/sim/sh/gencode.c @@ -2468,76 +2468,6 @@ static op ppi_tab[] = {0, 0} }; -/* Tables of things to put into enums for sh-opc.h */ -static -const char * const nibble_type_list[] = -{ - "HEX_0", - "HEX_1", - "HEX_2", - "HEX_3", - "HEX_4", - "HEX_5", - "HEX_6", - "HEX_7", - "HEX_8", - "HEX_9", - "HEX_A", - "HEX_B", - "HEX_C", - "HEX_D", - "HEX_E", - "HEX_F", - "REG_N", - "REG_M", - "BRANCH_12", - "BRANCH_8", - "DISP_8", - "DISP_4", - "IMM_4", - "IMM_4BY2", - "IMM_4BY4", - "PCRELIMM_8BY2", - "PCRELIMM_8BY4", - "IMM_8", - "IMM_8BY2", - "IMM_8BY4", - 0 -}; -static -const char * const arg_type_list[] = -{ - "A_END", - "A_BDISP12", - "A_BDISP8", - "A_DEC_M", - "A_DEC_N", - "A_DISP_GBR", - "A_DISP_PC", - "A_DISP_REG_M", - "A_DISP_REG_N", - "A_GBR", - "A_IMM", - "A_INC_M", - "A_INC_N", - "A_IND_M", - "A_IND_N", - "A_IND_R0_REG_M", - "A_IND_R0_REG_N", - "A_MACH", - "A_MACL", - "A_PR", - "A_R0", - "A_R0_GBR", - "A_REG_M", - "A_REG_N", - "A_SR", - "A_VBR", - "A_SSR", - "A_SPC", - 0, -}; - static int qfunc (const void *va, const void *vb) { |