forked from Imagelibrary/binutils-gdb
2_10-branch'. Sprout from cygnus 2000-02-22 16:18:13 UTC Ian Lance Taylor <ian@airs.com> 'import libiberty from egcs' Cherrypick from master 2000-04-02 08:24:54 UTC Richard Henderson <rth@redhat.com> ' * config/tc-d30v.c (check_range): Allow signed or unsigned 32-bit': ChangeLog Makefile.in bfd/ChangeLog bfd/Makefile.am bfd/Makefile.in bfd/acinclude.m4 bfd/aclocal.m4 bfd/aix386-core.c bfd/aout-adobe.c bfd/aout-arm.c bfd/aout-ns32k.c bfd/aout-target.h bfd/aout-tic30.c bfd/aoutx.h bfd/archive.c bfd/archures.c bfd/armnetbsd.c bfd/bfd-in.h bfd/bfd-in2.h bfd/bfd.c bfd/binary.c bfd/bout.c bfd/cisco-core.c bfd/coff-a29k.c bfd/coff-alpha.c bfd/coff-apollo.c bfd/coff-arm.c bfd/coff-go32.c bfd/coff-h8300.c bfd/coff-h8500.c bfd/coff-i386.c bfd/coff-i860.c bfd/coff-i960.c bfd/coff-m68k.c bfd/coff-m88k.c bfd/coff-mcore.c bfd/coff-mips.c bfd/coff-ppc.c bfd/coff-rs6000.c bfd/coff-sh.c bfd/coff-sparc.c bfd/coff-stgo32.c bfd/coff-tic30.c bfd/coff-tic80.c bfd/coff-w65.c bfd/coff-we32k.c bfd/coff-z8k.c bfd/coffcode.h bfd/coffgen.c bfd/cofflink.c bfd/coffswap.h bfd/config.bfd bfd/config.in bfd/configure bfd/configure.host bfd/configure.in bfd/cpu-arm.c bfd/cpu-avr.c bfd/cpu-d10v.c bfd/cpu-h8500.c bfd/cpu-hppa.c bfd/cpu-i370.c bfd/cpu-m10300.c bfd/cpu-m32r.c bfd/cpu-mcore.c bfd/cpu-ns32k.c bfd/cpu-pj.c bfd/cpu-sh.c bfd/cpu-w65.c bfd/doc/Makefile.in bfd/dwarf1.c bfd/dwarf2.c bfd/ecoff.c bfd/ecofflink.c bfd/elf-bfd.h bfd/elf-hppa.h bfd/elf-m10200.c bfd/elf-m10300.c bfd/elf.c bfd/elf32-arc.c bfd/elf32-arm.h bfd/elf32-avr.c bfd/elf32-d10v.c bfd/elf32-d30v.c bfd/elf32-fr30.c bfd/elf32-gen.c bfd/elf32-hppa.c bfd/elf32-hppa.h bfd/elf32-i370.c bfd/elf32-i386.c bfd/elf32-i860.c bfd/elf32-i960.c bfd/elf32-m32r.c bfd/elf32-m68k.c bfd/elf32-m88k.c bfd/elf32-mcore.c bfd/elf32-mips.c bfd/elf32-pj.c bfd/elf32-ppc.c bfd/elf32-sh.c bfd/elf32-sparc.c bfd/elf32-v850.c bfd/elf64-alpha.c bfd/elf64-gen.c bfd/elf64-mips.c bfd/elf64-sparc.c bfd/elfarm-nabi.c bfd/elfarm-oabi.c bfd/elfcode.h bfd/elflink.c bfd/elflink.h bfd/elfxx-target.h bfd/epoc-pe-arm.c bfd/epoc-pei-arm.c bfd/freebsd.h bfd/hash.c bfd/hosts/alphalinux.h bfd/hp300hpux.c bfd/hppabsd-core.c bfd/hpux-core.c bfd/i386linux.c bfd/i386lynx.c bfd/i386msdos.c bfd/i386os9k.c bfd/ieee.c bfd/ihex.c bfd/irix-core.c bfd/libbfd-in.h bfd/libbfd.c bfd/libbfd.h bfd/libcoff-in.h bfd/libcoff.h bfd/libecoff.h bfd/libhppa.h bfd/libpei.h bfd/linker.c bfd/m68klinux.c bfd/mipsbsd.c bfd/netbsd-core.c bfd/netbsd.h bfd/nlm-target.h bfd/nlm32-ppc.c bfd/nlm32-sparc.c bfd/nlmcode.h bfd/oasys.c bfd/osf-core.c bfd/pc532-mach.c bfd/pe-arm.c bfd/pe-i386.c bfd/pe-mips.c bfd/pe-ppc.c bfd/pe-sh.c bfd/pei-arm.c bfd/pei-i386.c bfd/pei-mcore.c bfd/pei-mips.c bfd/pei-ppc.c bfd/pei-sh.c bfd/peicode.h bfd/peigen.c bfd/po/POTFILES.in bfd/po/bfd.pot bfd/ppcboot.c bfd/ptrace-core.c bfd/reloc.c bfd/reloc16.c bfd/riscix.c bfd/rs6000-core.c bfd/sco5-core.c bfd/section.c bfd/som.c bfd/sparclinux.c bfd/srec.c bfd/stabs.c bfd/sunos.c bfd/syms.c bfd/targets.c bfd/tekhex.c bfd/trad-core.c bfd/versados.c bfd/vms-gsd.c bfd/vms-hdr.c bfd/vms-misc.c bfd/vms-tir.c bfd/vms.c bfd/vms.h bfd/xcofflink.c binutils/ChangeLog binutils/Makefile.am binutils/Makefile.in binutils/NEWS binutils/aclocal.m4 binutils/addr2line.c binutils/ar.1 binutils/ar.c binutils/arparse.y binutils/arsup.c binutils/binutils.texi binutils/config.in binutils/configure binutils/configure.in binutils/debug.c binutils/deflex.l binutils/defparse.y binutils/dlltool.c binutils/dllwrap.c binutils/dyn-string.c binutils/dyn-string.h binutils/filemode.c binutils/ieee.c binutils/nm.c binutils/objcopy.1 binutils/objcopy.c binutils/objdump.c binutils/po/POTFILES.in binutils/po/binutils.pot binutils/prdbg.c binutils/rclex.l binutils/rcparse.y binutils/rdcoff.c binutils/rddbg.c binutils/readelf.c binutils/rename.c binutils/rescoff.c binutils/resrc.c binutils/resres.c binutils/size.c binutils/stabs.c binutils/strings.1 binutils/strings.c binutils/testsuite/ChangeLog binutils/testsuite/binutils-all/hppa/freg.s binutils/testsuite/binutils-all/hppa/objdump.exp binutils/testsuite/binutils-all/objcopy.exp binutils/testsuite/binutils-all/objdump.exp binutils/testsuite/binutils-all/readelf.h binutils/testsuite/binutils-all/readelf.r binutils/testsuite/binutils-all/readelf.s binutils/testsuite/binutils-all/readelf.ss binutils/testsuite/binutils-all/readelf.wi binutils/testsuite/binutils-all/testprog.c binutils/windres.c binutils/windres.h binutils/wrstabs.c config.guess config.sub config/ChangeLog config/mh-i370pic config/mt-aix43 config/mt-i370pic config/mt-wince configure configure.in gas/ChangeLog gas/Makefile.am gas/Makefile.in gas/NEWS gas/aclocal.m4 gas/app.c gas/as.c gas/as.h gas/atof-generic.c gas/cgen.c gas/cond.c gas/config/atof-ieee.c gas/config/atof-vax.c gas/config/e-i386aout.c gas/config/m68k-parse.h gas/config/obj-aout.c gas/config/obj-aout.h gas/config/obj-bout.c gas/config/obj-coff.c gas/config/obj-coff.h gas/config/obj-ecoff.c gas/config/obj-ecoff.h gas/config/obj-elf.c gas/config/obj-elf.h gas/config/obj-evax.h gas/config/obj-multi.h gas/config/obj-som.c gas/config/obj-vms.h gas/config/tc-alpha.c gas/config/tc-alpha.h gas/config/tc-arc.c gas/config/tc-arc.h gas/config/tc-arm.c gas/config/tc-arm.h gas/config/tc-avr.c gas/config/tc-avr.h gas/config/tc-d10v.c gas/config/tc-d10v.h gas/config/tc-d30v.c gas/config/tc-d30v.h gas/config/tc-fr30.c gas/config/tc-h8300.c gas/config/tc-hppa.c gas/config/tc-hppa.h gas/config/tc-i370.c gas/config/tc-i370.h gas/config/tc-i386.c gas/config/tc-i386.h gas/config/tc-i860.c gas/config/tc-i960.c gas/config/tc-i960.h gas/config/tc-m32r.c gas/config/tc-m68k.c gas/config/tc-m68k.h gas/config/tc-m88k.c gas/config/tc-m88k.h gas/config/tc-mcore.c gas/config/tc-mcore.h gas/config/tc-mips.c gas/config/tc-mips.h gas/config/tc-mn10200.c gas/config/tc-mn10300.c gas/config/tc-ns32k.c gas/config/tc-ns32k.h gas/config/tc-pj.c gas/config/tc-pj.h gas/config/tc-ppc.c gas/config/tc-ppc.h gas/config/tc-sh.c gas/config/tc-sh.h gas/config/tc-sparc.c gas/config/tc-sparc.h gas/config/tc-tahoe.c gas/config/tc-tic30.c gas/config/tc-v850.c gas/config/tc-vax.c gas/config/tc-w65.c gas/config/tc-z8k.c gas/config/te-go32.h gas/config/te-interix.h gas/config/te-wince-pe.h gas/configure gas/configure.in gas/dep-in.sed gas/doc/Makefile.am gas/doc/Makefile.in gas/doc/all.texi gas/doc/as.1 gas/doc/as.texinfo gas/doc/c-arm.texi gas/doc/c-i370.texi gas/doc/c-i386.texi gas/doc/c-m32r.texi gas/doc/c-mips.texi gas/doc/c-pj.texi gas/doc/c-sparc.texi gas/doc/internals.texi gas/dwarf2dbg.c gas/dwarf2dbg.h gas/ecoff.c gas/ecoff.h gas/expr.c gas/expr.h gas/frags.c gas/frags.h gas/gasp.c gas/hash.c gas/hash.h gas/input-file.c gas/input-scrub.c gas/itbl-ops.c gas/itbl-ops.h gas/listing.c gas/macro.c gas/macro.h gas/obj.h gas/output-file.c gas/po/POTFILES.in gas/po/gas.pot gas/read.c gas/read.h gas/sb.h gas/stabs.c gas/struc-symbol.h gas/subsegs.c gas/symbols.c gas/symbols.h gas/testsuite/ChangeLog gas/testsuite/gas/all/cond.d gas/testsuite/gas/all/gas.exp gas/testsuite/gas/all/itbl-test.c gas/testsuite/gas/arm/arm7t.d gas/testsuite/gas/arm/arm7t.s gas/testsuite/gas/arm/float.s gas/testsuite/gas/arm/inst.d gas/testsuite/gas/arm/inst.s gas/testsuite/gas/arm/thumb.s gas/testsuite/gas/d10v/d10.exp gas/testsuite/gas/d10v/inst.d gas/testsuite/gas/d10v/inst.s gas/testsuite/gas/elf/elf.exp gas/testsuite/gas/elf/section0.d gas/testsuite/gas/elf/section0.s gas/testsuite/gas/elf/section1.d gas/testsuite/gas/elf/section1.s gas/testsuite/gas/hppa/basic/add.s gas/testsuite/gas/hppa/basic/add2.s gas/testsuite/gas/hppa/basic/addi.s gas/testsuite/gas/hppa/basic/basic.exp gas/testsuite/gas/hppa/basic/branch.s gas/testsuite/gas/hppa/basic/branch2.s gas/testsuite/gas/hppa/basic/comclr.s gas/testsuite/gas/hppa/basic/copr.s gas/testsuite/gas/hppa/basic/coprmem.s gas/testsuite/gas/hppa/basic/dcor.s gas/testsuite/gas/hppa/basic/dcor2.s gas/testsuite/gas/hppa/basic/deposit.s gas/testsuite/gas/hppa/basic/deposit2.s gas/testsuite/gas/hppa/basic/deposit3.s gas/testsuite/gas/hppa/basic/ds.s gas/testsuite/gas/hppa/basic/extract.s gas/testsuite/gas/hppa/basic/extract2.s gas/testsuite/gas/hppa/basic/extract3.s gas/testsuite/gas/hppa/basic/fmem.s gas/testsuite/gas/hppa/basic/fp_comp.s gas/testsuite/gas/hppa/basic/fp_comp2.s gas/testsuite/gas/hppa/basic/fp_conv.s gas/testsuite/gas/hppa/basic/fp_fcmp.s gas/testsuite/gas/hppa/basic/fp_misc.s gas/testsuite/gas/hppa/basic/imem.s gas/testsuite/gas/hppa/basic/immed.s gas/testsuite/gas/hppa/basic/logical.s gas/testsuite/gas/hppa/basic/media.s gas/testsuite/gas/hppa/basic/perf.s gas/testsuite/gas/hppa/basic/purge.s gas/testsuite/gas/hppa/basic/purge2.s gas/testsuite/gas/hppa/basic/sh1add.s gas/testsuite/gas/hppa/basic/sh2add.s gas/testsuite/gas/hppa/basic/sh3add.s gas/testsuite/gas/hppa/basic/shift.s gas/testsuite/gas/hppa/basic/shift2.s gas/testsuite/gas/hppa/basic/shift3.s gas/testsuite/gas/hppa/basic/shladd.s gas/testsuite/gas/hppa/basic/shladd2.s gas/testsuite/gas/hppa/basic/special.s gas/testsuite/gas/hppa/basic/spop.s gas/testsuite/gas/hppa/basic/sub.s gas/testsuite/gas/hppa/basic/sub2.s gas/testsuite/gas/hppa/basic/subi.s gas/testsuite/gas/hppa/basic/system.s gas/testsuite/gas/hppa/basic/system2.s gas/testsuite/gas/hppa/basic/unit.s gas/testsuite/gas/hppa/basic/unit2.s gas/testsuite/gas/hppa/parse/align1.s gas/testsuite/gas/hppa/parse/align2.s gas/testsuite/gas/hppa/parse/badfmpyadd.s gas/testsuite/gas/hppa/parse/block1.s gas/testsuite/gas/hppa/parse/block2.s gas/testsuite/gas/hppa/parse/calldatabug.s gas/testsuite/gas/hppa/parse/callinfobug.s gas/testsuite/gas/hppa/parse/defbug.s gas/testsuite/gas/hppa/parse/entrybug.s gas/testsuite/gas/hppa/parse/exportbug.s gas/testsuite/gas/hppa/parse/exprbug.s gas/testsuite/gas/hppa/parse/fixup7bug.s gas/testsuite/gas/hppa/parse/global.s gas/testsuite/gas/hppa/parse/labelbug.s gas/testsuite/gas/hppa/parse/linesepbug.s gas/testsuite/gas/hppa/parse/lselbug.s gas/testsuite/gas/hppa/parse/parse.exp gas/testsuite/gas/hppa/parse/procbug.s gas/testsuite/gas/hppa/parse/regpopbug.s gas/testsuite/gas/hppa/parse/stdreg.s gas/testsuite/gas/hppa/parse/stringer.s gas/testsuite/gas/hppa/parse/undefbug.s gas/testsuite/gas/hppa/parse/versionbug.s gas/testsuite/gas/hppa/parse/xmpyubug.s gas/testsuite/gas/hppa/reloc/applybug.s gas/testsuite/gas/hppa/reloc/blebug.s gas/testsuite/gas/hppa/reloc/blebug2.s gas/testsuite/gas/hppa/reloc/blebug3.s gas/testsuite/gas/hppa/reloc/exitbug.s gas/testsuite/gas/hppa/reloc/fixupbug.s gas/testsuite/gas/hppa/reloc/funcrelocbug.s gas/testsuite/gas/hppa/reloc/labelopbug.s gas/testsuite/gas/hppa/reloc/longcall.s gas/testsuite/gas/hppa/reloc/picreloc.s gas/testsuite/gas/hppa/reloc/plabelbug.s gas/testsuite/gas/hppa/reloc/r_no_reloc.s gas/testsuite/gas/hppa/reloc/reduce.s gas/testsuite/gas/hppa/reloc/reduce3.s gas/testsuite/gas/hppa/reloc/reloc.exp gas/testsuite/gas/hppa/reloc/roundmode.s gas/testsuite/gas/hppa/reloc/selectorbug.s gas/testsuite/gas/hppa/unsorted/brlenbug.s gas/testsuite/gas/hppa/unsorted/common.s gas/testsuite/gas/hppa/unsorted/fragbug.s gas/testsuite/gas/hppa/unsorted/importbug.s gas/testsuite/gas/hppa/unsorted/labeldiffs.s gas/testsuite/gas/hppa/unsorted/locallabel.s gas/testsuite/gas/hppa/unsorted/unsorted.exp gas/testsuite/gas/i386/amd.d gas/testsuite/gas/i386/amd.s gas/testsuite/gas/i386/float.l gas/testsuite/gas/i386/float.s gas/testsuite/gas/i386/general.l gas/testsuite/gas/i386/general.s gas/testsuite/gas/i386/i386.exp gas/testsuite/gas/i386/intel.d gas/testsuite/gas/i386/intel.s gas/testsuite/gas/i386/jump.d gas/testsuite/gas/i386/jump.s gas/testsuite/gas/i386/jump16.d gas/testsuite/gas/i386/jump16.s gas/testsuite/gas/i386/katmai.d gas/testsuite/gas/i386/katmai.s gas/testsuite/gas/i386/modrm.l gas/testsuite/gas/i386/modrm.s gas/testsuite/gas/i386/naked.d gas/testsuite/gas/i386/naked.s gas/testsuite/gas/i386/opcode.d gas/testsuite/gas/i386/prefix.d gas/testsuite/gas/i386/prefix.s gas/testsuite/gas/i386/reloc.d gas/testsuite/gas/i386/reloc.s gas/testsuite/gas/i386/white.l gas/testsuite/gas/i386/white.s gas/testsuite/gas/ieee-fp/x930509a.exp gas/testsuite/gas/m32r/error.exp gas/testsuite/gas/m32r/fslotx.d gas/testsuite/gas/m32r/fslotx.s gas/testsuite/gas/m32r/interfere.s gas/testsuite/gas/m32r/m32rx.d gas/testsuite/gas/m32r/m32rx.exp gas/testsuite/gas/m32r/m32rx.s gas/testsuite/gas/m32r/relax-2.d gas/testsuite/gas/m32r/relax-2.s gas/testsuite/gas/m32r/wrongsize.s gas/testsuite/gas/macros/irp.d gas/testsuite/gas/macros/irp.s gas/testsuite/gas/macros/rept.d gas/testsuite/gas/macros/rept.s gas/testsuite/gas/macros/test2.d gas/testsuite/gas/macros/test2.s gas/testsuite/gas/macros/test3.d gas/testsuite/gas/macros/test3.s gas/testsuite/gas/mcore/allinsn.d gas/testsuite/gas/mips/e32-rel2.d gas/testsuite/gas/mips/elf-rel.d gas/testsuite/gas/mips/elf-rel.s gas/testsuite/gas/mips/elf-rel2.d gas/testsuite/gas/mips/elf-rel2.s gas/testsuite/gas/mips/elf_e_flags.c gas/testsuite/gas/mips/elf_e_flags.s gas/testsuite/gas/mips/elf_e_flags1.d gas/testsuite/gas/mips/elf_e_flags2.d gas/testsuite/gas/mips/elf_e_flags3.d gas/testsuite/gas/mips/elf_e_flags4.d gas/testsuite/gas/mips/empic.d gas/testsuite/gas/mips/empic.s gas/testsuite/gas/mips/la-svr4pic.d gas/testsuite/gas/mips/la-xgot.d gas/testsuite/gas/mips/la.d gas/testsuite/gas/mips/mips.exp gas/testsuite/gas/mips/mips16-e.d gas/testsuite/gas/mips/mips16-e.s gas/testsuite/gas/mips/mips16-f.d gas/testsuite/gas/mips/mips16-f.s gas/testsuite/gas/mips/sync.d gas/testsuite/gas/mn10300/am33.s gas/testsuite/gas/mn10300/am33_2.s gas/testsuite/gas/mn10300/am33_3.s gas/testsuite/gas/mn10300/am33_4.s gas/testsuite/gas/mn10300/am33_5.s gas/testsuite/gas/mn10300/am33_6.s gas/testsuite/gas/mn10300/am33_7.s gas/testsuite/gas/mn10300/am33_8.s gas/testsuite/gas/mn10300/basic.exp gas/testsuite/gas/pj/ops.d gas/testsuite/gas/pj/ops.s gas/testsuite/gas/pj/pj.exp gas/testsuite/gas/sparc/prefetch.d gas/testsuite/gas/sparc/rdpr.d gas/testsuite/gas/sparc/reloc64.d gas/testsuite/gas/sparc/set64.d gas/testsuite/gas/sparc/set64.s gas/testsuite/gas/sparc/sparc.exp gas/testsuite/gas/sparc/synth64.d gas/testsuite/gas/sparc/synth64.s gas/testsuite/gas/sparc/wrpr.d gas/testsuite/gas/vtable/vtable.exp gas/testsuite/lib/gas-defs.exp gas/write.c gprof/ChangeLog gprof/Makefile.am gprof/Makefile.in gprof/alpha.c gprof/basic_blocks.c gprof/call_graph.c gprof/cg_dfn.c gprof/configure gprof/configure.in gprof/corefile.c gprof/gmon_io.c gprof/gprof.texi gprof/hertz.h gprof/hist.c gprof/i386.c gprof/po/POTFILES.in gprof/po/gprof.pot gprof/sparc.c gprof/sym_ids.c gprof/symtab.c gprof/tahoe.c gprof/utils.c gprof/vax.c include/ChangeLog include/ansidecl.h include/aout/ChangeLog include/aout/aout64.h include/bfdlink.h include/coff/ChangeLog include/coff/arm.h include/coff/internal.h include/coff/mcore.h include/coff/mipspe.h include/coff/pe.h include/coff/sh.h include/dis-asm.h include/elf/ChangeLog include/elf/arm-oabi.h include/elf/arm.h include/elf/avr.h include/elf/common.h include/elf/dwarf.h include/elf/dwarf2.h include/elf/hppa.h include/elf/i370.h include/elf/i386.h include/elf/i960.h include/elf/m32r.h include/elf/m68k.h include/elf/mcore.h include/elf/mips.h include/elf/mn10300.h include/elf/pj.h include/elf/reloc-macros.h include/elf/sh.h include/elf/sparc.h include/hashtab.h include/hp-symtab.h include/opcode/ChangeLog include/opcode/alpha.h include/opcode/cgen.h include/opcode/d10v.h include/opcode/d30v.h include/opcode/hppa.h include/opcode/i370.h include/opcode/i386.h include/opcode/m68k.h include/opcode/mips.h include/opcode/mn10300.h include/opcode/pj.h include/opcode/ppc.h include/partition.h include/remote-sim.h include/sim-d10v.h ld/ChangeLog ld/Makefile.am ld/Makefile.in ld/NEWS ld/aclocal.m4 ld/config.in ld/configure ld/configure.host ld/configure.in ld/configure.tgt ld/deffile.h ld/deffilep.y ld/emulparams/arm_epoc_pe.sh ld/emulparams/armelf.sh ld/emulparams/armelf_linux.sh ld/emulparams/armelf_linux26.sh ld/emulparams/armelf_oabi.sh ld/emulparams/armnbsd.sh ld/emulparams/armpe.sh ld/emulparams/avr1200.sh ld/emulparams/avr23xx.sh ld/emulparams/avr4433.sh ld/emulparams/avr44x4.sh ld/emulparams/avr85xx.sh ld/emulparams/avrmega103.sh ld/emulparams/avrmega161.sh ld/emulparams/avrmega603.sh ld/emulparams/d10velf.sh ld/emulparams/elf32_i960.sh ld/emulparams/elf32bmipn32.sh ld/emulparams/elf32i370.sh ld/emulparams/elf32mcore.sh ld/emulparams/elf32ppc.sh ld/emulparams/elf32ppclinux.sh ld/emulparams/elf64_sparc.sh ld/emulparams/elf64bmip.sh ld/emulparams/elf64hppa.sh ld/emulparams/i386pe.sh ld/emulparams/i386pe_posix.sh ld/emulparams/mcorepe.sh ld/emulparams/mipspe.sh ld/emulparams/pjelf.sh ld/emulparams/pjlelf.sh ld/emulparams/ppcpe.sh ld/emulparams/shpe.sh ld/emultempl/aix.em ld/emultempl/armcoff.em ld/emultempl/armelf.em ld/emultempl/armelf_oabi.em ld/emultempl/astring.sed ld/emultempl/beos.em ld/emultempl/elf32.em ld/emultempl/generic.em ld/emultempl/gld960.em ld/emultempl/gld960c.em ld/emultempl/hppaelf.em ld/emultempl/linux.em ld/emultempl/lnk960.em ld/emultempl/mipsecoff.em ld/emultempl/ostring.sed ld/emultempl/pe.em ld/emultempl/sunos.em ld/emultempl/vanilla.em ld/genscripts.sh ld/ld.h ld/ld.texinfo ld/ldcref.c ld/ldemul.c ld/ldemul.h ld/ldexp.c ld/ldfile.c ld/ldfile.h ld/ldgram.y ld/ldlang.c ld/ldlang.h ld/ldmain.c ld/ldmisc.c ld/lexsup.c ld/mri.c ld/pe-dll.c ld/pe-dll.h ld/po/POTFILES.in ld/po/ld.pot ld/scripttempl/armcoff.sc ld/scripttempl/elf.sc ld/scripttempl/elf32avr.sc ld/scripttempl/elfd10v.sc ld/scripttempl/elfi370.sc ld/scripttempl/epocpe.sc ld/scripttempl/i386go32.sc ld/scripttempl/mcorepe.sc ld/scripttempl/pe.sc ld/scripttempl/pj.sc ld/scripttempl/v850.sc ld/testsuite/ChangeLog ld/testsuite/ld-cdtest/cdtest-foo.cc ld/testsuite/ld-cdtest/cdtest-main.cc ld/testsuite/ld-checks/asm.s ld/testsuite/ld-checks/checks.exp ld/testsuite/ld-elfvers/vers.exp ld/testsuite/ld-elfvers/vers1.c ld/testsuite/ld-elfvers/vers15.c ld/testsuite/ld-elfvers/vers17.c ld/testsuite/ld-elfvers/vers17.dsym ld/testsuite/ld-elfvers/vers17.map ld/testsuite/ld-elfvers/vers17.ver ld/testsuite/ld-elfvers/vers18.c ld/testsuite/ld-elfvers/vers18.dsym ld/testsuite/ld-elfvers/vers18.map ld/testsuite/ld-elfvers/vers18.sym ld/testsuite/ld-elfvers/vers18.ver ld/testsuite/ld-elfvers/vers19.c ld/testsuite/ld-elfvers/vers19.dsym ld/testsuite/ld-elfvers/vers19.ver ld/testsuite/ld-elfvers/vers2.c ld/testsuite/ld-elfvers/vers3.c ld/testsuite/ld-elfvers/vers4.c ld/testsuite/ld-elfvers/vers6.c ld/testsuite/ld-elfvers/vers7.c ld/testsuite/ld-elfvers/vers9.c ld/testsuite/ld-scripts/phdrs.exp ld/testsuite/ld-scripts/phdrs.t ld/testsuite/ld-scripts/script.exp ld/testsuite/ld-scripts/weak.exp ld/testsuite/ld-selective/selective.exp ld/testsuite/ld-shared/main.c ld/testsuite/ld-shared/sh1.c ld/testsuite/ld-shared/shared.exp ld/testsuite/ld-srec/sr3.cc ld/testsuite/ld-srec/srec.exp ld/testsuite/ld-undefined/undefined.exp ld/testsuite/lib/ld-lib.exp libiberty/ChangeLog libiberty/Makefile.in libiberty/argv.c libiberty/choose-temp.c libiberty/config.in libiberty/configure libiberty/configure.in libiberty/cplus-dem.c libiberty/floatformat.c libiberty/getruntime.c libiberty/hashtab.c libiberty/partition.c libiberty/pexecute.c libiberty/splay-tree.c libiberty/vasprintf.c libiberty/xmalloc.c ltconfig ltmain.sh mkdep opcodes/ChangeLog opcodes/Makefile.am opcodes/Makefile.in opcodes/aclocal.m4 opcodes/alpha-dis.c opcodes/alpha-opc.c opcodes/arm-dis.c opcodes/arm-opc.h opcodes/avr-dis.c opcodes/cgen-opc.c opcodes/configure opcodes/configure.in opcodes/d10v-opc.c opcodes/d30v-dis.c opcodes/d30v-opc.c opcodes/dis-buf.c opcodes/disassemble.c opcodes/fr30-asm.c opcodes/fr30-desc.h opcodes/fr30-dis.c opcodes/fr30-ibld.c opcodes/fr30-opc.c opcodes/hppa-dis.c opcodes/i370-dis.c opcodes/i370-opc.c opcodes/i386-dis.c opcodes/m10300-dis.c opcodes/m10300-opc.c opcodes/m32r-asm.c opcodes/m32r-desc.c opcodes/m32r-desc.h opcodes/m32r-dis.c opcodes/m32r-ibld.c opcodes/m32r-opc.c opcodes/m32r-opc.h opcodes/m32r-opinst.c opcodes/m68k-dis.c opcodes/m68k-opc.c opcodes/mcore-dis.c opcodes/mcore-opc.h opcodes/mips-dis.c opcodes/mips-opc.c opcodes/pj-dis.c opcodes/pj-opc.c opcodes/po/POTFILES.in opcodes/po/opcodes.pot opcodes/ppc-opc.c opcodes/sh-dis.c opcodes/sh-opc.h opcodes/sparc-dis.c opcodes/sparc-opc.c opcodes/tic30-dis.c texinfo/texinfo.tex Delete: bfd/configure.bat bfd/makefile.dos binutils/configure.bat config/mh-aix43 configure.bat gas/config/go32.cfg gas/config/te-multi.h gas/configure.bat gprof/configure.bat include/wait.h intl/ChangeLog.Cygnus ld/configure.bat ld/emulparams/go32.sh ld/emultempl/stringify.sed ld/scripttempl/go32coff.sc ld/testsuite/ld-selective/5.cc libiberty/configure.bat libiberty/makefile.dos makeall.bat opcodes/configure.bat
1113 lines
29 KiB
C
1113 lines
29 KiB
C
/* Disassembler for the PA-RISC. Somewhat derived from sparc-pinsn.c.
|
|
Copyright 1989, 1990, 1992, 1993 Free Software Foundation, Inc.
|
|
|
|
Contributed by the Center for Software Science at the
|
|
University of Utah (pa-gdb-bugs@cs.utah.edu).
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|
|
|
#include <ansidecl.h>
|
|
#include "sysdep.h"
|
|
#include "dis-asm.h"
|
|
#include "libhppa.h"
|
|
#include "opcode/hppa.h"
|
|
|
|
/* Integer register names, indexed by the numbers which appear in the
|
|
opcodes. */
|
|
static const char *const reg_names[] =
|
|
{"flags", "r1", "rp", "r3", "r4", "r5", "r6", "r7", "r8", "r9",
|
|
"r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19",
|
|
"r20", "r21", "r22", "r23", "r24", "r25", "r26", "dp", "ret0", "ret1",
|
|
"sp", "r31"};
|
|
|
|
/* Floating point register names, indexed by the numbers which appear in the
|
|
opcodes. */
|
|
static const char *const fp_reg_names[] =
|
|
{"fpsr", "fpe2", "fpe4", "fpe6",
|
|
"fr4", "fr5", "fr6", "fr7", "fr8",
|
|
"fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15",
|
|
"fr16", "fr17", "fr18", "fr19", "fr20", "fr21", "fr22", "fr23",
|
|
"fr24", "fr25", "fr26", "fr27", "fr28", "fr29", "fr30", "fr31"};
|
|
|
|
typedef unsigned int CORE_ADDR;
|
|
|
|
/* Get at various relevent fields of an instruction word. */
|
|
|
|
#define MASK_5 0x1f
|
|
#define MASK_10 0x3ff
|
|
#define MASK_11 0x7ff
|
|
#define MASK_14 0x3fff
|
|
#define MASK_21 0x1fffff
|
|
|
|
/* This macro gets bit fields using HP's numbering (MSB = 0) */
|
|
|
|
#define GET_FIELD(X, FROM, TO) \
|
|
((X) >> (31 - (TO)) & ((1 << ((TO) - (FROM) + 1)) - 1))
|
|
|
|
/* Some of these have been converted to 2-d arrays because they
|
|
consume less storage this way. If the maintenance becomes a
|
|
problem, convert them back to const 1-d pointer arrays. */
|
|
static const char *const control_reg[] = {
|
|
"rctr", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7",
|
|
"pidr1", "pidr2", "ccr", "sar", "pidr3", "pidr4",
|
|
"iva", "eiem", "itmr", "pcsq", "pcoq", "iir", "isr",
|
|
"ior", "ipsw", "eirr", "tr0", "tr1", "tr2", "tr3",
|
|
"tr4", "tr5", "tr6", "tr7"
|
|
};
|
|
|
|
static const char *const compare_cond_names[] = {
|
|
"", ",=", ",<", ",<=", ",<<", ",<<=", ",sv", ",od",
|
|
",tr", ",<>", ",>=", ",>", ",>>=", ",>>", ",nsv", ",ev"
|
|
};
|
|
static const char *const compare_cond_64_names[] = {
|
|
"", ",*=", ",*<", ",*<=", ",*<<", ",*<<=", ",*sv", ",*od",
|
|
",*tr", ",*<>", ",*>=", ",*>", ",*>>=", ",*>>", ",*nsv", ",*ev"
|
|
};
|
|
static const char *const cmpib_cond_64_names[] = {
|
|
",*<<", ",*=", ",*<", ",*<=", ",*>>=", ",*<>", ",*>=", ",*>"
|
|
};
|
|
static const char *const add_cond_names[] = {
|
|
"", ",=", ",<", ",<=", ",nuv", ",znv", ",sv", ",od",
|
|
",tr", ",<>", ",>=", ",>", ",uv", ",vnz", ",nsv", ",ev"
|
|
};
|
|
static const char *const add_cond_64_names[] = {
|
|
"", ",*=", ",*<", ",*<=", ",*nuv", ",*znv", ",*sv", ",*od",
|
|
",*tr", ",*<>", ",*>=", ",*>", ",*uv", ",*vnz", ",*nsv", ",*ev"
|
|
};
|
|
static const char *const wide_add_cond_names[] = {
|
|
"", ",=", ",<", ",<=", ",nuv", ",*=", ",*<", ",*<=",
|
|
",tr", ",<>", ",>=", ",>", ",uv", ",*<>", ",*>=", ",*>"
|
|
};
|
|
static const char *const logical_cond_names[] = {
|
|
"", ",=", ",<", ",<=", 0, 0, 0, ",od",
|
|
",tr", ",<>", ",>=", ",>", 0, 0, 0, ",ev"};
|
|
static const char *const logical_cond_64_names[] = {
|
|
"", ",*=", ",*<", ",*<=", 0, 0, 0, ",*od",
|
|
",*tr", ",*<>", ",*>=", ",*>", 0, 0, 0, ",*ev"};
|
|
static const char *const unit_cond_names[] = {
|
|
"", ",swz", ",sbz", ",shz", ",sdc", ",swc", ",sbc", ",shc",
|
|
",tr", ",nwz", ",nbz", ",nhz", ",ndc", ",nwc", ",nbc", ",nhc"
|
|
};
|
|
static const char *const unit_cond_64_names[] = {
|
|
"", ",*swz", ",*sbz", ",*shz", ",*sdc", ",*swc", ",*sbc", ",*shc",
|
|
",*tr", ",*nwz", ",*nbz", ",*nhz", ",*ndc", ",*nwc", ",*nbc", ",*nhc"
|
|
};
|
|
static const char *const shift_cond_names[] = {
|
|
"", ",=", ",<", ",od", ",tr", ",<>", ",>=", ",ev"
|
|
};
|
|
static const char *const shift_cond_64_names[] = {
|
|
"", ",*=", ",*<", ",*od", ",*tr", ",*<>", ",*>=", ",*ev"
|
|
};
|
|
static const char *const bb_cond_64_names[] = {
|
|
",*<", ",*>="
|
|
};
|
|
static const char *const index_compl_names[] = {"", ",m", ",s", ",sm"};
|
|
static const char *const short_ldst_compl_names[] = {"", ",ma", "", ",mb"};
|
|
static const char *const short_bytes_compl_names[] = {
|
|
"", ",b,m", ",e", ",e,m"
|
|
};
|
|
static const char *const float_format_names[] = {",sgl", ",dbl", "", ",quad"};
|
|
static const char *const float_comp_names[] =
|
|
{
|
|
",false?", ",false", ",?", ",!<=>", ",=", ",=t", ",?=", ",!<>",
|
|
",!?>=", ",<", ",?<", ",!>=", ",!?>", ",<=", ",?<=", ",!>",
|
|
",!?<=", ",>", ",?>", ",!<=", ",!?<", ",>=", ",?>=", ",!<",
|
|
",!?=", ",<>", ",!=", ",!=t", ",!?", ",<=>", ",true?", ",true"
|
|
};
|
|
static const char *const signed_unsigned_names[] = {",u", ",s"};
|
|
static const char *const mix_half_names[] = {",l", ",r"};
|
|
static const char *const saturation_names[] = {",us", ",ss", 0, ""};
|
|
static const char *const read_write_names[] = {",r", ",w"};
|
|
static const char *const add_compl_names[] = { 0, "", ",l", ",tsv" };
|
|
|
|
/* For a bunch of different instructions form an index into a
|
|
completer name table. */
|
|
#define GET_COMPL(insn) (GET_FIELD (insn, 26, 26) | \
|
|
GET_FIELD (insn, 18, 18) << 1)
|
|
|
|
#define GET_COND(insn) (GET_FIELD ((insn), 16, 18) + \
|
|
(GET_FIELD ((insn), 19, 19) ? 8 : 0))
|
|
|
|
/* Utility function to print registers. Put these first, so gcc's function
|
|
inlining can do its stuff. */
|
|
|
|
#define fputs_filtered(STR,F) (*info->fprintf_func) (info->stream, "%s", STR)
|
|
|
|
static void
|
|
fput_reg (reg, info)
|
|
unsigned reg;
|
|
disassemble_info *info;
|
|
{
|
|
(*info->fprintf_func) (info->stream, reg ? reg_names[reg] : "r0");
|
|
}
|
|
|
|
static void
|
|
fput_fp_reg (reg, info)
|
|
unsigned reg;
|
|
disassemble_info *info;
|
|
{
|
|
(*info->fprintf_func) (info->stream, reg ? fp_reg_names[reg] : "fr0");
|
|
}
|
|
|
|
static void
|
|
fput_fp_reg_r (reg, info)
|
|
unsigned reg;
|
|
disassemble_info *info;
|
|
{
|
|
/* Special case floating point exception registers. */
|
|
if (reg < 4)
|
|
(*info->fprintf_func) (info->stream, "fpe%d", reg * 2 + 1);
|
|
else
|
|
(*info->fprintf_func) (info->stream, "%sR", reg ? fp_reg_names[reg]
|
|
: "fr0");
|
|
}
|
|
|
|
static void
|
|
fput_creg (reg, info)
|
|
unsigned reg;
|
|
disassemble_info *info;
|
|
{
|
|
(*info->fprintf_func) (info->stream, control_reg[reg]);
|
|
}
|
|
|
|
/* print constants with sign */
|
|
|
|
static void
|
|
fput_const (num, info)
|
|
unsigned num;
|
|
disassemble_info *info;
|
|
{
|
|
if ((int)num < 0)
|
|
(*info->fprintf_func) (info->stream, "-%x", -(int)num);
|
|
else
|
|
(*info->fprintf_func) (info->stream, "%x", num);
|
|
}
|
|
|
|
/* Routines to extract various sized constants out of hppa
|
|
instructions. */
|
|
|
|
/* extract a 3-bit space register number from a be, ble, mtsp or mfsp */
|
|
static int
|
|
extract_3 (word)
|
|
unsigned word;
|
|
{
|
|
return GET_FIELD (word, 18, 18) << 2 | GET_FIELD (word, 16, 17);
|
|
}
|
|
|
|
static int
|
|
extract_5_load (word)
|
|
unsigned word;
|
|
{
|
|
return low_sign_extend (word >> 16 & MASK_5, 5);
|
|
}
|
|
|
|
/* extract the immediate field from a st{bhw}s instruction */
|
|
static int
|
|
extract_5_store (word)
|
|
unsigned word;
|
|
{
|
|
return low_sign_extend (word & MASK_5, 5);
|
|
}
|
|
|
|
/* extract the immediate field from a break instruction */
|
|
static unsigned
|
|
extract_5r_store (word)
|
|
unsigned word;
|
|
{
|
|
return (word & MASK_5);
|
|
}
|
|
|
|
/* extract the immediate field from a {sr}sm instruction */
|
|
static unsigned
|
|
extract_5R_store (word)
|
|
unsigned word;
|
|
{
|
|
return (word >> 16 & MASK_5);
|
|
}
|
|
|
|
/* extract the 10 bit immediate field from a {sr}sm instruction */
|
|
static unsigned
|
|
extract_10U_store (word)
|
|
unsigned word;
|
|
{
|
|
return (word >> 16 & MASK_10);
|
|
}
|
|
|
|
/* extract the immediate field from a bb instruction */
|
|
static unsigned
|
|
extract_5Q_store (word)
|
|
unsigned word;
|
|
{
|
|
return (word >> 21 & MASK_5);
|
|
}
|
|
|
|
/* extract an 11 bit immediate field */
|
|
static int
|
|
extract_11 (word)
|
|
unsigned word;
|
|
{
|
|
return low_sign_extend (word & MASK_11, 11);
|
|
}
|
|
|
|
/* extract a 14 bit immediate field */
|
|
static int
|
|
extract_14 (word)
|
|
unsigned word;
|
|
{
|
|
return low_sign_extend (word & MASK_14, 14);
|
|
}
|
|
|
|
/* extract a 21 bit constant */
|
|
|
|
static int
|
|
extract_21 (word)
|
|
unsigned word;
|
|
{
|
|
int val;
|
|
|
|
word &= MASK_21;
|
|
word <<= 11;
|
|
val = GET_FIELD (word, 20, 20);
|
|
val <<= 11;
|
|
val |= GET_FIELD (word, 9, 19);
|
|
val <<= 2;
|
|
val |= GET_FIELD (word, 5, 6);
|
|
val <<= 5;
|
|
val |= GET_FIELD (word, 0, 4);
|
|
val <<= 2;
|
|
val |= GET_FIELD (word, 7, 8);
|
|
return sign_extend (val, 21) << 11;
|
|
}
|
|
|
|
/* extract a 12 bit constant from branch instructions */
|
|
|
|
static int
|
|
extract_12 (word)
|
|
unsigned word;
|
|
{
|
|
return sign_extend (GET_FIELD (word, 19, 28) |
|
|
GET_FIELD (word, 29, 29) << 10 |
|
|
(word & 0x1) << 11, 12) << 2;
|
|
}
|
|
|
|
/* extract a 17 bit constant from branch instructions, returning the
|
|
19 bit signed value. */
|
|
|
|
static int
|
|
extract_17 (word)
|
|
unsigned word;
|
|
{
|
|
return sign_extend (GET_FIELD (word, 19, 28) |
|
|
GET_FIELD (word, 29, 29) << 10 |
|
|
GET_FIELD (word, 11, 15) << 11 |
|
|
(word & 0x1) << 16, 17) << 2;
|
|
}
|
|
|
|
static int
|
|
extract_22 (word)
|
|
unsigned word;
|
|
{
|
|
return sign_extend (GET_FIELD (word, 19, 28) |
|
|
GET_FIELD (word, 29, 29) << 10 |
|
|
GET_FIELD (word, 11, 15) << 11 |
|
|
GET_FIELD (word, 6, 10) << 16 |
|
|
(word & 0x1) << 21, 22) << 2;
|
|
}
|
|
|
|
/* Print one instruction. */
|
|
int
|
|
print_insn_hppa (memaddr, info)
|
|
bfd_vma memaddr;
|
|
disassemble_info *info;
|
|
{
|
|
bfd_byte buffer[4];
|
|
unsigned int insn, i;
|
|
|
|
{
|
|
int status =
|
|
(*info->read_memory_func) (memaddr, buffer, sizeof (buffer), info);
|
|
if (status != 0)
|
|
{
|
|
(*info->memory_error_func) (status, memaddr, info);
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
insn = bfd_getb32 (buffer);
|
|
|
|
for (i = 0; i < NUMOPCODES; ++i)
|
|
{
|
|
const struct pa_opcode *opcode = &pa_opcodes[i];
|
|
if ((insn & opcode->mask) == opcode->match)
|
|
{
|
|
register const char *s;
|
|
|
|
(*info->fprintf_func) (info->stream, "%s", opcode->name);
|
|
|
|
if (!strchr ("cfCY?-+nHNZFIuv", opcode->args[0]))
|
|
(*info->fprintf_func) (info->stream, " ");
|
|
for (s = opcode->args; *s != '\0'; ++s)
|
|
{
|
|
switch (*s)
|
|
{
|
|
case 'x':
|
|
fput_reg (GET_FIELD (insn, 11, 15), info);
|
|
break;
|
|
case 'a':
|
|
case 'b':
|
|
fput_reg (GET_FIELD (insn, 6, 10), info);
|
|
break;
|
|
case '^':
|
|
fput_creg (GET_FIELD (insn, 6, 10), info);
|
|
break;
|
|
case 't':
|
|
fput_reg (GET_FIELD (insn, 27, 31), info);
|
|
break;
|
|
|
|
/* Handle floating point registers. */
|
|
case 'f':
|
|
switch (*++s)
|
|
{
|
|
case 't':
|
|
fput_fp_reg (GET_FIELD (insn, 27, 31), info);
|
|
break;
|
|
case 'T':
|
|
if (GET_FIELD (insn, 25, 25))
|
|
fput_fp_reg_r (GET_FIELD (insn, 27, 31), info);
|
|
else
|
|
fput_fp_reg (GET_FIELD (insn, 27, 31), info);
|
|
break;
|
|
case 'a':
|
|
if (GET_FIELD (insn, 25, 25))
|
|
fput_fp_reg_r (GET_FIELD (insn, 6, 10), info);
|
|
else
|
|
fput_fp_reg (GET_FIELD (insn, 6, 10), info);
|
|
break;
|
|
|
|
/* 'fA' will not generate a space before the regsiter
|
|
name. Normally that is fine. Except that it
|
|
causes problems with xmpyu which has no FP format
|
|
completer. */
|
|
case 'X':
|
|
fputs_filtered (" ", info);
|
|
|
|
/* FALLTHRU */
|
|
|
|
case 'A':
|
|
if (GET_FIELD (insn, 24, 24))
|
|
fput_fp_reg_r (GET_FIELD (insn, 6, 10), info);
|
|
else
|
|
fput_fp_reg (GET_FIELD (insn, 6, 10), info);
|
|
|
|
break;
|
|
case 'b':
|
|
if (GET_FIELD (insn, 25, 25))
|
|
fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
|
|
else
|
|
fput_fp_reg (GET_FIELD (insn, 11, 15), info);
|
|
break;
|
|
case 'B':
|
|
if (GET_FIELD (insn, 19, 19))
|
|
fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
|
|
else
|
|
fput_fp_reg (GET_FIELD (insn, 11, 15), info);
|
|
break;
|
|
case 'C':
|
|
{
|
|
int reg = GET_FIELD (insn, 21, 22);
|
|
reg |= GET_FIELD (insn, 16, 18) << 2;
|
|
if (GET_FIELD (insn, 23, 23) != 0)
|
|
fput_fp_reg_r (reg, info);
|
|
else
|
|
fput_fp_reg (reg, info);
|
|
break;
|
|
}
|
|
case 'i':
|
|
{
|
|
int reg = GET_FIELD (insn, 6, 10);
|
|
|
|
reg |= (GET_FIELD (insn, 26, 26) << 4);
|
|
fput_fp_reg (reg, info);
|
|
break;
|
|
}
|
|
case 'j':
|
|
{
|
|
int reg = GET_FIELD (insn, 11, 15);
|
|
|
|
reg |= (GET_FIELD (insn, 26, 26) << 4);
|
|
fput_fp_reg (reg, info);
|
|
break;
|
|
}
|
|
case 'k':
|
|
{
|
|
int reg = GET_FIELD (insn, 27, 31);
|
|
|
|
reg |= (GET_FIELD (insn, 26, 26) << 4);
|
|
fput_fp_reg (reg, info);
|
|
break;
|
|
}
|
|
case 'l':
|
|
{
|
|
int reg = GET_FIELD (insn, 21, 25);
|
|
|
|
reg |= (GET_FIELD (insn, 26, 26) << 4);
|
|
fput_fp_reg (reg, info);
|
|
break;
|
|
}
|
|
case 'm':
|
|
{
|
|
int reg = GET_FIELD (insn, 16, 20);
|
|
|
|
reg |= (GET_FIELD (insn, 26, 26) << 4);
|
|
fput_fp_reg (reg, info);
|
|
break;
|
|
}
|
|
case 'e':
|
|
if (GET_FIELD (insn, 25, 25))
|
|
fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
|
|
else
|
|
fput_fp_reg (GET_FIELD (insn, 11, 15), info);
|
|
break;
|
|
|
|
}
|
|
break;
|
|
|
|
case '5':
|
|
fput_const (extract_5_load (insn), info);
|
|
break;
|
|
case 's':
|
|
(*info->fprintf_func) (info->stream,
|
|
"sr%d", GET_FIELD (insn, 16, 17));
|
|
break;
|
|
|
|
case 'S':
|
|
(*info->fprintf_func) (info->stream, "sr%d", extract_3 (insn));
|
|
break;
|
|
|
|
/* Handle completers. */
|
|
case 'c':
|
|
switch (*++s)
|
|
{
|
|
case 'x':
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
index_compl_names[GET_COMPL (insn)]);
|
|
break;
|
|
case 'm':
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
short_ldst_compl_names[GET_COMPL (insn)]);
|
|
break;
|
|
case 's':
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
short_bytes_compl_names[GET_COMPL (insn)]);
|
|
break;
|
|
case 'c':
|
|
case 'C':
|
|
switch (GET_FIELD (insn, 20, 21))
|
|
{
|
|
case 1:
|
|
(*info->fprintf_func) (info->stream, ",bc ");
|
|
break;
|
|
case 2:
|
|
(*info->fprintf_func) (info->stream, ",sl ");
|
|
break;
|
|
default:
|
|
(*info->fprintf_func) (info->stream, " ");
|
|
}
|
|
break;
|
|
case 'd':
|
|
switch (GET_FIELD (insn, 20, 21))
|
|
{
|
|
case 1:
|
|
(*info->fprintf_func) (info->stream, ",co ");
|
|
break;
|
|
default:
|
|
(*info->fprintf_func) (info->stream, " ");
|
|
}
|
|
break;
|
|
case 'o':
|
|
(*info->fprintf_func) (info->stream, ",o");
|
|
break;
|
|
case 'g':
|
|
(*info->fprintf_func) (info->stream, ",gate");
|
|
break;
|
|
case 'p':
|
|
(*info->fprintf_func) (info->stream, ",l,push");
|
|
break;
|
|
case 'P':
|
|
(*info->fprintf_func) (info->stream, ",pop");
|
|
break;
|
|
case 'l':
|
|
case 'L':
|
|
(*info->fprintf_func) (info->stream, ",l");
|
|
break;
|
|
case 'w':
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
read_write_names[GET_FIELD (insn, 25, 25)]);
|
|
break;
|
|
case 'W':
|
|
(*info->fprintf_func) (info->stream, ",w");
|
|
break;
|
|
case 'r':
|
|
if (GET_FIELD (insn, 23, 26) == 5)
|
|
(*info->fprintf_func) (info->stream, ",r");
|
|
break;
|
|
case 'Z':
|
|
if (GET_FIELD (insn, 26, 26))
|
|
(*info->fprintf_func) (info->stream, ",m ");
|
|
else
|
|
(*info->fprintf_func) (info->stream, " ");
|
|
break;
|
|
case 'i':
|
|
if (GET_FIELD (insn, 25, 25))
|
|
(*info->fprintf_func) (info->stream, ",i");
|
|
break;
|
|
case 'z':
|
|
if (!GET_FIELD (insn, 21, 21))
|
|
(*info->fprintf_func) (info->stream, ",z");
|
|
break;
|
|
case 'a':
|
|
(*info->fprintf_func)
|
|
(info->stream, "%s", add_compl_names[GET_FIELD
|
|
(insn, 20, 21)]);
|
|
break;
|
|
case 'Y':
|
|
(*info->fprintf_func)
|
|
(info->stream, ",dc%s", add_compl_names[GET_FIELD
|
|
(insn, 20, 21)]);
|
|
break;
|
|
case 'y':
|
|
(*info->fprintf_func)
|
|
(info->stream, ",c%s", add_compl_names[GET_FIELD
|
|
(insn, 20, 21)]);
|
|
break;
|
|
case 'v':
|
|
if (GET_FIELD (insn, 20, 20))
|
|
(*info->fprintf_func) (info->stream, ",tsv");
|
|
break;
|
|
case 't':
|
|
(*info->fprintf_func) (info->stream, ",tc");
|
|
if (GET_FIELD (insn, 20, 20))
|
|
(*info->fprintf_func) (info->stream, ",tsv");
|
|
break;
|
|
case 'B':
|
|
(*info->fprintf_func) (info->stream, ",db");
|
|
if (GET_FIELD (insn, 20, 20))
|
|
(*info->fprintf_func) (info->stream, ",tsv");
|
|
break;
|
|
case 'b':
|
|
(*info->fprintf_func) (info->stream, ",b");
|
|
if (GET_FIELD (insn, 20, 20))
|
|
(*info->fprintf_func) (info->stream, ",tsv");
|
|
break;
|
|
case 'T':
|
|
if (GET_FIELD (insn, 25, 25))
|
|
(*info->fprintf_func) (info->stream, ",tc");
|
|
break;
|
|
case 'S':
|
|
/* EXTRD/W has a following condition. */
|
|
if (*(s + 1) == '?')
|
|
(*info->fprintf_func)
|
|
(info->stream, "%s", signed_unsigned_names[GET_FIELD
|
|
(insn, 21, 21)]);
|
|
else
|
|
(*info->fprintf_func)
|
|
(info->stream, "%s ", signed_unsigned_names[GET_FIELD
|
|
(insn, 21, 21)]);
|
|
break;
|
|
case 'h':
|
|
(*info->fprintf_func)
|
|
(info->stream, "%s", mix_half_names[GET_FIELD
|
|
(insn, 17, 17)]);
|
|
break;
|
|
case 'H':
|
|
(*info->fprintf_func)
|
|
(info->stream, "%s", saturation_names[GET_FIELD
|
|
(insn, 24, 25)]);
|
|
break;
|
|
case '*':
|
|
(*info->fprintf_func)
|
|
(info->stream, ",%d%d%d%d ",
|
|
GET_FIELD (insn, 17, 18), GET_FIELD (insn, 20, 21),
|
|
GET_FIELD (insn, 22, 23), GET_FIELD (insn, 24, 25));
|
|
break;
|
|
|
|
case 'q':
|
|
{
|
|
int m, a;
|
|
|
|
m = GET_FIELD (insn, 28, 28);
|
|
a = GET_FIELD (insn, 29, 29);
|
|
|
|
if (m && !a)
|
|
fputs_filtered (",ma ", info);
|
|
else if (m && a)
|
|
fputs_filtered (",mb ", info);
|
|
else
|
|
fputs_filtered (" ", info);
|
|
break;
|
|
}
|
|
|
|
case 'J':
|
|
{
|
|
int opcode = GET_FIELD (insn, 0, 5);
|
|
|
|
if (opcode == 0x16 || opcode == 0x1e)
|
|
{
|
|
if (GET_FIELD (insn, 29, 29) == 0)
|
|
fputs_filtered (",ma ", info);
|
|
else
|
|
fputs_filtered (",mb ", info);
|
|
}
|
|
else
|
|
fputs_filtered (" ", info);
|
|
break;
|
|
}
|
|
|
|
case 'e':
|
|
{
|
|
int opcode = GET_FIELD (insn, 0, 5);
|
|
|
|
if (opcode == 0x13 || opcode == 0x1b)
|
|
{
|
|
if (GET_FIELD (insn, 18, 18) == 1)
|
|
fputs_filtered (",mb ", info);
|
|
else
|
|
fputs_filtered (",ma ", info);
|
|
}
|
|
else if (opcode == 0x17 || opcode == 0x1f)
|
|
{
|
|
if (GET_FIELD (insn, 31, 31) == 1)
|
|
fputs_filtered (",ma ", info);
|
|
else
|
|
fputs_filtered (",mb ", info);
|
|
}
|
|
else
|
|
fputs_filtered (" ", info);
|
|
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
|
|
/* Handle conditions. */
|
|
case '?':
|
|
{
|
|
s++;
|
|
switch (*s)
|
|
{
|
|
case 'f':
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
float_comp_names[GET_FIELD
|
|
(insn, 27, 31)]);
|
|
break;
|
|
|
|
/* these four conditions are for the set of instructions
|
|
which distinguish true/false conditions by opcode
|
|
rather than by the 'f' bit (sigh): comb, comib,
|
|
addb, addib */
|
|
case 't':
|
|
fputs_filtered (compare_cond_names[GET_FIELD (insn, 16, 18)],
|
|
info);
|
|
break;
|
|
case 'n':
|
|
fputs_filtered (compare_cond_names[GET_FIELD (insn, 16, 18)
|
|
+ GET_FIELD (insn, 4, 4) * 8], info);
|
|
break;
|
|
case 'N':
|
|
fputs_filtered (compare_cond_64_names[GET_FIELD (insn, 16, 18)
|
|
+ GET_FIELD (insn, 2, 2) * 8], info);
|
|
break;
|
|
case 'Q':
|
|
fputs_filtered (cmpib_cond_64_names[GET_FIELD (insn, 16, 18)],
|
|
info);
|
|
break;
|
|
case '@':
|
|
fputs_filtered (add_cond_names[GET_FIELD (insn, 16, 18)
|
|
+ GET_FIELD (insn, 4, 4) * 8], info);
|
|
break;
|
|
case 's':
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
compare_cond_names[GET_COND (insn)]);
|
|
break;
|
|
case 'S':
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
compare_cond_64_names[GET_COND (insn)]);
|
|
break;
|
|
case 'a':
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
add_cond_names[GET_COND (insn)]);
|
|
break;
|
|
case 'A':
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
add_cond_64_names[GET_COND (insn)]);
|
|
break;
|
|
case 'd':
|
|
(*info->fprintf_func) (info->stream, "%s",
|
|
add_cond_names[GET_FIELD (insn, 16, 18)]);
|
|
break;
|
|
|
|
case 'W':
|
|
(*info->fprintf_func)
|
|
(info->stream, "%s",
|
|
wide_add_cond_names[GET_FIELD (insn, 16, 18) +
|
|
GET_FIELD (insn, 4, 4) * 8]);
|
|
break;
|
|
|
|
case 'l':
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
logical_cond_names[GET_COND (insn)]);
|
|
break;
|
|
case 'L':
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
logical_cond_64_names[GET_COND (insn)]);
|
|
break;
|
|
case 'u':
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
unit_cond_names[GET_COND (insn)]);
|
|
break;
|
|
case 'U':
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
unit_cond_64_names[GET_COND (insn)]);
|
|
break;
|
|
case 'y':
|
|
case 'x':
|
|
case 'b':
|
|
(*info->fprintf_func)
|
|
(info->stream, "%s",
|
|
shift_cond_names[GET_FIELD (insn, 16, 18)]);
|
|
|
|
/* If the next character in args is 'n', it will handle
|
|
putting out the space. */
|
|
if (s[1] != 'n')
|
|
(*info->fprintf_func) (info->stream, " ");
|
|
break;
|
|
case 'X':
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
shift_cond_64_names[GET_FIELD (insn, 16, 18)]);
|
|
break;
|
|
case 'B':
|
|
(*info->fprintf_func)
|
|
(info->stream, "%s",
|
|
bb_cond_64_names[GET_FIELD (insn, 16, 16)]);
|
|
|
|
/* If the next character in args is 'n', it will handle
|
|
putting out the space. */
|
|
if (s[1] != 'n')
|
|
(*info->fprintf_func) (info->stream, " ");
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
|
|
case 'V':
|
|
fput_const (extract_5_store (insn), info);
|
|
break;
|
|
case 'r':
|
|
fput_const (extract_5r_store (insn), info);
|
|
break;
|
|
case 'R':
|
|
fput_const (extract_5R_store (insn), info);
|
|
break;
|
|
case 'U':
|
|
fput_const (extract_10U_store (insn), info);
|
|
break;
|
|
case 'B':
|
|
case 'Q':
|
|
fput_const (extract_5Q_store (insn), info);
|
|
break;
|
|
case 'i':
|
|
fput_const (extract_11 (insn), info);
|
|
break;
|
|
case 'j':
|
|
fput_const (extract_14 (insn), info);
|
|
break;
|
|
case 'k':
|
|
fput_const (extract_21 (insn), info);
|
|
break;
|
|
case 'n':
|
|
if (insn & 0x2)
|
|
(*info->fprintf_func) (info->stream, ",n ");
|
|
else
|
|
(*info->fprintf_func) (info->stream, " ");
|
|
break;
|
|
case 'N':
|
|
if ((insn & 0x20) && s[1])
|
|
(*info->fprintf_func) (info->stream, ",n ");
|
|
else if (insn & 0x20)
|
|
(*info->fprintf_func) (info->stream, ",n");
|
|
else if (s[1])
|
|
(*info->fprintf_func) (info->stream, " ");
|
|
break;
|
|
case 'w':
|
|
(*info->print_address_func) (memaddr + 8 + extract_12 (insn),
|
|
info);
|
|
break;
|
|
case 'W':
|
|
/* 17 bit PC-relative branch. */
|
|
(*info->print_address_func) ((memaddr + 8
|
|
+ extract_17 (insn)),
|
|
info);
|
|
break;
|
|
case 'z':
|
|
/* 17 bit displacement. This is an offset from a register
|
|
so it gets disasssembled as just a number, not any sort
|
|
of address. */
|
|
fput_const (extract_17 (insn), info);
|
|
break;
|
|
|
|
case 'Z':
|
|
/* addil %r1 implicit output. */
|
|
(*info->fprintf_func) (info->stream, "%%r1");
|
|
break;
|
|
|
|
case 'Y':
|
|
/* be,l %sr0,%r31 implicit output. */
|
|
(*info->fprintf_func) (info->stream, "%%sr0,%%r31");
|
|
break;
|
|
|
|
case '@':
|
|
(*info->fprintf_func) (info->stream, "0");
|
|
break;
|
|
|
|
case '.':
|
|
(*info->fprintf_func) (info->stream, "%d",
|
|
GET_FIELD (insn, 24, 25));
|
|
break;
|
|
case '*':
|
|
(*info->fprintf_func) (info->stream, "%d",
|
|
GET_FIELD (insn, 22, 25));
|
|
break;
|
|
case '!':
|
|
(*info->fprintf_func) (info->stream, "%%sar");
|
|
break;
|
|
case 'p':
|
|
(*info->fprintf_func) (info->stream, "%d",
|
|
31 - GET_FIELD (insn, 22, 26));
|
|
break;
|
|
case '~':
|
|
{
|
|
int num;
|
|
num = GET_FIELD (insn, 20, 20) << 5;
|
|
num |= GET_FIELD (insn, 22, 26);
|
|
(*info->fprintf_func) (info->stream, "%d", 63 - num);
|
|
break;
|
|
}
|
|
case 'P':
|
|
(*info->fprintf_func) (info->stream, "%d",
|
|
GET_FIELD (insn, 22, 26));
|
|
break;
|
|
case 'q':
|
|
{
|
|
int num;
|
|
num = GET_FIELD (insn, 20, 20) << 5;
|
|
num |= GET_FIELD (insn, 22, 26);
|
|
(*info->fprintf_func) (info->stream, "%d", num);
|
|
break;
|
|
}
|
|
case 'T':
|
|
(*info->fprintf_func) (info->stream, "%d",
|
|
32 - GET_FIELD (insn, 27, 31));
|
|
break;
|
|
case '%':
|
|
{
|
|
int num;
|
|
num = (GET_FIELD (insn, 23, 23) + 1) * 32;
|
|
num -= GET_FIELD (insn, 27, 31);
|
|
(*info->fprintf_func) (info->stream, "%d", num);
|
|
break;
|
|
}
|
|
case '|':
|
|
{
|
|
int num;
|
|
num = (GET_FIELD (insn, 19, 19) + 1) * 32;
|
|
num -= GET_FIELD (insn, 27, 31);
|
|
(*info->fprintf_func) (info->stream, "%d", num);
|
|
break;
|
|
}
|
|
case '$':
|
|
fput_const (GET_FIELD (insn, 20, 28), info);
|
|
break;
|
|
case 'A':
|
|
fput_const (GET_FIELD (insn, 6, 18), info);
|
|
break;
|
|
case 'D':
|
|
fput_const (GET_FIELD (insn, 6, 31), info);
|
|
break;
|
|
case 'v':
|
|
(*info->fprintf_func) (info->stream, ",%d", GET_FIELD (insn, 23, 25));
|
|
break;
|
|
case 'O':
|
|
fput_const ((GET_FIELD (insn, 6,20) << 5 |
|
|
GET_FIELD (insn, 27, 31)), info);
|
|
break;
|
|
case 'o':
|
|
fput_const (GET_FIELD (insn, 6, 20), info);
|
|
break;
|
|
case '2':
|
|
fput_const ((GET_FIELD (insn, 6, 22) << 5 |
|
|
GET_FIELD (insn, 27, 31)), info);
|
|
break;
|
|
case '1':
|
|
fput_const ((GET_FIELD (insn, 11, 20) << 5 |
|
|
GET_FIELD (insn, 27, 31)), info);
|
|
break;
|
|
case '0':
|
|
fput_const ((GET_FIELD (insn, 16, 20) << 5 |
|
|
GET_FIELD (insn, 27, 31)), info);
|
|
break;
|
|
case 'u':
|
|
(*info->fprintf_func) (info->stream, ",%d", GET_FIELD (insn, 23, 25));
|
|
break;
|
|
case 'F':
|
|
/* if no destination completer and not before a completer
|
|
for fcmp, need a space here */
|
|
if (s[1] == 'G' || s[1] == '?')
|
|
fputs_filtered (float_format_names[GET_FIELD (insn, 19, 20)],
|
|
info);
|
|
else
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
float_format_names[GET_FIELD
|
|
(insn, 19, 20)]);
|
|
break;
|
|
case 'G':
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
float_format_names[GET_FIELD (insn,
|
|
17, 18)]);
|
|
break;
|
|
case 'H':
|
|
if (GET_FIELD (insn, 26, 26) == 1)
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
float_format_names[0]);
|
|
else
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
float_format_names[1]);
|
|
break;
|
|
case 'I':
|
|
/* if no destination completer and not before a completer
|
|
for fcmp, need a space here */
|
|
if (s[1] == '?')
|
|
fputs_filtered (float_format_names[GET_FIELD (insn, 20, 20)],
|
|
info);
|
|
else
|
|
(*info->fprintf_func) (info->stream, "%s ",
|
|
float_format_names[GET_FIELD
|
|
(insn, 20, 20)]);
|
|
break;
|
|
|
|
case 'J':
|
|
fput_const (extract_14 (insn), info);
|
|
break;
|
|
|
|
case '#':
|
|
{
|
|
int sign = GET_FIELD (insn, 31, 31);
|
|
int imm10 = GET_FIELD (insn, 18, 27);
|
|
int disp;
|
|
|
|
if (sign)
|
|
disp = (-1 << 10) | imm10;
|
|
else
|
|
disp = imm10;
|
|
|
|
disp <<= 3;
|
|
fput_const (disp, info);
|
|
break;
|
|
}
|
|
case 'K':
|
|
case 'd':
|
|
{
|
|
int sign = GET_FIELD (insn, 31, 31);
|
|
int imm11 = GET_FIELD (insn, 18, 28);
|
|
int disp;
|
|
|
|
if (sign)
|
|
disp = (-1 << 11) | imm11;
|
|
else
|
|
disp = imm11;
|
|
|
|
disp <<= 2;
|
|
fput_const (disp, info);
|
|
break;
|
|
}
|
|
|
|
/* ?!? FIXME */
|
|
case '_':
|
|
case '{':
|
|
fputs_filtered ("Disassembler botch.\n", info);
|
|
break;
|
|
|
|
case 'm':
|
|
{
|
|
int y = GET_FIELD (insn, 16, 18);
|
|
|
|
if (y != 1)
|
|
fput_const ((y ^ 1) - 1, info);
|
|
}
|
|
break;
|
|
|
|
case 'h':
|
|
{
|
|
int cbit;
|
|
|
|
cbit = GET_FIELD (insn, 16, 18);
|
|
|
|
if (cbit > 0)
|
|
(*info->fprintf_func) (info->stream, ",%d", cbit - 1);
|
|
break;
|
|
}
|
|
|
|
case '=':
|
|
{
|
|
int cond = GET_FIELD (insn, 27, 31);
|
|
|
|
if (cond == 0)
|
|
fputs_filtered (" ", info);
|
|
else if (cond == 1)
|
|
fputs_filtered ("acc ", info);
|
|
else if (cond == 2)
|
|
fputs_filtered ("rej ", info);
|
|
else if (cond == 5)
|
|
fputs_filtered ("acc8 ", info);
|
|
else if (cond == 6)
|
|
fputs_filtered ("rej8 ", info);
|
|
else if (cond == 9)
|
|
fputs_filtered ("acc6 ", info);
|
|
else if (cond == 13)
|
|
fputs_filtered ("acc4 ", info);
|
|
else if (cond == 17)
|
|
fputs_filtered ("acc2 ", info);
|
|
break;
|
|
}
|
|
|
|
case 'X':
|
|
(*info->print_address_func) ((memaddr + 8
|
|
+ extract_22 (insn)),
|
|
info);
|
|
break;
|
|
case 'L':
|
|
fputs_filtered (",%r2", info);
|
|
break;
|
|
default:
|
|
(*info->fprintf_func) (info->stream, "%c", *s);
|
|
break;
|
|
}
|
|
}
|
|
return sizeof(insn);
|
|
}
|
|
}
|
|
(*info->fprintf_func) (info->stream, "#%8x", insn);
|
|
return sizeof(insn);
|
|
}
|