diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 19 | ||||
-rw-r--r-- | gas/config/tc-arc.c | 16 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 10 | ||||
-rw-r--r-- | gas/config/tc-ppc.c | 84 | ||||
-rw-r--r-- | gas/config/tc-ppc.h | 4 | ||||
-rw-r--r-- | gas/config/tc-score.c | 10 | ||||
-rw-r--r-- | gas/config/tc-score7.c | 10 |
7 files changed, 86 insertions, 67 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 3ff0ae3..251bf53 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,22 @@ +2009-09-05 Martin Thuresson <martin@mtme.org> + + * config/tc-arc.c (struct syntax_classes): Rename member class + to s_class. (arc_extinst): Rename variable class to + s_class. Update code to use renamed members. + * config/tc-mips.c (insn_uses_reg): Rename argument class to + regclass. + * config/tc-ppc.c (ppc_csect, ppc_change_csect, ppc_function) + (ppc_tc, ppc_is_toc_sym, ppc_symbol_new_hook, ppc_frob_label) + (ppc_fix_adjustable, md_apply_fix): Update code to use renamed + members. + * config/tc-ppc.h (struct ppc_tc_sy): Change name of member + from class to symbol_class. (OBJ_COPY_SYMBOL_ATTRIBUTES): Update + code to use renamed members. + * config/tc-score.c (s3_adjust_paritybit): Rename argument + class to i_class. + * config/tc-score7.c (s7_adjust_paritybit): Rename argument + class to i_class. + 2009-09-04 Tristan Gingold <gingold@adacore.com> * NEWS: Add marker for 2.20. diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c index eb5294c..1348f5d 100644 --- a/gas/config/tc-arc.c +++ b/gas/config/tc-arc.c @@ -47,7 +47,7 @@ const struct syntax_classes { char *name; int len; - int class; + int s_class; } syntaxclass[] = { { "SYNTAX_3OP|OP1_MUST_BE_IMM", 26, SYNTAX_3OP|OP1_MUST_BE_IMM|SYNTAX_VALID }, @@ -646,7 +646,7 @@ arc_extinst (int ignore ATTRIBUTE_UNUSED) int suffixcode = -1; int opcode, subopcode; int i; - int class = 0; + int s_class = 0; int name_len; struct arc_opcode *ext_op; @@ -756,20 +756,20 @@ arc_extinst (int ignore ATTRIBUTE_UNUSED) { if (!strncmp (syntaxclass[i].name,input_line_pointer, syntaxclass[i].len)) { - class = syntaxclass[i].class; + s_class = syntaxclass[i].s_class; input_line_pointer += syntaxclass[i].len; break; } } - if (0 == (SYNTAX_VALID & class)) + if (0 == (SYNTAX_VALID & s_class)) { as_bad (_("invalid syntax class")); ignore_rest_of_line (); return; } - if ((0x3 == opcode) & (class & SYNTAX_3OP)) + if ((0x3 == opcode) & (s_class & SYNTAX_3OP)) { as_bad (_("opcode 0x3 and SYNTAX_3OP invalid")); ignore_rest_of_line (); @@ -797,7 +797,7 @@ arc_extinst (int ignore ATTRIBUTE_UNUSED) break; }; - strcat (syntax, ((opcode == 0x3) ? "%a,%b" : ((class & SYNTAX_3OP) ? "%a,%b,%c" : "%b,%c"))); + strcat (syntax, ((opcode == 0x3) ? "%a,%b" : ((s_class & SYNTAX_3OP) ? "%a,%b,%c" : "%b,%c"))); if (suffixcode < 2) strcat (syntax, "%F"); strcat (syntax, "%S%L"); @@ -807,7 +807,7 @@ arc_extinst (int ignore ATTRIBUTE_UNUSED) ext_op->mask = I (-1) | ((0x3 == opcode) ? C (-1) : 0); ext_op->value = I (opcode) | ((0x3 == opcode) ? C (subopcode) : 0); - ext_op->flags = class; + ext_op->flags = s_class; ext_op->next_asm = arc_ext_opcodes; ext_op->next_dis = arc_ext_opcodes; arc_ext_opcodes = ext_op; @@ -829,7 +829,7 @@ arc_extinst (int ignore ATTRIBUTE_UNUSED) p = frag_more (1); *p = subopcode; p = frag_more (1); - *p = (class & (OP1_MUST_BE_IMM | OP1_IMM_IMPLIED) ? IGNORE_FIRST_OPD : 0); + *p = (s_class & (OP1_MUST_BE_IMM | OP1_IMM_IMPLIED) ? IGNORE_FIRST_OPD : 0); p = frag_more (name_len); strncpy (p, syntax, name_len); p = frag_more (1); diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 0a2f9e4..e1d6388 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -2221,20 +2221,20 @@ fixup_has_matching_lo_p (fixS *fixp) static int insn_uses_reg (const struct mips_cl_insn *ip, unsigned int reg, - enum mips_regclass class) + enum mips_regclass regclass) { - if (class == MIPS16_REG) + if (regclass == MIPS16_REG) { gas_assert (mips_opts.mips16); reg = mips16_to_32_reg_map[reg]; - class = MIPS_GR_REG; + regclass = MIPS_GR_REG; } /* Don't report on general register ZERO, since it never changes. */ - if (class == MIPS_GR_REG && reg == ZERO) + if (regclass == MIPS_GR_REG && reg == ZERO) return 0; - if (class == MIPS_FP_REG) + if (regclass == MIPS_FP_REG) { gas_assert (! mips_opts.mips16); /* If we are called with either $f0 or $f1, we must check $f0. diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 96c40ba..80f64af 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -3338,7 +3338,7 @@ ppc_csect (int ignore ATTRIBUTE_UNUSED) if (S_GET_NAME (sym)[0] == '\0') { /* An unnamed csect is assumed to be [PR]. */ - symbol_get_tc (sym)->class = XMC_PR; + symbol_get_tc (sym)->symbol_class = XMC_PR; } align = 2; @@ -3374,7 +3374,7 @@ ppc_change_csect (symbolS *sym, offsetT align) data section. */ after_toc = 0; is_code = 0; - switch (symbol_get_tc (sym)->class) + switch (symbol_get_tc (sym)->symbol_class) { case XMC_PR: case XMC_RO: @@ -3764,8 +3764,8 @@ ppc_function (int ignore ATTRIBUTE_UNUSED) symbol_set_value_expression (ext_sym, &exp); } - if (symbol_get_tc (ext_sym)->class == -1) - symbol_get_tc (ext_sym)->class = XMC_PR; + if (symbol_get_tc (ext_sym)->symbol_class == -1) + symbol_get_tc (ext_sym)->symbol_class = XMC_PR; symbol_get_tc (ext_sym)->output = 1; if (*input_line_pointer == ',') @@ -4198,7 +4198,7 @@ ppc_tc (int ignore ATTRIBUTE_UNUSED) symbolS *label; label = symbol_get_tc (ppc_current_csect)->within; - if (symbol_get_tc (label)->class != XMC_TC0) + if (symbol_get_tc (label)->symbol_class != XMC_TC0) { as_bad (_(".tc with no label")); ignore_rest_of_line (); @@ -4218,7 +4218,7 @@ ppc_tc (int ignore ATTRIBUTE_UNUSED) S_SET_SEGMENT (sym, now_seg); symbol_set_frag (sym, frag_now); S_SET_VALUE (sym, (valueT) frag_now_fix ()); - symbol_get_tc (sym)->class = XMC_TC; + symbol_get_tc (sym)->symbol_class = XMC_TC; symbol_get_tc (sym)->output = 1; ppc_frob_label (sym); @@ -4322,7 +4322,7 @@ static int ppc_is_toc_sym (symbolS *sym) { #ifdef OBJ_XCOFF - return symbol_get_tc (sym)->class == XMC_TC; + return symbol_get_tc (sym)->symbol_class == XMC_TC; #endif #ifdef OBJ_ELF const char *sname = segment_name (S_GET_SEGMENT (sym)); @@ -4972,7 +4972,7 @@ ppc_symbol_new_hook (symbolS *sym) tc = symbol_get_tc (sym); tc->next = NULL; tc->output = 0; - tc->class = -1; + tc->symbol_class = -1; tc->real_name = NULL; tc->subseg = 0; tc->align = 0; @@ -4995,55 +4995,55 @@ ppc_symbol_new_hook (symbolS *sym) { case 'B': if (strcmp (s, "BS]") == 0) - tc->class = XMC_BS; + tc->symbol_class = XMC_BS; break; case 'D': if (strcmp (s, "DB]") == 0) - tc->class = XMC_DB; + tc->symbol_class = XMC_DB; else if (strcmp (s, "DS]") == 0) - tc->class = XMC_DS; + tc->symbol_class = XMC_DS; break; case 'G': if (strcmp (s, "GL]") == 0) - tc->class = XMC_GL; + tc->symbol_class = XMC_GL; break; case 'P': if (strcmp (s, "PR]") == 0) - tc->class = XMC_PR; + tc->symbol_class = XMC_PR; break; case 'R': if (strcmp (s, "RO]") == 0) - tc->class = XMC_RO; + tc->symbol_class = XMC_RO; else if (strcmp (s, "RW]") == 0) - tc->class = XMC_RW; + tc->symbol_class = XMC_RW; break; case 'S': if (strcmp (s, "SV]") == 0) - tc->class = XMC_SV; + tc->symbol_class = XMC_SV; break; case 'T': if (strcmp (s, "TC]") == 0) - tc->class = XMC_TC; + tc->symbol_class = XMC_TC; else if (strcmp (s, "TI]") == 0) - tc->class = XMC_TI; + tc->symbol_class = XMC_TI; else if (strcmp (s, "TB]") == 0) - tc->class = XMC_TB; + tc->symbol_class = XMC_TB; else if (strcmp (s, "TC0]") == 0 || strcmp (s, "T0]") == 0) - tc->class = XMC_TC0; + tc->symbol_class = XMC_TC0; break; case 'U': if (strcmp (s, "UA]") == 0) - tc->class = XMC_UA; + tc->symbol_class = XMC_UA; else if (strcmp (s, "UC]") == 0) - tc->class = XMC_UC; + tc->symbol_class = XMC_UC; break; case 'X': if (strcmp (s, "XO]") == 0) - tc->class = XMC_XO; + tc->symbol_class = XMC_XO; break; } - if (tc->class == -1) + if (tc->symbol_class == -1) as_bad (_("Unrecognized symbol suffix")); } @@ -5056,8 +5056,8 @@ ppc_frob_label (symbolS *sym) { if (ppc_current_csect != (symbolS *) NULL) { - if (symbol_get_tc (sym)->class == -1) - symbol_get_tc (sym)->class = symbol_get_tc (ppc_current_csect)->class; + if (symbol_get_tc (sym)->symbol_class == -1) + symbol_get_tc (sym)->symbol_class = symbol_get_tc (ppc_current_csect)->symbol_class; symbol_remove (sym, &symbol_rootP, &symbol_lastP); symbol_append (sym, symbol_get_tc (ppc_current_csect)->within, @@ -5180,7 +5180,7 @@ ppc_frob_symbol (symbolS *sym) i = S_GET_NUMBER_AUXILIARY (sym); S_SET_NUMBER_AUXILIARY (sym, i + 1); a = &coffsymbol (symbol_get_bfdsym (sym))->native[i + 1].u.auxent; - if (symbol_get_tc (sym)->class == XMC_TC0) + if (symbol_get_tc (sym)->symbol_class == XMC_TC0) { /* This is the TOC table. */ know (strcmp (S_GET_NAME (sym), "TOC") == 0); @@ -5209,9 +5209,9 @@ ppc_frob_symbol (symbolS *sym) a->x_csect.x_scnlen.l = symbol_get_frag (sym)->fr_offset; a->x_csect.x_smtyp = (symbol_get_tc (sym)->align << 3) | XTY_CM; if (S_IS_EXTERNAL (sym)) - symbol_get_tc (sym)->class = XMC_RW; + symbol_get_tc (sym)->symbol_class = XMC_RW; else - symbol_get_tc (sym)->class = XMC_BS; + symbol_get_tc (sym)->symbol_class = XMC_BS; } else if (S_GET_SEGMENT (sym) == absolute_section) { @@ -5219,8 +5219,8 @@ ppc_frob_symbol (symbolS *sym) ppc_adjust_symtab. */ ppc_saw_abs = TRUE; a->x_csect.x_smtyp = XTY_LD; - if (symbol_get_tc (sym)->class == -1) - symbol_get_tc (sym)->class = XMC_XO; + if (symbol_get_tc (sym)->symbol_class == -1) + symbol_get_tc (sym)->symbol_class = XMC_XO; } else if (! S_IS_DEFINED (sym)) { @@ -5228,17 +5228,17 @@ ppc_frob_symbol (symbolS *sym) a->x_csect.x_scnlen.l = 0; a->x_csect.x_smtyp = XTY_ER; } - else if (symbol_get_tc (sym)->class == XMC_TC) + else if (symbol_get_tc (sym)->symbol_class == XMC_TC) { symbolS *next; /* This is a TOC definition. x_scnlen is the size of the TOC entry. */ next = symbol_next (sym); - while (symbol_get_tc (next)->class == XMC_TC0) + while (symbol_get_tc (next)->symbol_class == XMC_TC0) next = symbol_next (next); if (next == (symbolS *) NULL - || symbol_get_tc (next)->class != XMC_TC) + || symbol_get_tc (next)->symbol_class != XMC_TC) { if (ppc_after_toc_frag == (fragS *) NULL) a->x_csect.x_scnlen.l = (bfd_section_size (stdoutput, @@ -5298,10 +5298,10 @@ ppc_frob_symbol (symbolS *sym) a->x_csect.x_parmhash = 0; a->x_csect.x_snhash = 0; - if (symbol_get_tc (sym)->class == -1) + if (symbol_get_tc (sym)->symbol_class == -1) a->x_csect.x_smclas = XMC_PR; else - a->x_csect.x_smclas = symbol_get_tc (sym)->class; + a->x_csect.x_smclas = symbol_get_tc (sym)->symbol_class; a->x_csect.x_stab = 0; a->x_csect.x_snstab = 0; @@ -5506,9 +5506,9 @@ ppc_fix_adjustable (fixS *fix) { TC_SYMFIELD_TYPE *sy_tc = symbol_get_tc (sy); - if (sy_tc->class == XMC_TC0) + if (sy_tc->symbol_class == XMC_TC0) continue; - if (sy_tc->class != XMC_TC) + if (sy_tc->symbol_class != XMC_TC) break; if (val == resolve_symbol_value (sy)) { @@ -5525,8 +5525,8 @@ ppc_fix_adjustable (fixS *fix) /* Possibly adjust the reloc to be against the csect. */ tc = symbol_get_tc (fix->fx_addsy); if (tc->subseg == 0 - && tc->class != XMC_TC0 - && tc->class != XMC_TC + && tc->symbol_class != XMC_TC0 + && tc->symbol_class != XMC_TC && symseg != bss_section /* Don't adjust if this is a reloc in the toc section. */ && (symseg != data_section @@ -5791,8 +5791,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) && (operand->insert == NULL || ppc_obj64) && fixP->fx_addsy != NULL && symbol_get_tc (fixP->fx_addsy)->subseg != 0 - && symbol_get_tc (fixP->fx_addsy)->class != XMC_TC - && symbol_get_tc (fixP->fx_addsy)->class != XMC_TC0 + && symbol_get_tc (fixP->fx_addsy)->symbol_class != XMC_TC + && symbol_get_tc (fixP->fx_addsy)->symbol_class != XMC_TC0 && S_GET_SEGMENT (fixP->fx_addsy) != bss_section) { value = fixP->fx_offset; diff --git a/gas/config/tc-ppc.h b/gas/config/tc-ppc.h index 2e4de60..37de84e 100644 --- a/gas/config/tc-ppc.h +++ b/gas/config/tc-ppc.h @@ -134,7 +134,7 @@ struct ppc_tc_sy .globl or .lglobl statement. */ int output; /* The symbol class. */ - int class; + int symbol_class; /* The real name, if the symbol was renamed. */ char *real_name; /* For a csect symbol, the subsegment we are using. This is zero @@ -195,7 +195,7 @@ do { \ S_SET_SEGMENT (dest, S_GET_SEGMENT (src)); \ symbol_get_tc (dest)->size = symbol_get_tc (src)->size; \ symbol_get_tc (dest)->align = symbol_get_tc (src)->align; \ - symbol_get_tc (dest)->class = symbol_get_tc (src)->class; \ + symbol_get_tc (dest)->symbol_class = symbol_get_tc (src)->symbol_class; \ symbol_get_tc (dest)->within = symbol_get_tc (src)->within; \ } while (0) diff --git a/gas/config/tc-score.c b/gas/config/tc-score.c index c1d8f7b..22da682 100644 --- a/gas/config/tc-score.c +++ b/gas/config/tc-score.c @@ -2490,7 +2490,7 @@ s3_get_insn_class_from_type (enum score_insn_type type) 32-bit instruction: 1, 0. 16-bit instruction: 0. */ static bfd_vma -s3_adjust_paritybit (bfd_vma m_code, enum insn_class class) +s3_adjust_paritybit (bfd_vma m_code, enum insn_class i_class) { bfd_vma result = 0; bfd_vma m_code_high = 0; @@ -2500,7 +2500,7 @@ s3_adjust_paritybit (bfd_vma m_code, enum insn_class class) unsigned long pb_middle = 0; unsigned long pb_low = 0; - if (class == INSN_CLASS_48) + if (i_class == INSN_CLASS_48) { pb_high = 0x800000000000LL; pb_middle = 0x80000000; @@ -2512,7 +2512,7 @@ s3_adjust_paritybit (bfd_vma m_code, enum insn_class class) pb_middle | (m_code_middle << 1) | pb_low | m_code_low; } - else if (class == INSN_CLASS_32 || class == INSN_CLASS_SYN) + else if (i_class == INSN_CLASS_32 || i_class == INSN_CLASS_SYN) { pb_high = 0x80000000; pb_low = 0x00000000; @@ -2520,7 +2520,7 @@ s3_adjust_paritybit (bfd_vma m_code, enum insn_class class) m_code_low = m_code & 0x00007fff; result = pb_high | (m_code_high << 1) | pb_low | m_code_low; } - else if (class == INSN_CLASS_16) + else if (i_class == INSN_CLASS_16) { pb_high = 0; pb_low = 0; @@ -2528,7 +2528,7 @@ s3_adjust_paritybit (bfd_vma m_code, enum insn_class class) m_code_low = m_code & 0x00007fff; result = pb_high | (m_code_high << 1) | pb_low | m_code_low; } - else if (class == INSN_CLASS_PCE) + else if (i_class == INSN_CLASS_PCE) { /* Keep original. */ pb_high = 0; diff --git a/gas/config/tc-score7.c b/gas/config/tc-score7.c index c263353..c931102 100644 --- a/gas/config/tc-score7.c +++ b/gas/config/tc-score7.c @@ -2620,7 +2620,7 @@ s7_get_insn_class_from_type (enum score_insn_type type) } static unsigned long -s7_adjust_paritybit (unsigned long m_code, enum insn_class class) +s7_adjust_paritybit (unsigned long m_code, enum insn_class i_class) { unsigned long result = 0; unsigned long m_code_high = 0; @@ -2628,22 +2628,22 @@ s7_adjust_paritybit (unsigned long m_code, enum insn_class class) unsigned long pb_high = 0; unsigned long pb_low = 0; - if (class == INSN_CLASS_32) + if (i_class == INSN_CLASS_32) { pb_high = 0x80000000; pb_low = 0x00008000; } - else if (class == INSN_CLASS_16) + else if (i_class == INSN_CLASS_16) { pb_high = 0; pb_low = 0; } - else if (class == INSN_CLASS_PCE) + else if (i_class == INSN_CLASS_PCE) { pb_high = 0; pb_low = 0x00008000; } - else if (class == INSN_CLASS_SYN) + else if (i_class == INSN_CLASS_SYN) { /* FIXME. at this time, INSN_CLASS_SYN must be 32 bit, but, instruction type should be changed if macro instruction has been expanded. */ |