mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 11:39:26 +08:00
* config/tc-hppa.c (selector_table): Add "n", "nl", and "nlr" to
the selector table. (pa_chk_field_selector): Handle new field selectors for SOM. More new stuff for hpux10.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
Wed Feb 28 11:30:55 1996 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
|
* config/tc-hppa.c (selector_table): Add "n", "nl", and "nlr" to
|
||||||
|
the selector table.
|
||||||
|
(pa_chk_field_selector): Handle new field selectors for SOM.
|
||||||
|
|
||||||
Tue Feb 27 14:42:27 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
Tue Feb 27 14:42:27 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||||
|
|
||||||
* configure.in (m68k-*-linux*aout*, m68k-*-linux*): New targets.
|
* configure.in (m68k-*-linux*aout*, m68k-*-linux*): New targets.
|
||||||
|
@ -611,6 +611,7 @@ const pseudo_typeS md_pseudo_table[] =
|
|||||||
{"leave", pa_leave, 0},
|
{"leave", pa_leave, 0},
|
||||||
{"long", pa_cons, 4},
|
{"long", pa_cons, 4},
|
||||||
{"lsym", pa_lsym, 0},
|
{"lsym", pa_lsym, 0},
|
||||||
|
{"nsubspa", pa_subspace, 1},
|
||||||
{"octa", pa_cons, 16},
|
{"octa", pa_cons, 16},
|
||||||
{"org", pa_origin, 0},
|
{"org", pa_origin, 0},
|
||||||
{"origin", pa_origin, 0},
|
{"origin", pa_origin, 0},
|
||||||
@ -960,6 +961,9 @@ static const struct selector_entry selector_table[] =
|
|||||||
{"lr", e_lrsel},
|
{"lr", e_lrsel},
|
||||||
{"ls", e_lssel},
|
{"ls", e_lssel},
|
||||||
{"lt", e_ltsel},
|
{"lt", e_ltsel},
|
||||||
|
{"n", e_nsel},
|
||||||
|
{"nl", e_nlsel},
|
||||||
|
{"nlr", e_nlrsel},
|
||||||
{"p", e_psel},
|
{"p", e_psel},
|
||||||
{"r", e_rsel},
|
{"r", e_rsel},
|
||||||
{"rd", e_rdsel},
|
{"rd", e_rdsel},
|
||||||
@ -2107,7 +2111,7 @@ pa_ip (str)
|
|||||||
as_bad ("Branch to unaligned address");
|
as_bad ("Branch to unaligned address");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
CHECK_FIELD (num, 8191, -8192, 0);
|
CHECK_FIELD (num, 8199, -8184, 0);
|
||||||
sign_unext ((num - 8) >> 2, 12, &result);
|
sign_unext ((num - 8) >> 2, 12, &result);
|
||||||
dis_assemble_12 (result, &w1, &w);
|
dis_assemble_12 (result, &w1, &w);
|
||||||
INSERT_FIELD_AND_CONTINUE (opcode, ((w1 << 2) | w), 0);
|
INSERT_FIELD_AND_CONTINUE (opcode, ((w1 << 2) | w), 0);
|
||||||
@ -2897,10 +2901,13 @@ md_apply_fix (fixP, valp)
|
|||||||
|
|
||||||
hppa_fixP = (struct hppa_fix_struct *) fixP->tc_fix_data;
|
hppa_fixP = (struct hppa_fix_struct *) fixP->tc_fix_data;
|
||||||
/* SOM uses R_HPPA_ENTRY and R_HPPA_EXIT relocations which can
|
/* SOM uses R_HPPA_ENTRY and R_HPPA_EXIT relocations which can
|
||||||
never be "applied" (they are just markers). */
|
never be "applied" (they are just markers). Likewise for
|
||||||
|
R_HPPA_BEGIN_BRTAB and R_HPPA_END_BRTAB. */
|
||||||
#ifdef OBJ_SOM
|
#ifdef OBJ_SOM
|
||||||
if (fixP->fx_r_type == R_HPPA_ENTRY
|
if (fixP->fx_r_type == R_HPPA_ENTRY
|
||||||
|| fixP->fx_r_type == R_HPPA_EXIT)
|
|| fixP->fx_r_type == R_HPPA_EXIT
|
||||||
|
|| fixP->fx_r_type == R_HPPA_BEGIN_BRTAB
|
||||||
|
|| fixP->fx_r_type == R_HPPA_END_BRTAB)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2994,7 +3001,7 @@ md_apply_fix (fixP, valp)
|
|||||||
|
|
||||||
/* Handle all the opcodes with the 'w' operand type. */
|
/* Handle all the opcodes with the 'w' operand type. */
|
||||||
case 12:
|
case 12:
|
||||||
CHECK_FIELD (new_val, 8191, -8192, 0)
|
CHECK_FIELD (new_val, 8199, -8184, 0)
|
||||||
|
|
||||||
/* Mask off 11 bits to be changed. */
|
/* Mask off 11 bits to be changed. */
|
||||||
sign_unext ((new_val - 8) >> 2, 12, &result);
|
sign_unext ((new_val - 8) >> 2, 12, &result);
|
||||||
@ -3419,7 +3426,7 @@ pa_chk_field_selector (str)
|
|||||||
{
|
{
|
||||||
int middle, low, high;
|
int middle, low, high;
|
||||||
int cmp;
|
int cmp;
|
||||||
char name[3];
|
char name[4];
|
||||||
|
|
||||||
/* Read past any whitespace. */
|
/* Read past any whitespace. */
|
||||||
/* FIXME: should we read past newlines and formfeeds??? */
|
/* FIXME: should we read past newlines and formfeeds??? */
|
||||||
@ -3433,6 +3440,13 @@ pa_chk_field_selector (str)
|
|||||||
name[0] = tolower ((*str)[0]),
|
name[0] = tolower ((*str)[0]),
|
||||||
name[1] = tolower ((*str)[1]),
|
name[1] = tolower ((*str)[1]),
|
||||||
name[2] = 0;
|
name[2] = 0;
|
||||||
|
#ifdef OBJ_SOM
|
||||||
|
else if ((*str)[3] == '\'' || (*str)[3] == '%')
|
||||||
|
name[0] = tolower ((*str)[0]),
|
||||||
|
name[1] = tolower ((*str)[1]),
|
||||||
|
name[2] = tolower ((*str)[2]),
|
||||||
|
name[3] = 0;
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
return e_fsel;
|
return e_fsel;
|
||||||
|
|
||||||
@ -3450,6 +3464,10 @@ pa_chk_field_selector (str)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
*str += strlen (name) + 1;
|
*str += strlen (name) + 1;
|
||||||
|
#ifndef OBJ_SOM
|
||||||
|
if (selector_table[middle].field_selector == e_nsel)
|
||||||
|
return e_fsel;
|
||||||
|
#endif
|
||||||
return selector_table[middle].field_selector;
|
return selector_table[middle].field_selector;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5303,8 +5321,8 @@ log2 (value)
|
|||||||
they're broken up into subroutines. */
|
they're broken up into subroutines. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pa_subspace (unused)
|
pa_subspace (create_new)
|
||||||
int unused;
|
int create_new;
|
||||||
{
|
{
|
||||||
char *name, *ss_name, *alias, c;
|
char *name, *ss_name, *alias, c;
|
||||||
char loadable, code_only, common, dup_common, zero, sort;
|
char loadable, code_only, common, dup_common, zero, sort;
|
||||||
@ -5343,6 +5361,9 @@ pa_subspace (unused)
|
|||||||
alias = NULL;
|
alias = NULL;
|
||||||
|
|
||||||
space = current_space;
|
space = current_space;
|
||||||
|
if (create_new)
|
||||||
|
ssd = NULL;
|
||||||
|
else
|
||||||
ssd = is_defined_subspace (ss_name);
|
ssd = is_defined_subspace (ss_name);
|
||||||
/* Allow user to override the builtin attributes of subspaces. But
|
/* Allow user to override the builtin attributes of subspaces. But
|
||||||
only allow the attributes to be changed once! */
|
only allow the attributes to be changed once! */
|
||||||
@ -5480,7 +5501,9 @@ pa_subspace (unused)
|
|||||||
lots of sections. It might be a problem in the PA ELF
|
lots of sections. It might be a problem in the PA ELF
|
||||||
code, I do not know yet. For now avoid creating anything
|
code, I do not know yet. For now avoid creating anything
|
||||||
but the "standard" sections for ELF. */
|
but the "standard" sections for ELF. */
|
||||||
if (ssd)
|
if (create_new)
|
||||||
|
section = subseg_force_new (ss_name, 0);
|
||||||
|
else if (ssd)
|
||||||
section = ssd->ssd_seg;
|
section = ssd->ssd_seg;
|
||||||
else if (alias)
|
else if (alias)
|
||||||
section = subseg_new (alias, 0);
|
section = subseg_new (alias, 0);
|
||||||
@ -6273,6 +6296,13 @@ hppa_fix_adjustable (fixp)
|
|||||||
fixp->fx_subsy->sy_used_in_reloc = 1;
|
fixp->fx_subsy->sy_used_in_reloc = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* We can't adjust DP relative relocs that use LR% and RR% field
|
||||||
|
selectors. That confuses the optimization pass in HP linker. */
|
||||||
|
if (fixp->fx_r_type == R_DP_RELATIVE
|
||||||
|
&& (hppa_fix->fx_r_field == e_lrsel
|
||||||
|
|| hppa_fix->fx_r_field == e_rrsel))
|
||||||
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Reject reductions of symbols in DLT relative relocs,
|
/* Reject reductions of symbols in DLT relative relocs,
|
||||||
@ -6379,9 +6409,7 @@ hppa_elf_mark_end_of_function ()
|
|||||||
{
|
{
|
||||||
/* symbol value should be the offset of the
|
/* symbol value should be the offset of the
|
||||||
last instruction of the function */
|
last instruction of the function */
|
||||||
symbolP = symbol_new (name, now_seg,
|
symbolP = symbol_new (name, now_seg, (valueT) (frag_now_fix () - 4),
|
||||||
(valueT) (obstack_next_free (&frags)
|
|
||||||
- frag_now->fr_literal - 4),
|
|
||||||
frag_now);
|
frag_now);
|
||||||
|
|
||||||
assert (symbolP);
|
assert (symbolP);
|
||||||
|
Reference in New Issue
Block a user