diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-08-11 02:11:58 +0000 |
---|---|---|
committer | Mark Mitchell <mark@codesourcery.com> | 2004-08-11 02:11:58 +0000 |
commit | b2221023d38c7988aa0c6db830062b96f84354b2 (patch) | |
tree | fb18267a0ff5b92e468964f7c39bca0b5a5ea1e0 /gas/expr.c | |
parent | 32dbff569cbe13ffbc77f8df95ce9487173aa915 (diff) | |
download | gdb-b2221023d38c7988aa0c6db830062b96f84354b2.zip gdb-b2221023d38c7988aa0c6db830062b96f84354b2.tar.gz gdb-b2221023d38c7988aa0c6db830062b96f84354b2.tar.bz2 |
* expr.c (operand): Handle the "~", "-", and "!" operators applied
to bignums.
* gas/arm/bignum1.s: New test.
* gas/arm/arm.exp: Run it.
Diffstat (limited to 'gas/expr.c')
-rw-r--r-- | gas/expr.c | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -1076,6 +1076,35 @@ operand (expressionS *expressionP) else generic_floating_point_number.sign = 'N'; } + else if (expressionP->X_op == O_big + && expressionP->X_add_number > 0) + { + int i; + + if (c == '~' || c == '-') + { + for (i = 0; i < expressionP->X_add_number; ++i) + generic_bignum[i] = ~generic_bignum[i]; + if (c == '-') + for (i = 0; i < expressionP->X_add_number; ++i) + { + generic_bignum[i] += 1; + if (generic_bignum[i]) + break; + } + } + else if (c == '!') + { + int nonzero = 0; + for (i = 0; i < expressionP->X_add_number; ++i) + { + if (generic_bignum[i]) + nonzero = 1; + generic_bignum[i] = 0; + } + generic_bignum[0] = nonzero; + } + } else if (expressionP->X_op != O_illegal && expressionP->X_op != O_absent) { |