X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=opcodes%2Fhppa-dis.c;h=3658eec331b33228e5628949a6c00d012916f3a7;hb=a4bcd733712abd892aa7fe0d79a3f999b461f119;hp=74d9ece9f8a487fc44ab2ce22733b8490df2378a;hpb=3c853d931322f71b01a217f05bb8302f32a263d2;p=binutils-gdb.git diff --git a/opcodes/hppa-dis.c b/opcodes/hppa-dis.c index 74d9ece9f8a..3658eec331b 100644 --- a/opcodes/hppa-dis.c +++ b/opcodes/hppa-dis.c @@ -1,6 +1,5 @@ /* Disassembler for the PA-RISC. Somewhat derived from sparc-pinsn.c. - Copyright 1989, 1990, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2003, - 2005, 2007 Free Software Foundation, Inc. + Copyright (C) 1989-2018 Free Software Foundation, Inc. Contributed by the Center for Software Science at the University of Utah (pa-gdb-bugs@cs.utah.edu). @@ -23,7 +22,7 @@ MA 02110-1301, USA. */ #include "sysdep.h" -#include "dis-asm.h" +#include "disassemble.h" #include "libhppa.h" #include "opcode/hppa.h" @@ -176,13 +175,13 @@ static const char *const add_compl_names[] = { 0, "", ",l", ",tsv" }; static void fput_reg (unsigned reg, disassemble_info *info) { - (*info->fprintf_func) (info->stream, reg ? reg_names[reg] : "r0"); + (*info->fprintf_func) (info->stream, "%s", reg ? reg_names[reg] : "r0"); } static void fput_fp_reg (unsigned reg, disassemble_info *info) { - (*info->fprintf_func) (info->stream, reg ? fp_reg_names[reg] : "fr0"); + (*info->fprintf_func) (info->stream, "%s", reg ? fp_reg_names[reg] : "fr0"); } static void @@ -199,7 +198,7 @@ fput_fp_reg_r (unsigned reg, disassemble_info *info) static void fput_creg (unsigned reg, disassemble_info *info) { - (*info->fprintf_func) (info->stream, control_reg[reg]); + (*info->fprintf_func) (info->stream, "%s", control_reg[reg]); } /* Print constants with sign. */ @@ -426,7 +425,7 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info) fput_fp_reg (GET_FIELD (insn, 6, 10), info); break; - /* 'fA' will not generate a space before the regsiter + /* 'fA' will not generate a space before the register name. Normally that is fine. Except that it causes problems with xmpyu which has no FP format completer. */ @@ -1104,7 +1103,7 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info) int disp; if (sign) - disp = (-1 << 10) | imm10; + disp = (-1U << 10) | imm10; else disp = imm10; @@ -1120,7 +1119,7 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info) int disp; if (sign) - disp = (-1 << 11) | imm11; + disp = (-1U << 11) | imm11; else disp = imm11;