aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2000-03-13 20:46:07 +0000
committerHans-Peter Nilsson <hp@axis.com>2000-03-13 20:46:07 +0000
commit8684e216c83d214d6f896cacb420a2a7699e6690 (patch)
tree1b99a13d6a20a14f565dc74340d4dfbf65d21998 /gas/read.c
parent0fff5247b5e7a5006f4adea7fe67a51b53c89929 (diff)
downloadgdb-8684e216c83d214d6f896cacb420a2a7699e6690.zip
gdb-8684e216c83d214d6f896cacb420a2a7699e6690.tar.gz
gdb-8684e216c83d214d6f896cacb420a2a7699e6690.tar.bz2
* 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.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/gas/read.c b/gas/read.c
index 71dae8e..b8afe1c 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -53,6 +53,21 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define TC_START_LABEL(x,y) (x==':')
#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.
* fill it a nop instruction so that the disassembler does not choke
* on it
@@ -1973,24 +1988,14 @@ s_lcomm_internal (needs_align, bytes_p)
}
}
#endif
+
if (!needs_align)
{
- /* FIXME. This needs to be machine independent. */
- if (temp >= 8)
- align = 3;
- else if (temp >= 4)
- align = 2;
- else if (temp >= 2)
- align = 1;
- else
- align = 0;
-
-#ifdef OBJ_EVAX
- /* FIXME: This needs to be done in a more general fashion. */
- align = 3;
-#endif
+ TC_IMPLICIT_LCOMM_ALIGNMENT (temp, align);
- record_alignment(bss_seg, align);
+ /* Still zero unless TC_IMPLICIT_LCOMM_ALIGNMENT set it. */
+ if (align)
+ record_alignment(bss_seg, align);
}
if (needs_align)