ubsan: m10300: shift exponent -4
[deliverable/binutils-gdb.git] / sim / ppc / sim-endian.c
index 8edf7a36fcbba1c4bddbccc3c054e35b831d2785..1ffa2d7e4eb7de84d0dedb010580fb6cec644ac5 100644 (file)
@@ -4,7 +4,7 @@
 
     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,
@@ -13,8 +13,7 @@
     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.
+    along with this program; if not, see <http://www.gnu.org/licenses/>.
  
     */
 
 #ifndef _SIM_ENDIAN_C_
 #define _SIM_ENDIAN_C_
 
-#ifndef STATIC_INLINE_ENDIAN
-#define STATIC_INLINE_ENDIAN STATIC_INLINE
-#endif
-
-
 #include "config.h"
 #include "basics.h"
 
@@ -35,7 +29,7 @@
 #define _SWAP_1(SET,RAW) SET (RAW)
 #endif
 
-#if !defined(_SWAP_2) && (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) && WITH_NTOH
+#if !defined(_SWAP_2) && (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) && defined(htons)
 #define _SWAP_2(SET,RAW) SET htons (RAW)
 #endif
 
@@ -43,7 +37,7 @@
 #define _SWAP_2(SET,RAW) SET (((RAW) >> 8) | ((RAW) << 8))
 #endif
 
-#if !defined(_SWAP_4) && (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) && WITH_NTOH
+#if !defined(_SWAP_4) && (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) && defined(htonl)
 #define _SWAP_4(SET,RAW) SET htonl (RAW)
 #endif
 
   SET out.dword;
 #endif
 
-#undef N
 #define N 1
 #include "sim-endian-n.h"
-
 #undef N
+
 #define N 2
 #include "sim-endian-n.h"
-
 #undef N
+
 #define N 4
 #include "sim-endian-n.h"
-
 #undef N
+
 #define N 8
 #include "sim-endian-n.h"
+#undef N
 
 #endif /* _SIM_ENDIAN_C_ */
This page took 0.025529 seconds and 4 git commands to generate.