mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-05 12:53:16 +08:00
Fix formatting.
This commit is contained in:
parent
83ea41ad9c
commit
3dd5103bb4
@ -1,3 +1,7 @@
|
|||||||
|
2000-07-10 Kazu Hirata <kazu@hxi.com>
|
||||||
|
|
||||||
|
* config/tc-h8500.c: Fix formatting.
|
||||||
|
|
||||||
2000-07-10 Alan Modra <alan@linuxcare.com.au>
|
2000-07-10 Alan Modra <alan@linuxcare.com.au>
|
||||||
|
|
||||||
* config/tc-hppa.c (md_apply_fix): Check fmt 12 and 22 pc-rel
|
* config/tc-hppa.c (md_apply_fix): Check fmt 12 and 22 pc-rel
|
||||||
|
@ -194,7 +194,7 @@ parse_reg (src, mode, reg)
|
|||||||
/* Cribbed from get_symbol_end(). */
|
/* Cribbed from get_symbol_end(). */
|
||||||
if (!is_name_beginner (*src) || *src == '\001')
|
if (!is_name_beginner (*src) || *src == '\001')
|
||||||
return 0;
|
return 0;
|
||||||
end = src+1;
|
end = src + 1;
|
||||||
while (is_part_of_name (*end) || *end == '\001')
|
while (is_part_of_name (*end) || *end == '\001')
|
||||||
end++;
|
end++;
|
||||||
len = end - src;
|
len = end - src;
|
||||||
@ -259,8 +259,7 @@ parse_reg (src, mode, reg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static char *
|
||||||
char *
|
|
||||||
parse_exp (s, op, page)
|
parse_exp (s, op, page)
|
||||||
char *s;
|
char *s;
|
||||||
expressionS *op;
|
expressionS *op;
|
||||||
@ -499,7 +498,7 @@ get_operand (ptr, op, ispage)
|
|||||||
/* Disp */
|
/* Disp */
|
||||||
src++;
|
src++;
|
||||||
|
|
||||||
src = skip_colonthing (exp_signed, src,
|
src = skip_colonthing (exp_signed, src,
|
||||||
op, RNIND_D16, RNIND_D8, RNIND_D16, 0);
|
op, RNIND_D16, RNIND_D8, RNIND_D16, 0);
|
||||||
|
|
||||||
if (*src != ',')
|
if (*src != ',')
|
||||||
@ -574,8 +573,7 @@ get_operand (ptr, op, ispage)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static char *
|
||||||
char *
|
|
||||||
get_operands (info, args, operand)
|
get_operands (info, args, operand)
|
||||||
h8500_opcode_info *info;
|
h8500_opcode_info *info;
|
||||||
char *args;
|
char *args;
|
||||||
@ -614,13 +612,11 @@ get_operands (info, args, operand)
|
|||||||
|
|
||||||
/* Passed a pointer to a list of opcodes which use different
|
/* Passed a pointer to a list of opcodes which use different
|
||||||
addressing modes, return the opcode which matches the opcodes
|
addressing modes, return the opcode which matches the opcodes
|
||||||
provided
|
provided. */
|
||||||
*/
|
|
||||||
|
|
||||||
int pcrel8; /* Set when we've seen a pcrel operand */
|
int pcrel8; /* Set when we've seen a pcrel operand */
|
||||||
|
|
||||||
static
|
static h8500_opcode_info *
|
||||||
h8500_opcode_info *
|
|
||||||
get_specific (opcode, operands)
|
get_specific (opcode, operands)
|
||||||
h8500_opcode_info *opcode;
|
h8500_opcode_info *opcode;
|
||||||
h8500_operand_info *operands;
|
h8500_operand_info *operands;
|
||||||
@ -876,8 +872,7 @@ check (operand, low, high)
|
|||||||
return operand->X_add_number;
|
return operand->X_add_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static void
|
||||||
void
|
|
||||||
insert (output, index, exp, reloc, pcrel)
|
insert (output, index, exp, reloc, pcrel)
|
||||||
char *output;
|
char *output;
|
||||||
int index;
|
int index;
|
||||||
@ -899,8 +894,8 @@ build_relaxable_instruction (opcode, operand)
|
|||||||
h8500_operand_info *operand;
|
h8500_operand_info *operand;
|
||||||
{
|
{
|
||||||
/* All relaxable instructions start life as two bytes but can become
|
/* All relaxable instructions start life as two bytes but can become
|
||||||
three bytes long if a lonely branch and up to 9 bytes if long scb
|
three bytes long if a lonely branch and up to 9 bytes if long
|
||||||
*/
|
scb. */
|
||||||
char *p;
|
char *p;
|
||||||
int len;
|
int len;
|
||||||
int type;
|
int type;
|
||||||
@ -934,8 +929,8 @@ build_relaxable_instruction (opcode, operand)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now we know what sort of opcodes it is, let's build the bytes -
|
/* Now we know what sort of opcodes it is, let's build the bytes. */
|
||||||
*/
|
|
||||||
static void
|
static void
|
||||||
build_bytes (opcode, operand)
|
build_bytes (opcode, operand)
|
||||||
h8500_opcode_info *opcode;
|
h8500_opcode_info *opcode;
|
||||||
@ -970,7 +965,6 @@ build_bytes (opcode, operand)
|
|||||||
break;
|
break;
|
||||||
case RD:
|
case RD:
|
||||||
case RDIND:
|
case RDIND:
|
||||||
|
|
||||||
output[index] |= rd;
|
output[index] |= rd;
|
||||||
break;
|
break;
|
||||||
case RS:
|
case RS:
|
||||||
@ -984,37 +978,32 @@ build_bytes (opcode, operand)
|
|||||||
case FPIND_D8:
|
case FPIND_D8:
|
||||||
insert (output, index, &displacement, R_H8500_IMM8, 0);
|
insert (output, index, &displacement, R_H8500_IMM8, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IMM16:
|
case IMM16:
|
||||||
{
|
{
|
||||||
int p;
|
int p;
|
||||||
switch (immediate_inpage) {
|
|
||||||
case 'p':
|
switch (immediate_inpage)
|
||||||
p = R_H8500_HIGH16;
|
{
|
||||||
break;
|
case 'p':
|
||||||
case 'h':
|
p = R_H8500_HIGH16;
|
||||||
p = R_H8500_HIGH16;
|
break;
|
||||||
break;
|
case 'h':
|
||||||
default:
|
p = R_H8500_HIGH16;
|
||||||
p = R_H8500_IMM16;
|
break;
|
||||||
break;
|
default:
|
||||||
}
|
p = R_H8500_IMM16;
|
||||||
|
break;
|
||||||
insert (output, index, &immediate,p, 0);
|
}
|
||||||
|
insert (output, index, &immediate, p, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
break;
|
break;
|
||||||
case RLIST:
|
case RLIST:
|
||||||
case IMM8:
|
case IMM8:
|
||||||
if (immediate_inpage)
|
if (immediate_inpage)
|
||||||
{
|
insert (output, index, &immediate, R_H8500_HIGH8, 0);
|
||||||
insert (output, index, &immediate, R_H8500_HIGH8, 0);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
insert (output, index, &immediate, R_H8500_IMM8, 0);
|
||||||
insert (output, index, &immediate, R_H8500_IMM8, 0);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case PCREL16:
|
case PCREL16:
|
||||||
insert (output, index, &displacement, R_H8500_PCREL16, 1);
|
insert (output, index, &displacement, R_H8500_PCREL16, 1);
|
||||||
@ -1027,19 +1016,12 @@ build_bytes (opcode, operand)
|
|||||||
output[index] |= check (&immediate, 0, 15);
|
output[index] |= check (&immediate, 0, 15);
|
||||||
break;
|
break;
|
||||||
case CR:
|
case CR:
|
||||||
|
|
||||||
output[index] |= cr;
|
output[index] |= cr;
|
||||||
if (cr == 0)
|
if (cr == 0)
|
||||||
{
|
output[0] |= 0x8;
|
||||||
output[0] |= 0x8;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
output[0] &= ~0x8;
|
||||||
output[0] &= ~0x8;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRB:
|
case CRB:
|
||||||
output[index] |= crb;
|
output[index] |= crb;
|
||||||
output[0] &= ~0x8;
|
output[0] &= ~0x8;
|
||||||
@ -1081,10 +1063,9 @@ build_bytes (opcode, operand)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is the guts of the machine-dependent assembler. STR points to a
|
/* This is the guts of the machine-dependent assembler. STR points to
|
||||||
machine dependent instruction. This function is supposed to emit
|
a machine dependent instruction. This function is supposed to emit
|
||||||
the frags/bytes it assembles to.
|
the frags/bytes it assembles to. */
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
void
|
||||||
md_assemble (str)
|
md_assemble (str)
|
||||||
@ -1099,11 +1080,11 @@ md_assemble (str)
|
|||||||
|
|
||||||
int nlen = 0;
|
int nlen = 0;
|
||||||
|
|
||||||
/* Drop leading whitespace */
|
/* Drop leading whitespace. */
|
||||||
while (*str == ' ')
|
while (*str == ' ')
|
||||||
str++;
|
str++;
|
||||||
|
|
||||||
/* find the op code end */
|
/* Find the op code end. */
|
||||||
for (op_start = op_end = str;
|
for (op_start = op_end = str;
|
||||||
!is_end_of_line[(unsigned char) *op_end] && *op_end != ' ';
|
!is_end_of_line[(unsigned char) *op_end] && *op_end != ' ';
|
||||||
op_end++)
|
op_end++)
|
||||||
@ -1118,9 +1099,7 @@ md_assemble (str)
|
|||||||
name[nlen] = 0;
|
name[nlen] = 0;
|
||||||
|
|
||||||
if (op_end == op_start)
|
if (op_end == op_start)
|
||||||
{
|
as_bad (_("can't find opcode "));
|
||||||
as_bad (_("can't find opcode "));
|
|
||||||
}
|
|
||||||
|
|
||||||
opcode = (h8500_opcode_info *) hash_find (opcode_hash_control, name);
|
opcode = (h8500_opcode_info *) hash_find (opcode_hash_control, name);
|
||||||
|
|
||||||
@ -1147,7 +1126,6 @@ md_assemble (str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
build_bytes (opcode, operand);
|
build_bytes (opcode, operand);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1171,8 +1149,8 @@ tc_headers_hook (headers)
|
|||||||
printf (_("call to tc_headers_hook \n"));
|
printf (_("call to tc_headers_hook \n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Various routines to kill one day */
|
/* Various routines to kill one day. */
|
||||||
/* Equal to MAX_PRECISION in atof-ieee.c */
|
/* Equal to MAX_PRECISION in atof-ieee.c. */
|
||||||
#define MAX_LITTLENUMS 6
|
#define MAX_LITTLENUMS 6
|
||||||
|
|
||||||
/* Turn a string in input_line_pointer into a floating point constant
|
/* Turn a string in input_line_pointer into a floating point constant
|
||||||
@ -1239,7 +1217,7 @@ CONST char *md_shortopts = "";
|
|||||||
struct option md_longopts[] = {
|
struct option md_longopts[] = {
|
||||||
{NULL, no_argument, NULL, 0}
|
{NULL, no_argument, NULL, 0}
|
||||||
};
|
};
|
||||||
size_t md_longopts_size = sizeof(md_longopts);
|
size_t md_longopts_size = sizeof (md_longopts);
|
||||||
|
|
||||||
int
|
int
|
||||||
md_parse_option (c, arg)
|
md_parse_option (c, arg)
|
||||||
@ -1262,8 +1240,7 @@ tc_aout_fix_to_chars ()
|
|||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static void
|
||||||
void
|
|
||||||
wordify_scb (buffer, disp_size, inst_size)
|
wordify_scb (buffer, disp_size, inst_size)
|
||||||
char *buffer;
|
char *buffer;
|
||||||
int *disp_size;
|
int *disp_size;
|
||||||
@ -1328,9 +1305,9 @@ wordify_scb (buffer, disp_size, inst_size)
|
|||||||
*buffer++ = 0;
|
*buffer++ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Called after relaxing, change the frags so they know how big they
|
||||||
called after relaxing, change the frags so they know how big they are
|
are. */
|
||||||
*/
|
|
||||||
void
|
void
|
||||||
md_convert_frag (headers, seg, fragP)
|
md_convert_frag (headers, seg, fragP)
|
||||||
object_headers *headers;
|
object_headers *headers;
|
||||||
@ -1354,9 +1331,9 @@ md_convert_frag (headers, seg, fragP)
|
|||||||
inst_size = 2;
|
inst_size = 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Branches to a known 16 bit displacement */
|
/* Branches to a known 16 bit displacement. */
|
||||||
|
|
||||||
/* Turn on the 16bit bit */
|
/* Turn on the 16bit bit. */
|
||||||
case C (BRANCH, WORD_DISP):
|
case C (BRANCH, WORD_DISP):
|
||||||
case C (SCB_F, WORD_DISP):
|
case C (SCB_F, WORD_DISP):
|
||||||
case C (SCB_TST, WORD_DISP):
|
case C (SCB_TST, WORD_DISP):
|
||||||
@ -1366,8 +1343,8 @@ md_convert_frag (headers, seg, fragP)
|
|||||||
case C (BRANCH, UNDEF_WORD_DISP):
|
case C (BRANCH, UNDEF_WORD_DISP):
|
||||||
case C (SCB_F, UNDEF_WORD_DISP):
|
case C (SCB_F, UNDEF_WORD_DISP):
|
||||||
case C (SCB_TST, UNDEF_WORD_DISP):
|
case C (SCB_TST, UNDEF_WORD_DISP):
|
||||||
/* This tried to be relaxed, but didn't manage it, it now needs a
|
/* This tried to be relaxed, but didn't manage it, it now needs
|
||||||
fix */
|
a fix. */
|
||||||
wordify_scb (buffer, &disp_size, &inst_size);
|
wordify_scb (buffer, &disp_size, &inst_size);
|
||||||
|
|
||||||
/* Make a reloc */
|
/* Make a reloc */
|
||||||
@ -1405,7 +1382,7 @@ md_section_align (seg, size)
|
|||||||
segT seg ;
|
segT seg ;
|
||||||
valueT size;
|
valueT size;
|
||||||
{
|
{
|
||||||
return ((size + (1 << section_alignment[(int) seg]) - 1)
|
return ((size + (1 << section_alignment[(int) seg]) - 1)
|
||||||
& (-1 << section_alignment[(int) seg]));
|
& (-1 << section_alignment[(int) seg]));
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1481,13 +1458,14 @@ md_estimate_size_before_relax (fragP, segment_type)
|
|||||||
if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type)
|
if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type)
|
||||||
{
|
{
|
||||||
/* Got a symbol and it's defined in this segment, become byte
|
/* Got a symbol and it's defined in this segment, become byte
|
||||||
sized - maybe it will fix up */
|
sized - maybe it will fix up. */
|
||||||
fragP->fr_subtype = C (what, BYTE_DISP);
|
fragP->fr_subtype = C (what, BYTE_DISP);
|
||||||
fragP->fr_var = md_relax_table[C (what, BYTE_DISP)].rlx_length;
|
fragP->fr_var = md_relax_table[C (what, BYTE_DISP)].rlx_length;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Its got a segment, but its not ours, so it will always be long */
|
/* Its got a segment, but its not ours, so it will always be
|
||||||
|
long. */
|
||||||
fragP->fr_subtype = C (what, UNDEF_WORD_DISP);
|
fragP->fr_subtype = C (what, UNDEF_WORD_DISP);
|
||||||
fragP->fr_var = md_relax_table[C (what, WORD_DISP)].rlx_length;
|
fragP->fr_var = md_relax_table[C (what, WORD_DISP)].rlx_length;
|
||||||
return md_relax_table[C (what, WORD_DISP)].rlx_length;
|
return md_relax_table[C (what, WORD_DISP)].rlx_length;
|
||||||
@ -1496,7 +1474,7 @@ md_estimate_size_before_relax (fragP, segment_type)
|
|||||||
return fragP->fr_var;
|
return fragP->fr_var;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Put number into target byte order */
|
/* Put number into target byte order. */
|
||||||
|
|
||||||
void
|
void
|
||||||
md_number_to_chars (ptr, use, nbytes)
|
md_number_to_chars (ptr, use, nbytes)
|
||||||
@ -1514,7 +1492,6 @@ md_pcrel_from (fixP)
|
|||||||
return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address;
|
return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void
|
void
|
||||||
tc_coff_symbol_emit_hook (ignore)
|
tc_coff_symbol_emit_hook (ignore)
|
||||||
symbolS *ignore;
|
symbolS *ignore;
|
||||||
@ -1589,8 +1566,10 @@ tc_reloc_mangle (fix_ptr, intr, base)
|
|||||||
dot = segment_info[S_GET_SEGMENT (symbol_ptr)].dot;
|
dot = segment_info[S_GET_SEGMENT (symbol_ptr)].dot;
|
||||||
if (dot)
|
if (dot)
|
||||||
{
|
{
|
||||||
/* intr->r_offset -=
|
#if 0
|
||||||
segment_info[S_GET_SEGMENT(symbol_ptr)].scnhdr.s_paddr;*/
|
intr->r_offset -=
|
||||||
|
segment_info[S_GET_SEGMENT (symbol_ptr)].scnhdr.s_paddr;
|
||||||
|
#endif
|
||||||
intr->r_offset += S_GET_VALUE (symbol_ptr);
|
intr->r_offset += S_GET_VALUE (symbol_ptr);
|
||||||
intr->r_symndx = dot->sy_number;
|
intr->r_symndx = dot->sy_number;
|
||||||
}
|
}
|
||||||
@ -1607,8 +1586,6 @@ tc_reloc_mangle (fix_ptr, intr, base)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
start_label (ptr)
|
start_label (ptr)
|
||||||
char *ptr;
|
char *ptr;
|
||||||
@ -1622,13 +1599,9 @@ start_label (ptr)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
tc_coff_sizemachdep (frag)
|
tc_coff_sizemachdep (frag)
|
||||||
fragS *frag;
|
fragS *frag;
|
||||||
{
|
{
|
||||||
return md_relax_table[frag->fr_subtype].rlx_length;
|
return md_relax_table[frag->fr_subtype].rlx_length;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* end of tc-h8500.c */
|
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
sure if its right or not. Could go either way. I wish
|
sure if its right or not. Could go either way. I wish
|
||||||
I really understood this stuff. */
|
I really understood this stuff. */
|
||||||
|
|
||||||
|
|
||||||
const int table_size_of_flonum_powers_of_ten = 13;
|
const int table_size_of_flonum_powers_of_ten = 13;
|
||||||
|
|
||||||
static const LITTLENUM_TYPE zero[] =
|
static const LITTLENUM_TYPE zero[] =
|
||||||
@ -204,6 +203,8 @@ const FLONUM_TYPE flonum_positive_powers_of_ten[] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
void dummy1 () { }
|
void
|
||||||
|
dummy1 ()
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
/* end of flonum_const.c */
|
|
||||||
|
517
gas/po/gas.pot
517
gas/po/gas.pot
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user