/* HP PA-RISC SOM object file format: definitions internal to BFD.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
- 2003 Free Software Foundation, Inc.
+ Copyright (C) 1990-2019 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
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
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. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
#ifndef _LIBHPPA_H
#define _LIBHPPA_H
#define HPPA_R_ARG_RELOC(a) \
(((a) >> 22) & 0x3ff)
#define HPPA_R_CONSTANT(a) \
- ((((bfd_signed_vma)(a)) << (BFD_ARCH_SIZE-22)) >> (BFD_ARCH_SIZE-22))
+ ((((bfd_signed_vma) (a) & 0x3fffff) ^ 0x200000) - 0x200000)
#define HPPA_R_ADDEND(r, c) \
(((r) << 22) + ((c) & 0x3fffff))
static inline int
bfd_hppa_insn2fmt (bfd *abfd, int insn)
{
- enum hppa_opcode_type op = get_opcode (insn);
+ enum hppa_opcode_type op = (enum hppa_opcode_type) get_opcode (insn);
switch (op)
{