X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Fcommon%2Fsim-n-endian.h;h=a0f8d2f0daacff7a35740afe75bcdb0b8c1a87b3;hb=ce39bd389039d99458950b072550ab52f0a07a34;hp=c53e05a9a1749f9f13c3f5b102c7f53ba17fa849;hpb=dc9e099fc0eced486ae2b49455c9da113c11f4ff;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/common/sim-n-endian.h b/sim/common/sim-n-endian.h index c53e05a9a1..a0f8d2f0da 100644 --- a/sim/common/sim-n-endian.h +++ b/sim/common/sim-n-endian.h @@ -1,22 +1,23 @@ -/* This file is part of the program psim. +/* The common simulator framework for GDB, the GNU Debugger. - Copyright (C) 1994-1995, Andrew Cagney + Copyright 2002-2016 Free Software Foundation, Inc. - 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. + Contributed by Andrew Cagney and Red Hat. - 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. - - */ + This file is part of GDB. + + 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 3 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, see . */ #ifndef N @@ -43,7 +44,7 @@ INLINE_SIM_ENDIAN\ (unsigned_N) endian_t2h_N(unsigned_N raw_in) { - if (CURRENT_TARGET_BYTE_ORDER == CURRENT_HOST_BYTE_ORDER) { + if (CURRENT_TARGET_BYTE_ORDER == HOST_BYTE_ORDER) { return raw_in; } else { @@ -57,7 +58,7 @@ INLINE_SIM_ENDIAN\ (unsigned_N) endian_h2t_N(unsigned_N raw_in) { - if (CURRENT_TARGET_BYTE_ORDER == CURRENT_HOST_BYTE_ORDER) { + if (CURRENT_TARGET_BYTE_ORDER == HOST_BYTE_ORDER) { return raw_in; } else { @@ -80,7 +81,7 @@ INLINE_SIM_ENDIAN\ (unsigned_N) endian_h2be_N(unsigned_N raw_in) { - if (CURRENT_HOST_BYTE_ORDER == BIG_ENDIAN) { + if (HOST_BYTE_ORDER == BFD_ENDIAN_BIG) { return raw_in; } else { @@ -94,7 +95,7 @@ INLINE_SIM_ENDIAN\ (unsigned_N) endian_be2h_N(unsigned_N raw_in) { - if (CURRENT_HOST_BYTE_ORDER == BIG_ENDIAN) { + if (HOST_BYTE_ORDER == BFD_ENDIAN_BIG) { return raw_in; } else { @@ -108,7 +109,7 @@ INLINE_SIM_ENDIAN\ (unsigned_N) endian_h2le_N(unsigned_N raw_in) { - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) { + if (HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) { return raw_in; } else { @@ -122,7 +123,7 @@ INLINE_SIM_ENDIAN\ (unsigned_N) endian_le2h_N(unsigned_N raw_in) { - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) { + if (HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) { return raw_in; } else { @@ -144,7 +145,7 @@ offset_N (unsigned_N *x, ASSERT (offset + sizeof_word <= sizeof(unsigned_N)); ASSERT (word < (sizeof (unsigned_N) / sizeof_word)); ASSERT ((sizeof (unsigned_N) % sizeof_word) == 0); - if (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) + if (HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) { out = in + sizeof (unsigned_N) - offset - sizeof_word; }