X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=opcodes%2Fhppa-dis.c;h=3c157017167223d969a2f1284e860c588914e03e;hb=4814632e69636177b71b8d091009a0ec614916ec;hp=74d9ece9f8a487fc44ab2ce22733b8490df2378a;hpb=3c853d931322f71b01a217f05bb8302f32a263d2;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/hppa-dis.c b/opcodes/hppa-dis.c index 74d9ece9f8..3c15701716 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-2020 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. */ @@ -290,7 +289,7 @@ extract_14 (unsigned word) static int extract_16 (unsigned word) { - int m15, m0, m1; + unsigned m15, m0, m1; m0 = GET_BIT (word, 16); m1 = GET_BIT (word, 17); @@ -305,7 +304,7 @@ extract_16 (unsigned word) static int extract_21 (unsigned word) { - int val; + unsigned val; word &= MASK_21; word <<= 11; @@ -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. */ @@ -1099,12 +1098,12 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info) case '#': { - int sign = GET_FIELD (insn, 31, 31); - int imm10 = GET_FIELD (insn, 18, 27); - int disp; + unsigned sign = GET_FIELD (insn, 31, 31); + unsigned imm10 = GET_FIELD (insn, 18, 27); + unsigned disp; if (sign) - disp = (-1 << 10) | imm10; + disp = (-1U << 10) | imm10; else disp = imm10; @@ -1115,12 +1114,12 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info) case 'K': case 'd': { - int sign = GET_FIELD (insn, 31, 31); - int imm11 = GET_FIELD (insn, 18, 28); - int disp; + unsigned sign = GET_FIELD (insn, 31, 31); + unsigned imm11 = GET_FIELD (insn, 18, 28); + unsigned disp; if (sign) - disp = (-1 << 11) | imm11; + disp = (-1U << 11) | imm11; else disp = imm11;