mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-12-13 15:05:46 +00:00
2011-06-27 Tristan Gingold <gingold@adacore.com>
* config/tc-alpha.c (add_to_link_pool): Remove basesym parameter. Locally declare basesym. Add comments. Do not set literal_pool_size. (load_expression): Adjust call to add_to_link_pool. (s_alpha_pdesc): Define pdesc symbol using dot. Do not set literal_pool_size. (s_alpha_end): Use NULL instead of 0.
This commit is contained in:
parent
daceadb849
commit
8aacb050e6
@ -1,3 +1,12 @@
|
||||
2011-06-27 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* config/tc-alpha.c (add_to_link_pool): Remove basesym parameter.
|
||||
Locally declare basesym. Add comments. Do not set literal_pool_size.
|
||||
(load_expression): Adjust call to add_to_link_pool.
|
||||
(s_alpha_pdesc): Define pdesc symbol using dot.
|
||||
Do not set literal_pool_size.
|
||||
(s_alpha_end): Use NULL instead of 0.
|
||||
|
||||
2011-06-27 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* config/obj-evax.c (evax_frob_file_before_adjust): Add comments.
|
||||
|
@ -582,7 +582,7 @@ static void emit_insn (struct alpha_insn *);
|
||||
static void assemble_tokens (const char *, const expressionS *, int, int);
|
||||
#ifdef OBJ_EVAX
|
||||
static char *s_alpha_section_name (void);
|
||||
static symbolS *add_to_link_pool (symbolS *, symbolS *, offsetT);
|
||||
static symbolS *add_to_link_pool (symbolS *, offsetT);
|
||||
#endif
|
||||
|
||||
static struct alpha_reloc_tag *
|
||||
@ -1448,8 +1448,7 @@ load_expression (int targreg,
|
||||
|
||||
if (!range_signed_32 (addend))
|
||||
addend = sign_extend_32 (addend);
|
||||
linkexp = add_to_link_pool (alpha_evax_proc->symbol,
|
||||
exp->X_add_symbol, 0);
|
||||
linkexp = add_to_link_pool (exp->X_add_symbol, 0);
|
||||
set_tok_reg (newtok[0], targreg);
|
||||
set_tok_sym (newtok[1], linkexp, 0);
|
||||
set_tok_preg (newtok[2], basereg);
|
||||
@ -1516,8 +1515,7 @@ load_expression (int targreg,
|
||||
/* For 64-bit addends, just put it in the literal pool. */
|
||||
#ifdef OBJ_EVAX
|
||||
/* Emit "ldq targreg, lit(basereg)". */
|
||||
litexp = add_to_link_pool (alpha_evax_proc->symbol,
|
||||
section_symbol (absolute_section), addend);
|
||||
litexp = add_to_link_pool (section_symbol (absolute_section), addend);
|
||||
set_tok_reg (newtok[0], targreg);
|
||||
set_tok_sym (newtok[1], litexp, 0);
|
||||
set_tok_preg (newtok[2], alpha_gp_register);
|
||||
@ -3373,15 +3371,14 @@ assemble_tokens (const char *opname,
|
||||
#ifdef OBJ_EVAX
|
||||
|
||||
/* Add sym+addend to link pool.
|
||||
Return offset from basesym to entry in link pool.
|
||||
Return offset from curent procedure value (pv) to entry in link pool.
|
||||
|
||||
Add new fixup only if offset isn't 16bit. */
|
||||
|
||||
static symbolS *
|
||||
add_to_link_pool (symbolS *basesym,
|
||||
symbolS *sym,
|
||||
offsetT addend)
|
||||
add_to_link_pool (symbolS *sym, offsetT addend)
|
||||
{
|
||||
symbolS *basesym;
|
||||
segT current_section = now_seg;
|
||||
int current_subsec = now_subseg;
|
||||
char *p;
|
||||
@ -3390,6 +3387,8 @@ add_to_link_pool (symbolS *basesym,
|
||||
symbolS *linksym, *expsym;
|
||||
expressionS e;
|
||||
|
||||
basesym = alpha_evax_proc->symbol;
|
||||
|
||||
/* @@ This assumes all entries in a given section will be of the same
|
||||
size... Probably correct, but unwise to rely on. */
|
||||
/* This must always be called with the same subsegment. */
|
||||
@ -3407,14 +3406,14 @@ add_to_link_pool (symbolS *basesym,
|
||||
return fixp->tc_fix_data.info->sym;
|
||||
}
|
||||
|
||||
/* Not found in 16bit signed range. */
|
||||
|
||||
/* Not found, add a new entry. */
|
||||
subseg_set (alpha_link_section, 0);
|
||||
linksym = symbol_new
|
||||
(FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (), frag_now);
|
||||
p = frag_more (8);
|
||||
memset (p, 0, 8);
|
||||
|
||||
/* Create the basesym - linksym expression (offset of the added entry). */
|
||||
e.X_op = O_subtract;
|
||||
e.X_add_symbol = linksym;
|
||||
e.X_op_symbol = basesym;
|
||||
@ -3427,7 +3426,6 @@ add_to_link_pool (symbolS *basesym,
|
||||
fixp->tc_fix_data.info->sym = expsym;
|
||||
|
||||
subseg_set (current_section, current_subsec);
|
||||
seginfo->literal_pool_size += 8;
|
||||
return expsym;
|
||||
}
|
||||
#endif /* OBJ_EVAX */
|
||||
@ -4502,6 +4500,7 @@ s_alpha_pdesc (int ignore ATTRIBUTE_UNUSED)
|
||||
entry_sym = make_expr_symbol (&exp);
|
||||
entry_sym_name = symbol_get_bfdsym (entry_sym)->name;
|
||||
|
||||
/* Strip "..en". */
|
||||
len = strlen (entry_sym_name);
|
||||
sym_name = (char *) xmalloc (len - 4 + 1);
|
||||
strncpy (sym_name, entry_sym_name, len - 4);
|
||||
@ -4517,10 +4516,8 @@ s_alpha_pdesc (int ignore ATTRIBUTE_UNUSED)
|
||||
return;
|
||||
}
|
||||
|
||||
*symbol_get_obj (alpha_evax_proc->symbol) =
|
||||
(valueT) seginfo->literal_pool_size;
|
||||
|
||||
alpha_evax_proc->symbol->sy_obj = (valueT)seginfo->literal_pool_size;
|
||||
/* Define pdesc symbol. */
|
||||
define_sym_at_dot (alpha_evax_proc->symbol);
|
||||
|
||||
/* Save bfd symbol of proc entry in function symbol. */
|
||||
((struct evax_private_udata_struct *)
|
||||
@ -4566,7 +4563,6 @@ s_alpha_pdesc (int ignore ATTRIBUTE_UNUSED)
|
||||
p = frag_more (16);
|
||||
fixp = fix_new (frag_now, p - frag_now->fr_literal, 8, 0, 0, 0, 0);
|
||||
fixp->fx_done = 1;
|
||||
seginfo->literal_pool_size += 16;
|
||||
|
||||
*p = alpha_evax_proc->pdsckind
|
||||
| ((alpha_evax_proc->framereg == 29) ? PDSC_S_M_BASE_REG_IS_FP : 0)
|
||||
@ -4606,7 +4602,6 @@ s_alpha_pdesc (int ignore ATTRIBUTE_UNUSED)
|
||||
p = frag_more (6);
|
||||
fixp = fix_new (frag_now, p - frag_now->fr_literal, 6, 0, 0, 0, 0);
|
||||
fixp->fx_done = 1;
|
||||
seginfo->literal_pool_size += 6;
|
||||
|
||||
/* pdesc+16: Size. */
|
||||
md_number_to_chars (p, (valueT) alpha_evax_proc->framesize, 4);
|
||||
@ -4626,7 +4621,6 @@ s_alpha_pdesc (int ignore ATTRIBUTE_UNUSED)
|
||||
p = frag_more (8);
|
||||
fixp = fix_new (frag_now, p - frag_now->fr_literal, 8, 0, 0, 0, 0);
|
||||
fixp->fx_done = 1;
|
||||
seginfo->literal_pool_size += 8;
|
||||
|
||||
/* pdesc+24: register masks. */
|
||||
|
||||
@ -4646,7 +4640,6 @@ s_alpha_pdesc (int ignore ATTRIBUTE_UNUSED)
|
||||
p = frag_more (8);
|
||||
fixp = fix_new (frag_now, p - frag_now->fr_literal, 8, 0, 0, 0, 0);
|
||||
fixp->fx_done = 1;
|
||||
seginfo->literal_pool_size += 8;
|
||||
md_number_to_chars (p, alpha_evax_proc->handler_data, 8);
|
||||
}
|
||||
}
|
||||
@ -4683,7 +4676,6 @@ s_alpha_name (int ignore ATTRIBUTE_UNUSED)
|
||||
|
||||
frag_align (3, 0, 0);
|
||||
p = frag_more (8);
|
||||
seginfo->literal_pool_size += 8;
|
||||
|
||||
fix_new_exp (frag_now, p - frag_now->fr_literal, 8, &exp, 0, BFD_RELOC_64);
|
||||
}
|
||||
@ -4822,7 +4814,7 @@ s_alpha_end (int ignore ATTRIBUTE_UNUSED)
|
||||
c = get_symbol_end ();
|
||||
*input_line_pointer = c;
|
||||
demand_empty_rest_of_line ();
|
||||
alpha_evax_proc = 0;
|
||||
alpha_evax_proc = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user