/* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture.
- Copyright (C) 1998-2017 Free Software Foundation, Inc.
+ Copyright (C) 1998-2020 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GAS, the GNU Assembler.
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;
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. */
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)
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"));
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;
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);
/* 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). */
/* 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;
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;
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);
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. */
{
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;
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)
{
{
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);
}
/* 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));
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. */