diff options
author | David Edelsohn <dje@watson.ibm.com> | 2013-08-14 20:52:55 +0000 |
---|---|---|
committer | David Edelsohn <dje@watson.ibm.com> | 2013-08-14 20:52:55 +0000 |
commit | b9e34edb8da8a843460b047eacc94855096e1d8a (patch) | |
tree | c2d5256305fa45c6a2ed7b80bba3cd01fde206c0 /gas/config | |
parent | ee9c87dce0fe2a6d2138792b4edab86620ea4ff0 (diff) | |
download | binutils-redhat-b9e34edb8da8a843460b047eacc94855096e1d8a.tar.gz |
* config/tc-ppc.c (ppc_comm): Accept optional fourth .lcomm
argument as alignment.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-ppc.c | 24 |
1 files changed, 19 insertions, 5 deletions
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'; |