aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorYufeng Zhang <yufeng.zhang@arm.com>2012-12-06 15:45:38 +0000
committerYufeng Zhang <yufeng.zhang@arm.com>2012-12-06 15:45:38 +0000
commit67a324470a3774540b7fef7e02bdebf160e7a913 (patch)
treefcbacc1c5ba0f4f6547c64e723b834b27dde09e7 /gas/config
parenteff44fea8c27edb89e1b8c498997575fa9f6ad95 (diff)
downloadgdb-67a324470a3774540b7fef7e02bdebf160e7a913.zip
gdb-67a324470a3774540b7fef7e02bdebf160e7a913.tar.gz
gdb-67a324470a3774540b7fef7e02bdebf160e7a913.tar.bz2
gas/
2012-12-06 Yufeng Zhang <yufeng.zhang@arm.com> * config/tc-aarch64.c (exp_has_bignum_p): Remove. (my_get_expression): Not get rid of bignums. (s_ltorg): Increase the range of 'align'. (programmer_friendly_fixup): Allow bignum expression. gas/testsuite/ 2012-12-06 Yufeng Zhang <yufeng.zhang@arm.com> * gas/aarch64/illegal.s: Add test for unaccepted LDR literal. * gas/aarch64/illegal.l: Update. * gas/aarch64/programmer-friendly.s: Add tests for LDR literal with the auto-generation of literal in pool. * gas/aarch64/programmer-friendly.d: Update.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-aarch64.c39
1 files changed, 2 insertions, 37 deletions
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index bf72a13..72ed1b8 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -484,25 +484,6 @@ skip_past_char (char **str, char c)
/* Arithmetic expressions (possibly involving symbols). */
-/* Return TRUE if anything in the expression *SP is a bignum. */
-
-static bfd_boolean
-exp_has_bignum_p (symbolS * sp)
-{
- if (symbol_get_value_expression (sp)->X_op == O_big)
- return TRUE;
-
- if (symbol_get_value_expression (sp)->X_add_symbol)
- {
- return (exp_has_bignum_p (symbol_get_value_expression (sp)->X_add_symbol)
- || (symbol_get_value_expression (sp)->X_op_symbol
- && exp_has_bignum_p (symbol_get_value_expression (sp)->
- X_op_symbol)));
- }
-
- return FALSE;
-}
-
static bfd_boolean in_my_get_expression_p = FALSE;
/* Third argument to my_get_expression. */
@@ -571,23 +552,6 @@ my_get_expression (expressionS * ep, char **str, int prefix_mode,
(void) seg;
#endif
- /* Get rid of any bignums now, so that we don't generate an error for which
- we can't establish a line number later on. Big numbers are never valid
- in instructions, which is where this routine is always called. */
- if (ep->X_op == O_big
- || (ep->X_add_symbol
- && (exp_has_bignum_p (ep->X_add_symbol)
- || (ep->X_op_symbol && exp_has_bignum_p (ep->X_op_symbol)))))
- {
- if (prefix_present_p && error_p ())
- set_fatal_syntax_error (_("invalid constant"));
- else
- set_first_syntax_error (_("invalid constant"));
- *str = input_line_pointer;
- input_line_pointer = save_in;
- return FALSE;
- }
-
*str = input_line_pointer;
input_line_pointer = save_in;
return TRUE;
@@ -1730,7 +1694,7 @@ s_ltorg (int ignored ATTRIBUTE_UNUSED)
char sym_name[20];
int align;
- for (align = 2; align < 4; align++)
+ for (align = 2; align <= 4; align++)
{
int size = 1 << align;
@@ -5275,6 +5239,7 @@ programmer_friendly_fixup (aarch64_instruction *instr)
if (op == OP_LDRSW_LIT)
size = 4;
if (instr->reloc.exp.X_op != O_constant
+ && instr->reloc.exp.X_op != O_big
&& instr->reloc.exp.X_op != O_symbol)
{
record_operand_error (opcode, 1,