X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fconfig%2Ftc-ia64.c;h=a9126ab74d917534a6ff42bdd53a93281b7c8605;hb=13aa5ceb01cc94a0e617f397c0c5434fc22bb1e5;hp=d6c2822b3bfee145249f8fd5bf47061edabe3762;hpb=1a0670f37442b7ae904932b347353046126b990c;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index d6c2822b3b..a9126ab74d 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -1,5 +1,5 @@ /* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture. - Copyright (C) 1998-2016 Free Software Foundation, Inc. + Copyright (C) 1998-2020 Free Software Foundation, Inc. Contributed by David Mosberger-Tang This file is part of GAS, the GNU Assembler. @@ -234,7 +234,7 @@ static struct struct hash_control *const_hash; /* constant hash table */ struct hash_control *entry_hash; /* code entry hint hash table */ - /* If X_op is != O_absent, the registername for the instruction's + /* If X_op is != O_absent, the register name for the instruction's qualifying predicate. If NULL, p0 is assumed for instructions that are predictable. */ expressionS qp; @@ -1152,14 +1152,14 @@ obj_elf_vms_common (int ignore ATTRIBUTE_UNUSED) record_alignment (now_seg, log_align); - cur_size = bfd_section_size (stdoutput, now_seg); + cur_size = bfd_section_size (now_seg); if ((int) size > cur_size) { char *pfrag = frag_var (rs_fill, 1, 1, (relax_substateT)0, NULL, (valueT)size - (valueT)cur_size, NULL); *pfrag = 0; - bfd_section_size (stdoutput, now_seg) = size; + bfd_set_section_size (now_seg, size); } /* Switch back to current segment. */ @@ -2801,7 +2801,7 @@ fixup_unw_records (unw_rec_list *list, int before_relax) for (ptr = list; ptr; ptr = ptr->next) { if (ptr->slot_number == SLOT_NUM_NOT_SET) - as_bad (_(" Insn slot not set in unwind record.")); + as_bad (_("Insn slot not set in unwind record.")); t = slot_index (ptr->slot_number, ptr->slot_frag, first_addr, first_frag, before_relax); switch (ptr->r.type) @@ -3373,7 +3373,7 @@ dot_save (int dummy ATTRIBUTE_UNUSED) e2.X_op = O_absent; reg1 = e1.X_add_number; - /* Make sure its a valid ar.xxx reg, OR its br0, aka 'rp'. */ + /* Make sure it's a valid ar.xxx reg, OR its br0, aka 'rp'. */ if (e1.X_op != O_register) { as_bad (_("First operand to .save not a register")); @@ -3606,8 +3606,7 @@ start_unwind_section (const segT text_seg, int sec_index) else { set_section (sec_name); - bfd_set_section_flags (stdoutput, now_seg, - SEC_LOAD | SEC_ALLOC | SEC_READONLY); + bfd_set_section_flags (now_seg, SEC_LOAD | SEC_ALLOC | SEC_READONLY); } elf_linked_to_section (now_seg) = text_seg; @@ -3765,7 +3764,7 @@ dot_savemem (int psprel) reg1 = e1.X_add_number; val = e2.X_add_number; - /* Make sure its a valid ar.xxx reg, OR its br0, aka 'rp'. */ + /* Make sure it's a valid ar.xxx reg, OR its br0, aka 'rp'. */ if (e1.X_op != O_register) { as_bad (_("First operand to .%s not a register"), po); @@ -5840,9 +5839,8 @@ operand_match (const struct ia64_opcode *idesc, int res_index, expressionS *e) /* Sign-extend 32-bit unsigned numbers, so that the following range checks will work. */ val = e->X_add_number; - if (((val & (~(bfd_vma) 0 << 32)) == 0) - && ((val & ((bfd_vma) 1 << 31)) != 0)) - val = ((val << 32) >> 32); + if ((val & (~(bfd_vma) 0 << 32)) == 0) + val = (val ^ ((bfd_vma) 1 << 31)) - ((bfd_vma) 1 << 31); /* Check for 0x100000000. This is valid because 0x100000000-1 is the same as ((uint32_t) -1). */ @@ -5880,9 +5878,8 @@ operand_match (const struct ia64_opcode *idesc, int res_index, expressionS *e) /* Sign-extend 32-bit unsigned numbers, so that the following range checks will work. */ val = e->X_add_number; - if (((val & (~(bfd_vma) 0 << 32)) == 0) - && ((val & ((bfd_vma) 1 << 31)) != 0)) - val = ((val << 32) >> 32); + if ((val & (~(bfd_vma) 0 << 32)) == 0) + val = (val ^ ((bfd_vma) 1 << 31)) - ((bfd_vma) 1 << 31); } else val = e->X_add_number; @@ -7250,7 +7247,7 @@ md_begin (void) md.auto_align = 1; md.explicit_mode = md.default_explicit_mode; - bfd_set_section_alignment (stdoutput, text_section, 4); + bfd_set_section_alignment (text_section, 4); /* Make sure function pointers get initialized. */ target_big_endian = -1; @@ -7778,7 +7775,7 @@ ia64_frob_label (struct symbol *sym) return; } - if (bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) + if (bfd_section_flags (now_seg) & SEC_CODE) { md.last_text_seg = now_seg; fix = XOBNEW (¬es, struct label_fix); @@ -7818,7 +7815,7 @@ void ia64_flush_pending_output (void) { if (!md.keep_pending_output - && bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) + && bfd_section_flags (now_seg) & SEC_CODE) { /* ??? This causes many unnecessary stop bits to be emitted. Unfortunately, it isn't clear if it is safe to remove this. */ @@ -10989,7 +10986,7 @@ ia64_pcrel_from_section (fixS *fix, segT sec) { unsigned long off = fix->fx_frag->fr_address + fix->fx_where; - if (bfd_get_section_flags (stdoutput, sec) & SEC_CODE) + if (bfd_section_flags (sec) & SEC_CODE) off &= ~0xfUL; return off; @@ -11570,8 +11567,6 @@ tc_gen_reloc (asection *sec ATTRIBUTE_UNUSED, fixS *fixp) of LITTLENUMS emitted is stored in *SIZE. An error message is returned, or NULL on OK. */ -#define MAX_LITTLENUMS 5 - const char * md_atof (int type, char *lit, int *size) { @@ -11850,7 +11845,7 @@ dot_alias (int section) { as_fatal (_("inserting \"%s\" into %s name hash table failed: %s"), alias, kind, error_string); -out: + out: obstack_free (¬es, name); obstack_free (¬es, alias); } @@ -11948,9 +11943,7 @@ ia64_vms_note (void) /* Create the .note section. */ secp = subseg_new (".note", 0); - bfd_set_section_flags (stdoutput, - secp, - SEC_HAS_CONTENTS | SEC_READONLY); + bfd_set_section_flags (secp, SEC_HAS_CONTENTS | SEC_READONLY); /* Module header note (MHD). */ bname = xstrdup (lbasename (out_file_name)); @@ -11995,9 +11988,7 @@ ia64_vms_note (void) frag_align (3, 0, 0); secp = subseg_new (".vms_display_name_info", 0); - bfd_set_section_flags (stdoutput, - secp, - SEC_HAS_CONTENTS | SEC_READONLY); + bfd_set_section_flags (secp, SEC_HAS_CONTENTS | SEC_READONLY); /* This symbol should be passed on the command line and be variable according to language. */