summaryrefslogtreecommitdiffstats
path: root/gas
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>2013-08-14 20:52:55 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>2013-08-14 20:52:55 +0000
commit3c02c47f97cff61d33d51ade47632f0792d84c7c (patch)
tree0be77f6726aa72e7409059636b7068f2a6bccdde /gas
parent61884d20bc352deffeb4204405123297c45344b0 (diff)
downloadppe42-binutils-3c02c47f97cff61d33d51ade47632f0792d84c7c.tar.gz
ppe42-binutils-3c02c47f97cff61d33d51ade47632f0792d84c7c.zip
* config/tc-ppc.c (ppc_comm): Accept optional fourth .lcomm
argument as alignment.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-ppc.c24
2 files changed, 24 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 329d7425dd..7e600044dd 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2013-08-14 David Edelsohn <dje.gcc@gmail.com>
+
+ * config/tc-ppc.c (ppc_comm): Accept optional fourth .lcomm
+ argument as alignment.
+
2013-08-09 Nick Clifton <nickc@redhat.com>
* config/tc-rl78.c (elf_flags): New variable.
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 5c413d3dab..e426ed3619 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -3526,11 +3526,6 @@ ppc_comm (int lcomm)
char *lcomm_name;
char lcomm_endc;
- if (size <= 4)
- align = 2;
- else
- align = 3;
-
/* The third argument to .lcomm appears to be the real local
common symbol to create. References to the symbol named in
the first argument are turned into references to the third
@@ -3549,6 +3544,25 @@ ppc_comm (int lcomm)
lcomm_sym = symbol_find_or_make (lcomm_name);
*input_line_pointer = lcomm_endc;
+
+ /* The fourth argument to .lcomm is the alignment. */
+ if (*input_line_pointer != ',')
+ {
+ if (size <= 4)
+ align = 2;
+ else
+ align = 3;
+ }
+ else
+ {
+ ++input_line_pointer;
+ align = get_absolute_expression ();
+ if (align <= 0)
+ {
+ as_warn (_("ignoring bad alignment"));
+ align = 2;
+ }
+ }
}
*end_name = '\0';
OpenPOWER on IntegriCloud