aboutsummaryrefslogtreecommitdiff
path: root/sim/moxie/interp.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-04-12 09:02:46 +0930
committerAlan Modra <amodra@gmail.com>2021-04-12 11:57:03 +0930
commit32d715691aa037f2838b41fa257c2e239d67c134 (patch)
tree15950d786cf30650203914068f191717acacae46 /sim/moxie/interp.c
parentfc304b889106f6d1bd720e969b95615992bf1961 (diff)
downloadgdb-32d715691aa037f2838b41fa257c2e239d67c134.zip
gdb-32d715691aa037f2838b41fa257c2e239d67c134.tar.gz
gdb-32d715691aa037f2838b41fa257c2e239d67c134.tar.bz2
Power10 bignum operands
When built on a 32-bit host without --enable-64-bit-bfd, powerpc-linux and other 32-bit powerpc targeted binutils fail to assemble some power10 prefixed instructions with 34-bit fields. A typical error seen when running the testsuite is .../gas/testsuite/gas/ppc/prefix-pcrel.s:10: Error: bignum invalid In practice this doesn't matter for addresses: 32-bit programs don't need or use the top 2 bits of a d34 field when calculating addresses. However it may matter when loading or adding 64-bit constants with paddi. A power10 processor in 32-bit mode still has 64-bit wide GPRs. So this patch enables limited support for O_big PowerPC operands, and corrects sign extension of 32-bit constants using X_extrabit. * config/tc-ppc.c (insn_validate): Use uint64_t for operand values. (md_assemble): Likewise. Handle bignum operands. (ppc_elf_suffix): Handle O_big. Remove unnecessary input_line_pointer check. * expr.c: Delete unnecessary forward declarations. (generic_bignum_to_int32): Return uint32_t. (generic_bignum_to_int64): Return uint64_t. Compile always. (operand): Twiddle X_extrabit for unary '~'. Set X_unsigned and clear X_extrabit for unary '!'. * expr.h (generic_bignum_to_int32): Declare. (generic_bignum_to_int64): Declare. * testsuite/gas/ppc/prefix-pcrel.s, * testsuite/gas/ppc/prefix-pcrel.d: Add more instructions.
Diffstat (limited to 'sim/moxie/interp.c')
0 files changed, 0 insertions, 0 deletions