/* tc-mips.c -- assemble code for a MIPS chip.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by the OSF and Ralph Campbell.
Written by Keith Knowles and Ralph Campbell, working independently.
4 octets for 64bit assembly. */
if (HAVE_64BIT_GPRS &&
(*reloc_type == BFD_RELOC_16
- || *reloc_type == BFD_RELOC_32
- || *reloc_type == BFD_RELOC_MIPS_JMP
- || *reloc_type == BFD_RELOC_HI16_S
- || *reloc_type == BFD_RELOC_LO16
- || *reloc_type == BFD_RELOC_GPREL16
- || *reloc_type == BFD_RELOC_MIPS_LITERAL
- || *reloc_type == BFD_RELOC_GPREL32
- || *reloc_type == BFD_RELOC_64
- || *reloc_type == BFD_RELOC_CTOR
- || *reloc_type == BFD_RELOC_MIPS_SUB
- || *reloc_type == BFD_RELOC_MIPS_HIGHEST
- || *reloc_type == BFD_RELOC_MIPS_HIGHER
- || *reloc_type == BFD_RELOC_MIPS_SCN_DISP
- || *reloc_type == BFD_RELOC_MIPS_REL16
- || *reloc_type == BFD_RELOC_MIPS_RELGOT))
+ || *reloc_type == BFD_RELOC_32
+ || *reloc_type == BFD_RELOC_MIPS_JMP
+ || *reloc_type == BFD_RELOC_HI16_S
+ || *reloc_type == BFD_RELOC_LO16
+ || *reloc_type == BFD_RELOC_GPREL16
+ || *reloc_type == BFD_RELOC_MIPS_LITERAL
+ || *reloc_type == BFD_RELOC_GPREL32
+ || *reloc_type == BFD_RELOC_64
+ || *reloc_type == BFD_RELOC_CTOR
+ || *reloc_type == BFD_RELOC_MIPS_SUB
+ || *reloc_type == BFD_RELOC_MIPS_HIGHEST
+ || *reloc_type == BFD_RELOC_MIPS_HIGHER
+ || *reloc_type == BFD_RELOC_MIPS_SCN_DISP
+ || *reloc_type == BFD_RELOC_MIPS_REL16
+ || *reloc_type == BFD_RELOC_MIPS_RELGOT))
fixp[0]->fx_no_overflow = 1;
if (unmatched_hi)
|| *reloc_type == BFD_RELOC_MIPS_SCN_DISP
|| *reloc_type == BFD_RELOC_MIPS_REL16
|| *reloc_type == BFD_RELOC_MIPS_RELGOT))
- fixp[1]->fx_no_overflow = 1;
+ fixp[1]->fx_no_overflow = 1;
if (reloc_type[2] != BFD_RELOC_UNUSED)
{
|| *reloc_type == BFD_RELOC_MIPS_SCN_DISP
|| *reloc_type == BFD_RELOC_MIPS_REL16
|| *reloc_type == BFD_RELOC_MIPS_RELGOT))
- fixp[2]->fx_no_overflow = 1;
+ fixp[2]->fx_no_overflow = 1;
}
}
}
/* Search until we get a match for NAME. */
while (1)
{
- /* It is assumed here that macros will never generate
+ /* It is assumed here that macros will never generate
MIPS-3D instructions. */
if (strcmp (fmt, insn.insn_mo->args) == 0
&& insn.insn_mo->pinfo != INSN_MACRO
/* We don't do GP optimization for now because RELAX_ENCODE can't
hold the data for such large chunks. */
- if (used_at == 0)
- {
- macro_build (p, &icnt, &offset_expr, "lui", "t,u",
- tempreg, (int) BFD_RELOC_MIPS_HIGHEST);
- macro_build (p, &icnt, &offset_expr, "lui", "t,u",
- AT, (int) BFD_RELOC_HI16_S);
- macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
- tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER);
- macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
- AT, AT, (int) BFD_RELOC_LO16);
- macro_build (p, &icnt, (expressionS *) NULL, "dsll32",
- "d,w,<", tempreg, tempreg, 0);
- macro_build (p, &icnt, (expressionS *) NULL, "dadd", "d,v,t",
- tempreg, tempreg, AT);
- used_at = 1;
- }
- else
- {
- macro_build (p, &icnt, &offset_expr, "lui", "t,u",
- tempreg, (int) BFD_RELOC_MIPS_HIGHEST);
- macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
- tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER);
- macro_build (p, &icnt, (expressionS *) NULL, "dsll", "d,w,<",
- tempreg, tempreg, 16);
- macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
- tempreg, tempreg, (int) BFD_RELOC_HI16_S);
- macro_build (p, &icnt, (expressionS *) NULL, "dsll", "d,w,<",
- tempreg, tempreg, 16);
- macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
- tempreg, tempreg, (int) BFD_RELOC_LO16);
- }
- }
- else
- {
- if ((valueT) offset_expr.X_add_number <= MAX_GPREL_OFFSET
- && ! nopic_need_relax (offset_expr.X_add_symbol, 1))
- {
- frag_grow (20);
- macro_build ((char *) NULL, &icnt, &offset_expr, "addiu",
- "t,r,j", tempreg, GP, (int) BFD_RELOC_GPREL16);
- p = frag_var (rs_machine_dependent, 8, 0,
- RELAX_ENCODE (4, 8, 0, 4, 0,
- mips_opts.warn_about_macros),
- offset_expr.X_add_symbol, 0, NULL);
- }
- macro_build_lui (p, &icnt, &offset_expr, tempreg);
- if (p != NULL)
- p += 4;
- macro_build (p, &icnt, &offset_expr, "addiu",
- "t,r,j", tempreg, tempreg, (int) BFD_RELOC_LO16);
- }
+ if (used_at == 0)
+ {
+ macro_build (p, &icnt, &offset_expr, "lui", "t,u",
+ tempreg, (int) BFD_RELOC_MIPS_HIGHEST);
+ macro_build (p, &icnt, &offset_expr, "lui", "t,u",
+ AT, (int) BFD_RELOC_HI16_S);
+ macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
+ tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER);
+ macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
+ AT, AT, (int) BFD_RELOC_LO16);
+ macro_build (p, &icnt, (expressionS *) NULL, "dsll32",
+ "d,w,<", tempreg, tempreg, 0);
+ macro_build (p, &icnt, (expressionS *) NULL, "dadd", "d,v,t",
+ tempreg, tempreg, AT);
+ used_at = 1;
+ }
+ else
+ {
+ macro_build (p, &icnt, &offset_expr, "lui", "t,u",
+ tempreg, (int) BFD_RELOC_MIPS_HIGHEST);
+ macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
+ tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER);
+ macro_build (p, &icnt, (expressionS *) NULL, "dsll", "d,w,<",
+ tempreg, tempreg, 16);
+ macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
+ tempreg, tempreg, (int) BFD_RELOC_HI16_S);
+ macro_build (p, &icnt, (expressionS *) NULL, "dsll", "d,w,<",
+ tempreg, tempreg, 16);
+ macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
+ tempreg, tempreg, (int) BFD_RELOC_LO16);
+ }
+ }
+ else
+ {
+ if ((valueT) offset_expr.X_add_number <= MAX_GPREL_OFFSET
+ && ! nopic_need_relax (offset_expr.X_add_symbol, 1))
+ {
+ frag_grow (20);
+ macro_build ((char *) NULL, &icnt, &offset_expr, "addiu",
+ "t,r,j", tempreg, GP, (int) BFD_RELOC_GPREL16);
+ p = frag_var (rs_machine_dependent, 8, 0,
+ RELAX_ENCODE (4, 8, 0, 4, 0,
+ mips_opts.warn_about_macros),
+ offset_expr.X_add_symbol, 0, NULL);
+ }
+ macro_build_lui (p, &icnt, &offset_expr, tempreg);
+ if (p != NULL)
+ p += 4;
+ macro_build (p, &icnt, &offset_expr, "addiu",
+ "t,r,j", tempreg, tempreg, (int) BFD_RELOC_LO16);
+ }
}
else if (mips_pic == SVR4_PIC && ! mips_big_got)
{
}
if (mips_opts.noreorder)
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- "nop", "");
+ "nop", "");
expr1.X_add_number = mips_cprestore_offset;
macro_build ((char *) NULL, &icnt, &expr1,
HAVE_32BIT_ADDRESSES ? "lw" : "ld", "t,o(b)",
xreg, yreg);
expr1.X_add_number = 2;
macro_build ((char *) NULL, &icnt, &expr1, "bnez", "x,p", yreg);
- macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break",
- "6", 7);
+ macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break",
+ "6", 7);
--mips_opts.noreorder;
macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s2, "x", zreg);
break;
case M_ABS:
expr1.X_add_number = 0;
- macro_build ((char *) NULL, &icnt, &expr1, "slti", "x,8", yreg);
+ macro_build ((char *) NULL, &icnt, &expr1, "slti", "x,8", yreg);
if (xreg != yreg)
move_register (&icnt, xreg, yreg);
expr1.X_add_number = 2;
if (OPCODE_IS_MEMBER (insn,
(mips_opts.isa
- | (mips_opts.ase_mips3d ? INSN_MIPS3D : 0)),
+ | (mips_opts.ase_mips3d ? INSN_MIPS3D : 0)),
mips_arch))
ok = true;
else
s = expr_end;
continue;
- case 'C': /* Coprocessor code */
+ case 'C': /* Coprocessor code */
my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
- if ((unsigned long) imm_expr.X_add_number >= (1<<25))
+ if ((unsigned long) imm_expr.X_add_number >= (1 << 25))
{
as_warn (_("Coproccesor code > 25 bits (%ld)"),
(long) imm_expr.X_add_number);
- imm_expr.X_add_number &= ((1<<25) - 1);
+ imm_expr.X_add_number &= ((1 << 25) - 1);
}
ip->insn_opcode |= imm_expr.X_add_number;
imm_expr.X_op = O_absent;
(imm_expr.X_add_number >> 16) & 0xffff;
#ifdef OBJ_ELF
else if (c == S_EX_HIGHEST)
- *imm_reloc = BFD_RELOC_MIPS_HIGHEST;
+ *imm_reloc = BFD_RELOC_MIPS_HIGHEST;
else if (c == S_EX_HIGHER)
- *imm_reloc = BFD_RELOC_MIPS_HIGHER;
+ *imm_reloc = BFD_RELOC_MIPS_HIGHER;
else if (c == S_EX_GP_REL)
{
/* This occurs in NewABI only. */
}
#ifdef OBJ_ELF
else if (c == S_EX_HIGHEST)
- *imm_reloc = BFD_RELOC_MIPS_HIGHEST;
+ *imm_reloc = BFD_RELOC_MIPS_HIGHEST;
else if (c == S_EX_GP_REL)
{
/* This occurs in NewABI only. */
&& (e = b + strcspn (b, ") \t"))
&& e - b > 1 && e - b < 4)
{
- if ((e - b == 3
- && ((b[1] == 'f' && b[2] == 'p')
- || (b[1] == 's' && b[2] == 'p')
- || (b[1] == 'g' && b[2] == 'p')
- || (b[1] == 'a' && b[2] == 't')
- || (ISDIGIT (b[1])
- && ISDIGIT (b[2]))))
- || (ISDIGIT (b[1])))
- {
- *len = strcspn (*str, ")") + 1;
- return S_EX_REGISTER;
- }
+ if ((e - b == 3
+ && ((b[1] == 'f' && b[2] == 'p')
+ || (b[1] == 's' && b[2] == 'p')
+ || (b[1] == 'g' && b[2] == 'p')
+ || (b[1] == 'a' && b[2] == 't')
+ || (ISDIGIT (b[1])
+ && ISDIGIT (b[2]))))
+ || (ISDIGIT (b[1])))
+ {
+ *len = strcspn (*str, ")") + 1;
+ return S_EX_REGISTER;
+ }
}
}
/* Check for percent_op (in parentheses). */
while (i < (sizeof (percent_op) / sizeof (struct percent_op_match)))
{
if (strncmp (*str, percent_op[i].str, strlen (percent_op[i].str)))
- i++;
+ i++;
else
{
int type = percent_op[i].type;
}
else
{
- as_fatal(_("internal error"));
+ as_fatal (_("internal error"));
}
if (nestlevel <= 0)
}
}
else
- cpu = ci->cpu;
+ cpu = ci->cpu;
}
switch (c)
{
case OPTION_MTUNE:
if (mips_tune != CPU_UNKNOWN && mips_tune != cpu)
- as_warn(_("A different -mtune= was already specified, is now "
- "-mtune=%s"), arg);
+ as_warn (_("A different -mtune= was already specified, is now "
+ "-mtune=%s"), arg);
mips_tune = cpu;
break;
case OPTION_MARCH:
if (mips_arch != CPU_UNKNOWN && mips_arch != cpu)
- as_warn(_("A different -march= was already specified, is now "
- "-march=%s"), arg);
+ as_warn (_("A different -march= was already specified, is now "
+ "-march=%s"), arg);
mips_arch = cpu;
break;
case OPTION_MCPU:
if (mips_cpu != CPU_UNKNOWN && mips_cpu != cpu)
- as_warn(_("A different -mcpu= was already specified, is now "
- "-mcpu=%s"), arg);
+ as_warn (_("A different -mcpu= was already specified, is now "
+ "-mcpu=%s"), arg);
mips_cpu = cpu;
}
}
case OPTION_M4650:
if ((mips_arch != CPU_UNKNOWN && mips_arch != CPU_R4650)
|| (mips_tune != CPU_UNKNOWN && mips_tune != CPU_R4650))
- as_warn(_("A different -march= or -mtune= was already specified, "
- "is now -m4650"));
+ as_warn (_("A different -march= or -mtune= was already specified, "
+ "is now -m4650"));
mips_arch = CPU_R4650;
mips_tune = CPU_R4650;
break;
case OPTION_M4010:
if ((mips_arch != CPU_UNKNOWN && mips_arch != CPU_R4010)
|| (mips_tune != CPU_UNKNOWN && mips_tune != CPU_R4010))
- as_warn(_("A different -march= or -mtune= was already specified, "
- "is now -m4010"));
+ as_warn (_("A different -march= or -mtune= was already specified, "
+ "is now -m4010"));
mips_arch = CPU_R4010;
mips_tune = CPU_R4010;
break;
case OPTION_M4100:
if ((mips_arch != CPU_UNKNOWN && mips_arch != CPU_VR4100)
|| (mips_tune != CPU_UNKNOWN && mips_tune != CPU_VR4100))
- as_warn(_("A different -march= or -mtune= was already specified, "
- "is now -m4100"));
+ as_warn (_("A different -march= or -mtune= was already specified, "
+ "is now -m4100"));
mips_arch = CPU_VR4100;
mips_tune = CPU_VR4100;
break;
case OPTION_M3900:
if ((mips_arch != CPU_UNKNOWN && mips_arch != CPU_R3900)
|| (mips_tune != CPU_UNKNOWN && mips_tune != CPU_R3900))
- as_warn(_("A different -march= or -mtune= was already specified, "
- "is now -m3900"));
+ as_warn (_("A different -march= or -mtune= was already specified, "
+ "is now -m3900"));
mips_arch = CPU_R3900;
mips_tune = CPU_R3900;
break;
void
md_apply_fix3 (fixP, valP, seg)
fixS *fixP;
- valueT * valP;
+ valueT *valP;
segT seg ATTRIBUTE_UNUSED;
{
bfd_byte *buf;
|| fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY);
- value = * valP;
+ value = *valP;
/* If we aren't adjusting this fixup to be against the section
symbol, we need to adjust the value. */
say, misuse can cause serious problems. */
isa = atoi (name + 4);
switch (isa)
- {
- case 0:
- mips_opts.gp32 = file_mips_gp32;
- mips_opts.fp32 = file_mips_fp32;
- mips_opts.abi = file_mips_abi;
- break;
- case 1:
- case 2:
- case 32:
- mips_opts.gp32 = 1;
- mips_opts.fp32 = 1;
- break;
- case 3:
- case 4:
- case 5:
- case 64:
- /* Loosen ABI register width restriction. */
- if (mips_opts.abi == O32_ABI)
- mips_opts.abi = NO_ABI;
- mips_opts.gp32 = 0;
- mips_opts.fp32 = 0;
- break;
- default:
- as_bad (_("unknown ISA level %s"), name + 4);
- break;
- }
+ {
+ case 0:
+ mips_opts.gp32 = file_mips_gp32;
+ mips_opts.fp32 = file_mips_fp32;
+ mips_opts.abi = file_mips_abi;
+ break;
+ case 1:
+ case 2:
+ case 32:
+ mips_opts.gp32 = 1;
+ mips_opts.fp32 = 1;
+ break;
+ case 3:
+ case 4:
+ case 5:
+ case 64:
+ /* Loosen ABI register width restriction. */
+ if (mips_opts.abi == O32_ABI)
+ mips_opts.abi = NO_ABI;
+ mips_opts.gp32 = 0;
+ mips_opts.fp32 = 0;
+ break;
+ default:
+ as_bad (_("unknown ISA level %s"), name + 4);
+ break;
+ }
switch (isa)
- {
- case 0: mips_opts.isa = file_mips_isa; break;
- case 1: mips_opts.isa = ISA_MIPS1; break;
- case 2: mips_opts.isa = ISA_MIPS2; break;
- case 3: mips_opts.isa = ISA_MIPS3; break;
- case 4: mips_opts.isa = ISA_MIPS4; break;
- case 5: mips_opts.isa = ISA_MIPS5; break;
- case 32: mips_opts.isa = ISA_MIPS32; break;
- case 64: mips_opts.isa = ISA_MIPS64; break;
- default: as_bad (_("unknown ISA level %s"), name + 4); break;
- }
+ {
+ case 0: mips_opts.isa = file_mips_isa; break;
+ case 1: mips_opts.isa = ISA_MIPS1; break;
+ case 2: mips_opts.isa = ISA_MIPS2; break;
+ case 3: mips_opts.isa = ISA_MIPS3; break;
+ case 4: mips_opts.isa = ISA_MIPS4; break;
+ case 5: mips_opts.isa = ISA_MIPS5; break;
+ case 32: mips_opts.isa = ISA_MIPS32; break;
+ case 64: mips_opts.isa = ISA_MIPS64; break;
+ default: as_bad (_("unknown ISA level %s"), name + 4); break;
+ }
}
else if (strcmp (name, "autoextend") == 0)
mips_opts.noautoextend = 0;
if (exp.X_op != O_symbol)
{
as_bad ("bad .weakext directive");
- ignore_rest_of_line();
+ ignore_rest_of_line ();
return;
}
symbol_set_value_expression (symbolP, &exp);
if (mips_pic != NO_PIC)
elf_elfheader (stdoutput)->e_flags |= EF_MIPS_PIC;
- /* Set MIPS ELF flags for ASEs. */
+ /* Set MIPS ELF flags for ASEs. */
#if 0 /* XXX FIXME */
if (file_ase_mips3d)
elf_elfheader (stdoutput)->e_flags |= ???;
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
#include <stdio.h>
#include "as.h"
const pseudo_typeS md_pseudo_table[] =
{
{ "align", s_align_bytes, 0 },
- /* Pseudo-ops which must be defined. */
+ /* Pseudo-ops which must be defined. */
{ "bss", s390_bss, 0 },
{ "insn", s390_insn, 0 },
/* Pseudo-ops which must be overridden. */
sp has the value 15
lit has the value 12
- The table is sorted. Suitable for searching by a binary search. */
+ The table is sorted. Suitable for searching by a binary search. */
static const struct pd_reg pre_defined_registers[] =
{
{
addressT min, max;
- max = (((addressT) 1 << (operand->bits - 1))<<1) - 1;
+ max = (((addressT) 1 << (operand->bits - 1)) << 1) - 1;
min = (offsetT) 0;
uval = (addressT) val;
/* Length x in an instructions has real length x+1. */
/* Insert fragments of the operand byte for byte. */
offset = operand->shift + operand->bits;
uval <<= (-offset) & 7;
- insn += (offset - 1)/8;
+ insn += (offset - 1) / 8;
while (uval != 0)
{
*insn-- |= uval;
static int lpe_count = 0;
static int
-s390_exp_compare(exp1, exp2)
+s390_exp_compare (exp1, exp2)
expressionS *exp1;
expressionS *exp2;
{
&& (exp1->X_op_symbol == exp2->X_op_symbol)
&& (exp1->X_add_number == exp2->X_add_number);
default:
- return 0;
- }
+ return 0;
+ }
}
/* Test for @lit and if its present make an entry in the literal pool and
/* Processing for 'normal' data types. */
for (lpe = lpe_list; lpe != NULL; lpe = lpe->next)
if (lpe->nbytes == nbytes && lpe->reloc == reloc
- && s390_exp_compare(exp_p, &lpe->ex) != 0)
+ && s390_exp_compare (exp_p, &lpe->ex) != 0)
break;
}
}
else
{
- lpe = (struct s390_lpe *) xmalloc(sizeof (struct s390_lpe));
+ lpe = (struct s390_lpe *) xmalloc (sizeof (struct s390_lpe));
}
lpe->ex = *exp_p;
lpe->floatnum = generic_floating_point_number;
else if (exp_p->X_add_number <= 4)
memcpy (lpe->bignum, generic_bignum,
- exp_p->X_add_number*sizeof (LITTLENUM_TYPE));
+ exp_p->X_add_number * sizeof (LITTLENUM_TYPE));
else
as_bad (_("Big number is too big"));
}
if (lp_sym == NULL)
{
sprintf (tmp_name, ".L\001%i", lp_count);
- lp_sym = symbol_make(tmp_name);
+ lp_sym = symbol_make (tmp_name);
}
/* Make name for literal pool entry. */
sprintf (tmp_name, ".L\001%i\002%i", lp_count, lpe_count);
lpe_count++;
- lpe->sym = symbol_make(tmp_name);
+ lpe->sym = symbol_make (tmp_name);
/* Add to literal pool list. */
lpe->next = NULL;
}
while (*input_line_pointer++ == ',');
- input_line_pointer--; /* Put terminator back into stream. */
+ input_line_pointer--; /* Put terminator back into stream. */
demand_empty_rest_of_line ();
}
char *f;
int fc, i;
- while (ISSPACE (*str)) str++;
+ while (ISSPACE (*str))
+ str++;
parentheses = 0;
skip_optional = 0;
hold = input_line_pointer;
input_line_pointer = str;
- if (! register_name (&ex)) /* parse the operand */
+ /* Parse the operand. */
+ if (! register_name (&ex))
expression (&ex);
str = input_line_pointer;
if (strcmp (opformat->name, "e") != 0 && *input_line_pointer++ != ',')
as_bad (_("missing comma after insn constant\n"));
-
+
if ((s = strchr (input_line_pointer, '\n')) != NULL)
*s = '\0';
input_line_pointer = md_gather_operands (input_line_pointer, insn,
struct s390_lpe *lpe;
if (lp_sym == NULL || lpe_count == 0)
- return; /* nothing to be done */
+ return; /* Nothing to be done. */
/* Emit symbol for start of literal pool. */
S_SET_SEGMENT (lp_sym, now_seg);
generic_floating_point_number = lpe->floatnum;
else
memcpy (generic_bignum, lpe->bignum,
- lpe->ex.X_add_number*sizeof (LITTLENUM_TYPE));
+ lpe->ex.X_add_number * sizeof (LITTLENUM_TYPE));
}
emit_expr (&lpe->ex, lpe->nbytes);
}
md_undefined_symbol (name)
char *name;
{
- if (*name == '_' && *(name+1) == 'G'
+ if (*name == '_' && *(name + 1) == 'G'
&& strcmp (name, "_GLOBAL_OFFSET_TABLE_") == 0)
- {
- if (!GOT_symbol)
- {
- if (symbol_find (name))
- as_bad (_("GOT already in symbol table"));
- GOT_symbol = symbol_new (name, undefined_section,
- (valueT) 0, &zero_address_frag);
- }
- return GOT_symbol;
- }
+ {
+ if (!GOT_symbol)
+ {
+ if (symbol_find (name))
+ as_bad (_("GOT already in symbol table"));
+ GOT_symbol = symbol_new (name, undefined_section,
+ (valueT) 0, &zero_address_frag);
+ }
+ return GOT_symbol;
+ }
return 0;
}
to make sure that the dynamic relocations are done correctly, so in
some cases we force the original symbol to be used. */
int
-tc_s390_fix_adjustable(fixP)
- fixS * fixP;
+tc_s390_fix_adjustable (fixP)
+ fixS *fixP;
{
/* Prevent all adjustments to global symbols. */
if (S_IS_EXTERN (fixP->fx_addsy))
if (S_IS_WEAK (fixP->fx_addsy))
return 0;
/* Don't adjust pc-relative references to merge sections. */
- if ((S_GET_SEGMENT(fixP->fx_addsy)->flags & SEC_MERGE) != 0
+ if ((S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0
&& fixP->fx_pcrel)
return 0;
/* adjust_reloc_syms doesn't know about the GOT. */
segT seg;
{
char *where;
- valueT value = * valP;
+ valueT value = *valP;
where = fixP->fx_frag->fr_literal + fixP->fx_where;
- if (fixP->fx_subsy != NULL)
+ if (fixP->fx_subsy != NULL)
{
if ((fixP->fx_addsy != NULL
&& S_GET_SEGMENT (fixP->fx_addsy) == S_GET_SEGMENT (fixP->fx_subsy)
if (!S_IS_DEFINED (fixP->fx_subsy))
as_bad_where (fixP->fx_file, fixP->fx_line,
_("unresolved fx_subsy symbol that must be resolved"));
- value -= S_GET_VALUE(fixP->fx_subsy);
+ value -= S_GET_VALUE (fixP->fx_subsy);
if (S_GET_SEGMENT (fixP->fx_subsy) == seg && ! fixP->fx_pcrel)
value += MD_PCREL_FROM_SECTION (fixP, seg);
}
-
- if (fixP->fx_addsy != NULL)
+
+ if (fixP->fx_addsy != NULL)
{
if ((fixP->fx_subsy != NULL
&& S_GET_SEGMENT (fixP->fx_addsy) == S_GET_SEGMENT (fixP->fx_subsy)
- && SEG_NORMAL (S_GET_SEGMENT(fixP->fx_addsy)))
+ && SEG_NORMAL (S_GET_SEGMENT (fixP->fx_addsy)))
|| (S_GET_SEGMENT (fixP->fx_addsy) == seg
&& fixP->fx_pcrel && TC_RELOC_RTSYM_LOC_FIXUP (fixP))
- || (!fixP->fx_pcrel
+ || (!fixP->fx_pcrel
&& S_GET_SEGMENT (fixP->fx_addsy) == absolute_section)
|| (S_GET_SEGMENT (fixP->fx_addsy) != undefined_section
&& !bfd_is_com_section (S_GET_SEGMENT (fixP->fx_addsy))
- && TC_FIX_ADJUSTABLE(fixP)))
+ && TC_FIX_ADJUSTABLE (fixP)))
value -= S_GET_VALUE (fixP->fx_addsy);
if (fixP->fx_pcrel)
if (reloc->howto == NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- _("cannot represent relocation type %s"),
- bfd_get_reloc_code_name (code));
+ _("cannot represent relocation type %s"),
+ bfd_get_reloc_code_name (code));
/* Set howto to a garbage value so that we can keep going. */
reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
assert (reloc->howto != NULL);