* read.c (TC_IMPLICIT_LCOMM_ALIGNMENT): New default-definition.
(s_lcomm_internal): Use it. * doc/internals.texi (CPU backend): Document it. * config/obj-evax.h (TC_IMPLICIT_LCOMM_ALIGNMENT): Set to 2**3 bytes.
This commit is contained in:
parent
0fff5247b5
commit
8684e216c8
4 changed files with 41 additions and 16 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Sat Mar 11 00:01:39 2000 Hans-Peter Nilsson <hp@axis.se>
|
||||||
|
|
||||||
|
* read.c (TC_IMPLICIT_LCOMM_ALIGNMENT): New default-definition.
|
||||||
|
(s_lcomm_internal): Use it.
|
||||||
|
* doc/internals.texi (CPU backend): Document it.
|
||||||
|
* config/obj-evax.h (TC_IMPLICIT_LCOMM_ALIGNMENT): Set to 2**3
|
||||||
|
bytes.
|
||||||
|
|
||||||
2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
|
2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
|
||||||
|
|
||||||
* config/tc-mips.c (mips_ip): Don't put stuff in .rodata
|
* config/tc-mips.c (mips_ip): Don't put stuff in .rodata
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* This file is obj-evax.h
|
/* This file is obj-evax.h
|
||||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
Copyright (C) 1996, 2000 Free Software Foundation, Inc.
|
||||||
Contributed by Klaus Kämpf (kkaempf@progis.de) of
|
Contributed by Klaus Kämpf (kkaempf@progis.de) of
|
||||||
proGIS Software, Aachen, Germany.
|
proGIS Software, Aachen, Germany.
|
||||||
|
|
||||||
|
@ -85,6 +85,8 @@ typedef void *object_headers;
|
||||||
|
|
||||||
#define LKP_S_K_SIZE 16
|
#define LKP_S_K_SIZE 16
|
||||||
|
|
||||||
|
#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) (P2VAR) = 3
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* comment-column: 0
|
* comment-column: 0
|
||||||
|
|
|
@ -1059,6 +1059,16 @@ upon the number of bytes that the alignment will skip.
|
||||||
You may define this macro to do special handling for an alignment directive.
|
You may define this macro to do special handling for an alignment directive.
|
||||||
GAS will call it at the end of the assembly.
|
GAS will call it at the end of the assembly.
|
||||||
|
|
||||||
|
@item TC_IMPLICIT_LCOMM_ALIGNMENT (@var{size}, @var{p2var})
|
||||||
|
@cindex TC_IMPLICIT_LCOMM_ALIGNMENT
|
||||||
|
An @code{.lcomm} directive with no explicit alignment parameter will use this
|
||||||
|
macro to set @var{p2var} to the alignment that a request for @var{size} bytes
|
||||||
|
will have. The alignment is expressed as a power of two. If no alignment
|
||||||
|
should take place, the macro definition should do nothing. Some targets define
|
||||||
|
a @code{.bss} directive that is also affected by this macro. The default
|
||||||
|
definition will set @var{p2var} to the truncated power of two of sizes up to
|
||||||
|
eight bytes.
|
||||||
|
|
||||||
@item md_flush_pending_output
|
@item md_flush_pending_output
|
||||||
@cindex md_flush_pending_output
|
@cindex md_flush_pending_output
|
||||||
If you define this macro, GAS will call it each time it skips any space because of a
|
If you define this macro, GAS will call it each time it skips any space because of a
|
||||||
|
|
35
gas/read.c
35
gas/read.c
|
@ -53,6 +53,21 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||||
#define TC_START_LABEL(x,y) (x==':')
|
#define TC_START_LABEL(x,y) (x==':')
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Set by the object-format or the target. */
|
||||||
|
#ifndef TC_IMPLICIT_LCOMM_ALIGNMENT
|
||||||
|
#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) \
|
||||||
|
do { \
|
||||||
|
if ((SIZE) >= 8) \
|
||||||
|
(P2VAR) = 3; \
|
||||||
|
else if ((SIZE) >= 4) \
|
||||||
|
(P2VAR) = 2; \
|
||||||
|
else if ((SIZE) >= 2) \
|
||||||
|
(P2VAR) = 1; \
|
||||||
|
else \
|
||||||
|
(P2VAR) = 0; \
|
||||||
|
} while (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The NOP_OPCODE is for the alignment fill value.
|
/* The NOP_OPCODE is for the alignment fill value.
|
||||||
* fill it a nop instruction so that the disassembler does not choke
|
* fill it a nop instruction so that the disassembler does not choke
|
||||||
* on it
|
* on it
|
||||||
|
@ -1973,24 +1988,14 @@ s_lcomm_internal (needs_align, bytes_p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!needs_align)
|
if (!needs_align)
|
||||||
{
|
{
|
||||||
/* FIXME. This needs to be machine independent. */
|
TC_IMPLICIT_LCOMM_ALIGNMENT (temp, align);
|
||||||
if (temp >= 8)
|
|
||||||
align = 3;
|
|
||||||
else if (temp >= 4)
|
|
||||||
align = 2;
|
|
||||||
else if (temp >= 2)
|
|
||||||
align = 1;
|
|
||||||
else
|
|
||||||
align = 0;
|
|
||||||
|
|
||||||
#ifdef OBJ_EVAX
|
/* Still zero unless TC_IMPLICIT_LCOMM_ALIGNMENT set it. */
|
||||||
/* FIXME: This needs to be done in a more general fashion. */
|
if (align)
|
||||||
align = 3;
|
record_alignment(bss_seg, align);
|
||||||
#endif
|
|
||||||
|
|
||||||
record_alignment(bss_seg, align);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needs_align)
|
if (needs_align)
|
||||||
|
|
Loading…
Reference in a new issue