Allow both signed and unsigned fields in PowerPC cmpli insn
authorAlan Modra <amodra@gmail.com>
Sat, 7 Jun 2014 02:39:04 +0000 (12:09 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 7 Jun 2014 05:25:11 +0000 (14:55 +0930)
commita47622ac1badbd906c7533ef6011b6bb021271ee
tree3e6ad4e4cb4ed80e652cf756cbbacf4a7a6ae3d1
parentd634c69f87e9b88a5ff5cd8af7a1f60e738ea0bd
Allow both signed and unsigned fields in PowerPC cmpli insn

There are legitimate reasons to allow a signed value in a cmpli insn
field, for example to test for a "stw r1,lock@sdarel(r13)" instruction
in user code, a kernel might use
subis r3,r3,STW_R1_0R13@ha # subtract off high part
cmplwi r3,lock@sdarel # is low part accessing lock?
Since the lock@sdarel may take a range of -32768 to 32767,
the allowed range of cmpli immediate must be at least [-32768,65535].

bfd/
* elf32-ppc.c (ppc_elf_relocate_section): Treat field of cmpli
insn as a bitfield; Use complain_overflow_bitfield.
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
opcodes/
* ppc-opc.c (UISIGNOPT): Define and use with cmpli.
gas/
* config/tc-ppc.c (ppc_insert_operand): Handle PPC_OPERAND_SIGNOPT
on unsigned fields.  Comment on PPC_OPERAND_SIGNOPT signed fields
in 64-bit mode.
gold/
* powerpc.cc (relocate): Treat field of cmpli insn as a bitfield.
bfd/ChangeLog
bfd/elf32-ppc.c
bfd/elf64-ppc.c
gas/ChangeLog
gas/config/tc-ppc.c
gold/ChangeLog
gold/powerpc.cc
opcodes/ChangeLog
opcodes/ppc-opc.c
This page took 0.025783 seconds and 4 git commands to generate.