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