public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH/committed 1/4] sim: ppc: sync WITH_TARGET_{ADDRESS,CELL}_BITSIZE with common/
@ 2024-01-03  7:19 Mike Frysinger
  2024-01-03  7:19 ` [PATCH/committed 2/4] sim: ppc: rename local ALU SIGNED64 macros Mike Frysinger
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mike Frysinger @ 2024-01-03  7:19 UTC (permalink / raw)
  To: gdb-patches

This will make it easier to share common/ code that rely on these
additional defines.
---
 sim/ppc/std-config.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sim/ppc/std-config.h b/sim/ppc/std-config.h
index d317826ba1d4..de68cf261816 100644
--- a/sim/ppc/std-config.h
+++ b/sim/ppc/std-config.h
@@ -90,6 +90,14 @@ extern enum bfd_endian current_target_byte_order;
 #define WITH_TARGET_WORD_BITSIZE        32 /* compiled only */
 #endif
 
+#ifndef WITH_TARGET_ADDRESS_BITSIZE
+#define WITH_TARGET_ADDRESS_BITSIZE	WITH_TARGET_WORD_BITSIZE
+#endif
+
+#ifndef WITH_TARGET_CELL_BITSIZE
+#define WITH_TARGET_CELL_BITSIZE	WITH_TARGET_WORD_BITSIZE
+#endif
+
 
 /* Program environment:
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH/committed 2/4] sim: ppc: rename local ALU SIGNED64 macros
  2024-01-03  7:19 [PATCH/committed 1/4] sim: ppc: sync WITH_TARGET_{ADDRESS,CELL}_BITSIZE with common/ Mike Frysinger
@ 2024-01-03  7:19 ` Mike Frysinger
  2024-01-03  7:19 ` [PATCH/committed 3/4] sim: common: include sim-types.h in the endian header directly Mike Frysinger
  2024-01-03  7:19 ` [PATCH/committed 4/4] sim: ppc: switch to common endian code Mike Frysinger
  2 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2024-01-03  7:19 UTC (permalink / raw)
  To: gdb-patches

The common/ code has macros with the same name but different behavior:
it's for declaring integer constants as 64-bit, not for casting them.
Rename ppc's local variant since it's only used in this file in order
to avoid conflicts.
---
 sim/ppc/idecode_expression.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sim/ppc/idecode_expression.h b/sim/ppc/idecode_expression.h
index 9c4cb7a55a98..86b33945b77c 100644
--- a/sim/ppc/idecode_expression.h
+++ b/sim/ppc/idecode_expression.h
@@ -57,8 +57,8 @@
 
 
 /* Macro's to type cast 32bit constants to 64bits */
-#define SIGNED64(val)   ((int64_t)(int32_t)(val))
-#define UNSIGNED64(val) ((uint64_t)(uint32_t)(val))
+#define ALU_SIGNED64(val)   ((int64_t)(int32_t)(val))
+#define ALU_UNSIGNED64(val) ((uint64_t)(uint32_t)(val))
 
 
 /* Start a section of ALU code */
@@ -134,14 +134,14 @@ do { \
 #if (WITH_TARGET_WORD_BITSIZE == 64)
 #define ALU_ADD(val) \
 do { \
-  uint64_t alu_lo = (UNSIGNED64(alu_val) \
-		       + UNSIGNED64(val)); \
+  uint64_t alu_lo = (ALU_UNSIGNED64(alu_val) \
+		       + ALU_UNSIGNED64(val)); \
   signed alu_carry = ((alu_lo & BIT(31)) != 0); \
   alu_carry_val = (alu_carry_val \
-		   + UNSIGNED64(EXTRACTED(val, 0, 31)) \
+		   + ALU_UNSIGNED64(EXTRACTED(val, 0, 31)) \
 		   + alu_carry); \
   alu_overflow_val = (alu_overflow_val \
-		      + SIGNED64(EXTRACTED(val, 0, 31)) \
+		      + ALU_SIGNED64(EXTRACTED(val, 0, 31)) \
 		      + alu_carry); \
   alu_val = alu_val + val; \
 } while (0)
-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH/committed 3/4] sim: common: include sim-types.h in the endian header directly
  2024-01-03  7:19 [PATCH/committed 1/4] sim: ppc: sync WITH_TARGET_{ADDRESS,CELL}_BITSIZE with common/ Mike Frysinger
  2024-01-03  7:19 ` [PATCH/committed 2/4] sim: ppc: rename local ALU SIGNED64 macros Mike Frysinger
@ 2024-01-03  7:19 ` Mike Frysinger
  2024-01-03  7:19 ` [PATCH/committed 4/4] sim: ppc: switch to common endian code Mike Frysinger
  2 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2024-01-03  7:19 UTC (permalink / raw)
  To: gdb-patches

This is a bit redundant for most ports as they go through sim-basics.h
which always includes sim-types.h before including sim-endian.h, but in
order to unify ppc's sim-endian code, we need this include here.  Plus,
it's the directly we generally want to go to get away from one header
that defines all APIs and causes hard to untangle dependencies.
---
 sim/common/sim-endian.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sim/common/sim-endian.h b/sim/common/sim-endian.h
index 589169ea11cf..93a6d0d8c13a 100644
--- a/sim/common/sim-endian.h
+++ b/sim/common/sim-endian.h
@@ -23,6 +23,8 @@
 #ifndef SIM_ENDIAN_H
 #define SIM_ENDIAN_H
 
+#include "sim-types.h"
+
 /* C byte conversion functions */
 
 INLINE_SIM_ENDIAN(unsigned_1) endian_h2t_1(unsigned_1 x);
-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH/committed 4/4] sim: ppc: switch to common endian code
  2024-01-03  7:19 [PATCH/committed 1/4] sim: ppc: sync WITH_TARGET_{ADDRESS,CELL}_BITSIZE with common/ Mike Frysinger
  2024-01-03  7:19 ` [PATCH/committed 2/4] sim: ppc: rename local ALU SIGNED64 macros Mike Frysinger
  2024-01-03  7:19 ` [PATCH/committed 3/4] sim: common: include sim-types.h in the endian header directly Mike Frysinger
@ 2024-01-03  7:19 ` Mike Frysinger
  2 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2024-01-03  7:19 UTC (permalink / raw)
  To: gdb-patches

The common sim-endian is a forked & updated version of the ppc code.
Fortunately, they didn't diverge from the basic APIs, so they are
still compatible, which means we can just delete the ppc version now
that the build env is merged at the top-level.
---
 sim/Makefile.in        |   2 -
 sim/ppc/local.mk       |   4 -
 sim/ppc/sim-endian-n.h | 133 ------------------------
 sim/ppc/sim-endian.c   |  76 --------------
 sim/ppc/sim-endian.h   | 225 -----------------------------------------
 5 files changed, 440 deletions(-)
 delete mode 100644 sim/ppc/sim-endian-n.h
 delete mode 100644 sim/ppc/sim-endian.c
 delete mode 100644 sim/ppc/sim-endian.h

diff --git a/sim/ppc/local.mk b/sim/ppc/local.mk
index 01cc1251a89b..f6da1c213385 100644
--- a/sim/ppc/local.mk
+++ b/sim/ppc/local.mk
@@ -67,10 +67,6 @@ AM_CPPFLAGS_%C%_options.o = '-DOPCODE_RULES="$(IGEN_OPCODE_RULES)"' '-DIGEN_FLAG
 
 noinst_LIBRARIES += %D%/libsim.a
 
-## common/sim-endian.c is matched before ppc/sim-endian.c due to the pattern
-## rule below.  Force the ppc version until we can unify the two properly.
-%D%/sim-endian.o: $(srcdir)/%D%/sim-endian.c ; $(SIM_COMPILE)
-
 %D%/%.o: common/%.c ; $(SIM_COMPILE)
 -@am__include@ %D%/$(DEPDIR)/*.Po
 
diff --git a/sim/ppc/sim-endian-n.h b/sim/ppc/sim-endian-n.h
deleted file mode 100644
index a9b2e2078234..000000000000
--- a/sim/ppc/sim-endian-n.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*  This file is part of the program psim.
-
-    Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
-
-    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 <http://www.gnu.org/licenses/>.
- 
-    */
-
-
-#ifndef N
-#error "N must be #defined"
-#endif
-
-/* NOTE: See end of file for #undef */
-#define unsigned_N XCONCAT2(unsigned_,N)
-#define endian_t2h_N XCONCAT2(endian_t2h_,N)
-#define endian_h2t_N XCONCAT2(endian_h2t_,N)
-#define _SWAP_N XCONCAT2(_SWAP_,N)
-#define swap_N XCONCAT2(swap_,N)
-#define endian_h2be_N XCONCAT2(endian_h2be_,N)
-#define endian_be2h_N XCONCAT2(endian_be2h_,N)
-#define endian_h2le_N XCONCAT2(endian_h2le_,N)
-#define endian_le2h_N XCONCAT2(endian_le2h_,N)
-
-
-INLINE_PSIM_ENDIAN\
-(unsigned_N)
-endian_t2h_N(unsigned_N raw_in)
-{
-  if (CURRENT_TARGET_BYTE_ORDER == HOST_BYTE_ORDER) {
-    return raw_in;
-  }
-  else {
-    _SWAP_N(return,raw_in);
-  }
-}
-
-
-INLINE_PSIM_ENDIAN\
-(unsigned_N)
-endian_h2t_N(unsigned_N raw_in)
-{
-  if (CURRENT_TARGET_BYTE_ORDER == HOST_BYTE_ORDER) {
-    return raw_in;
-  }
-  else {
-    _SWAP_N(return,raw_in);
-  }
-}
-
-
-INLINE_PSIM_ENDIAN\
-(unsigned_N)
-swap_N(unsigned_N raw_in)
-{
-  _SWAP_N(return,raw_in);
-}
-
-
-
-INLINE_PSIM_ENDIAN\
-(unsigned_N)
-endian_h2be_N(unsigned_N raw_in)
-{
-  if (HOST_BYTE_ORDER == BFD_ENDIAN_BIG) {
-    return raw_in;
-  }
-  else {
-    _SWAP_N(return,raw_in);
-  }
-}
-
-
-INLINE_PSIM_ENDIAN\
-(unsigned_N)
-endian_be2h_N(unsigned_N raw_in)
-{
-  if (HOST_BYTE_ORDER == BFD_ENDIAN_BIG) {
-    return raw_in;
-  }
-  else {
-    _SWAP_N(return,raw_in);
-  }
-}
-
-
-INLINE_PSIM_ENDIAN\
-(unsigned_N)
-endian_h2le_N(unsigned_N raw_in)
-{
-  if (HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) {
-    return raw_in;
-  }
-  else {
-    _SWAP_N(return,raw_in);
-  }
-}
-
-
-INLINE_PSIM_ENDIAN\
-(unsigned_N)
-endian_le2h_N(unsigned_N raw_in)
-{
-  if (HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) {
-    return raw_in;
-  }
-  else {
-    _SWAP_N(return,raw_in);
-  }
-}
-
-
-/* NOTE: See start of file for #define */
-#undef unsigned_N
-#undef endian_t2h_N
-#undef endian_h2t_N
-#undef _SWAP_N
-#undef swap_N
-#undef endian_h2be_N
-#undef endian_be2h_N
-#undef endian_h2le_N
-#undef endian_le2h_N
diff --git a/sim/ppc/sim-endian.c b/sim/ppc/sim-endian.c
deleted file mode 100644
index ee1e0839939b..000000000000
--- a/sim/ppc/sim-endian.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*  This file is part of the program psim.
-
-    Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
-
-    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 <http://www.gnu.org/licenses/>.
- 
-    */
-
-
-#ifndef _SIM_ENDIAN_C_
-#define _SIM_ENDIAN_C_
-
-/* This must come before any other includes.  */
-#include "defs.h"
-
-#include "basics.h"
-#include "symcat.h"
-
-
-#if !defined(_SWAP_1)
-#define _SWAP_1(SET,RAW) SET (RAW)
-#endif
-
-#if !defined(_SWAP_2) && (HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) && defined(htons)
-#define _SWAP_2(SET,RAW) SET htons (RAW)
-#endif
-
-#ifndef	_SWAP_2
-#define _SWAP_2(SET,RAW) SET (((RAW) >> 8) | ((RAW) << 8))
-#endif
-
-#if !defined(_SWAP_4) && (HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) && defined(htonl)
-#define _SWAP_4(SET,RAW) SET htonl (RAW)
-#endif
-
-#ifndef _SWAP_4
-#define	_SWAP_4(SET,RAW) SET (((RAW) << 24) | (((RAW) & 0xff00) << 8) | (((RAW) & 0xff0000) >> 8) | ((RAW) >> 24))
-#endif
-
-#ifndef _SWAP_8
-#define _SWAP_8(SET,RAW) \
-  union { unsigned_8 dword; unsigned_4 words[2]; } in, out; \
-  in.dword = RAW; \
-  _SWAP_4 (out.words[0] =, in.words[1]); \
-  _SWAP_4 (out.words[1] =, in.words[0]); \
-  SET out.dword;
-#endif
-
-#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_ */
diff --git a/sim/ppc/sim-endian.h b/sim/ppc/sim-endian.h
deleted file mode 100644
index e07457212874..000000000000
--- a/sim/ppc/sim-endian.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/*  This file is part of the program psim.
-
-    Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
-
-    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 <http://www.gnu.org/licenses/>.
- 
-    */
-
-
-#ifndef _SIM_ENDIAN_H_
-#define _SIM_ENDIAN_H_
-
-
-/* C byte conversion functions */
-
-INLINE_PSIM_ENDIAN(unsigned_1) endian_h2t_1(unsigned_1 x);
-INLINE_PSIM_ENDIAN(unsigned_2) endian_h2t_2(unsigned_2 x);
-INLINE_PSIM_ENDIAN(unsigned_4) endian_h2t_4(unsigned_4 x);
-INLINE_PSIM_ENDIAN(unsigned_8) endian_h2t_8(unsigned_8 x);
-
-INLINE_PSIM_ENDIAN(unsigned_1) endian_t2h_1(unsigned_1 x);
-INLINE_PSIM_ENDIAN(unsigned_2) endian_t2h_2(unsigned_2 x);
-INLINE_PSIM_ENDIAN(unsigned_4) endian_t2h_4(unsigned_4 x);
-INLINE_PSIM_ENDIAN(unsigned_8) endian_t2h_8(unsigned_8 x);
-
-INLINE_PSIM_ENDIAN(unsigned_1) swap_1(unsigned_1 x);
-INLINE_PSIM_ENDIAN(unsigned_2) swap_2(unsigned_2 x);
-INLINE_PSIM_ENDIAN(unsigned_4) swap_4(unsigned_4 x);
-INLINE_PSIM_ENDIAN(unsigned_8) swap_8(unsigned_8 x);
-
-INLINE_PSIM_ENDIAN(unsigned_1) endian_h2be_1(unsigned_1 x);
-INLINE_PSIM_ENDIAN(unsigned_2) endian_h2be_2(unsigned_2 x);
-INLINE_PSIM_ENDIAN(unsigned_4) endian_h2be_4(unsigned_4 x);
-INLINE_PSIM_ENDIAN(unsigned_8) endian_h2be_8(unsigned_8 x);
-
-INLINE_PSIM_ENDIAN(unsigned_1) endian_be2h_1(unsigned_1 x);
-INLINE_PSIM_ENDIAN(unsigned_2) endian_be2h_2(unsigned_2 x);
-INLINE_PSIM_ENDIAN(unsigned_4) endian_be2h_4(unsigned_4 x);
-INLINE_PSIM_ENDIAN(unsigned_8) endian_be2h_8(unsigned_8 x);
-
-INLINE_PSIM_ENDIAN(unsigned_1) endian_h2le_1(unsigned_1 x);
-INLINE_PSIM_ENDIAN(unsigned_2) endian_h2le_2(unsigned_2 x);
-INLINE_PSIM_ENDIAN(unsigned_4) endian_h2le_4(unsigned_4 x);
-INLINE_PSIM_ENDIAN(unsigned_8) endian_h2le_8(unsigned_8 x);
-
-INLINE_PSIM_ENDIAN(unsigned_1) endian_le2h_1(unsigned_1 x);
-INLINE_PSIM_ENDIAN(unsigned_2) endian_le2h_2(unsigned_2 x);
-INLINE_PSIM_ENDIAN(unsigned_4) endian_le2h_4(unsigned_4 x);
-INLINE_PSIM_ENDIAN(unsigned_8) endian_le2h_8(unsigned_8 x);
-
-
-/* SWAP */
-
-#define SWAP_1 swap_1
-#define SWAP_2 swap_2
-#define SWAP_4 swap_4
-#define SWAP_8 swap_8
-
-
-/* HOST to BE */
-
-#define H2BE_1 endian_h2be_1
-#define H2BE_2 endian_h2be_2
-#define H2BE_4 endian_h2be_4
-#define H2BE_8 endian_h2be_8
-#define BE2H_1 endian_be2h_1
-#define BE2H_2 endian_be2h_2
-#define BE2H_4 endian_be2h_4
-#define BE2H_8 endian_be2h_8
-
-
-/* HOST to LE */
-
-#define H2LE_1 endian_h2le_1
-#define H2LE_2 endian_h2le_2
-#define H2LE_4 endian_h2le_4
-#define H2LE_8 endian_h2le_8
-#define LE2H_1 endian_le2h_1
-#define LE2H_2 endian_le2h_2
-#define LE2H_4 endian_le2h_4
-#define LE2H_8 endian_le2h_8
-
-
-/* HOST to TARGET */
-
-#define H2T_1 endian_h2t_1
-#define H2T_2 endian_h2t_2
-#define H2T_4 endian_h2t_4
-#define H2T_8 endian_h2t_8
-#define T2H_1 endian_t2h_1
-#define T2H_2 endian_t2h_2
-#define T2H_4 endian_t2h_4
-#define T2H_8 endian_t2h_8
-
-
-/* CONVERT IN PLACE
-
-   These macros, given an argument of unknown size, swap its value in
-   place if a host/target conversion is required. */
-
-#define H2T(VARIABLE) \
-do { \
-  switch (sizeof(VARIABLE)) { \
-  case 1: VARIABLE = H2T_1(VARIABLE); break; \
-  case 2: VARIABLE = H2T_2(VARIABLE); break; \
-  case 4: VARIABLE = H2T_4(VARIABLE); break; \
-  case 8: VARIABLE = H2T_8(VARIABLE); break; \
-  } \
-} while (0)
-
-#define T2H(VARIABLE) \
-do { \
-  switch (sizeof(VARIABLE)) { \
-  case 1: VARIABLE = T2H_1(VARIABLE); break; \
-  case 2: VARIABLE = T2H_2(VARIABLE); break; \
-  case 4: VARIABLE = T2H_4(VARIABLE); break; \
-  case 8: VARIABLE = T2H_8(VARIABLE); break; \
-  } \
-} while (0)
-
-#define SWAP(VARIABLE) \
-do { \
-  switch (sizeof(VARIABLE)) { \
-  case 1: VARIABLE = SWAP_1(VARIABLE); break; \
-  case 2: VARIABLE = SWAP_2(VARIABLE); break; \
-  case 4: VARIABLE = SWAP_4(VARIABLE); break; \
-  case 8: VARIABLE = SWAP_8(VARIABLE); break; \
-  } \
-} while (0)
-
-#define H2BE(VARIABLE) \
-do { \
-  switch (sizeof(VARIABLE)) { \
-  case 1: VARIABLE = H2BE_1(VARIABLE); break; \
-  case 2: VARIABLE = H2BE_2(VARIABLE); break; \
-  case 4: VARIABLE = H2BE_4(VARIABLE); break; \
-  case 8: VARIABLE = H2BE_8(VARIABLE); break; \
-  } \
-} while (0)
-
-#define BE2H(VARIABLE) \
-do { \
-  switch (sizeof(VARIABLE)) { \
-  case 1: VARIABLE = BE2H_1(VARIABLE); break; \
-  case 2: VARIABLE = BE2H_2(VARIABLE); break; \
-  case 4: VARIABLE = BE2H_4(VARIABLE); break; \
-  case 8: VARIABLE = BE2H_8(VARIABLE); break; \
-  } \
-} while (0)
-
-#define H2LE(VARIABLE) \
-do { \
-  switch (sizeof(VARIABLE)) { \
-  case 1: VARIABLE = H2LE_1(VARIABLE); break; \
-  case 2: VARIABLE = H2LE_2(VARIABLE); break; \
-  case 4: VARIABLE = H2LE_4(VARIABLE); break; \
-  case 8: VARIABLE = H2LE_8(VARIABLE); break; \
-  } \
-} while (0)
-
-#define LE2H(VARIABLE) \
-do { \
-  switch (sizeof(VARIABLE)) { \
-  case 1: VARIABLE = LE2H_1(VARIABLE); break; \
-  case 2: VARIABLE = LE2H_2(VARIABLE); break; \
-  case 4: VARIABLE = LE2H_4(VARIABLE); break; \
-  case 8: VARIABLE = LE2H_8(VARIABLE); break; \
-  } \
-} while (0)
-
-
-
-/* TARGET WORD:
-
-   Byte swap a quantity the size of the targets word */
-
-#if (WITH_TARGET_WORD_BITSIZE == 64)
-#define H2T_word H2T_8
-#define T2H_word T2H_8
-#define H2BE_word H2BE_8
-#define BE2H_word BE2H_8
-#define H2LE_word H2LE_8
-#define LE2H_word LE2H_8
-#define SWAP_word SWAP_8
-#endif
-#if (WITH_TARGET_WORD_BITSIZE == 32)
-#define H2T_word H2T_4
-#define T2H_word T2H_4
-#define H2BE_word H2BE_4
-#define BE2H_word BE2H_4
-#define H2LE_word H2LE_4
-#define LE2H_word LE2H_4
-#define SWAP_word SWAP_4
-#endif
-
-
-/* TARGET CELL:
-
-   Byte swap a quantity the size of the targets IEEE 1275 memory cell */
-
-#define H2T_cell H2T_4
-#define T2H_cell T2H_4
-#define H2BE_cell H2BE_4
-#define BE2H_cell BE2H_4
-#define H2LE_cell H2LE_4
-#define LE2H_cell LE2H_4
-#define SWAP_cell SWAP_4
-
-
-#if (SIM_ENDIAN_INLINE & INCLUDE_MODULE)
-# include "sim-endian.c"
-#endif
-
-#endif /* _SIM_ENDIAN_H_ */
-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-03  7:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-03  7:19 [PATCH/committed 1/4] sim: ppc: sync WITH_TARGET_{ADDRESS,CELL}_BITSIZE with common/ Mike Frysinger
2024-01-03  7:19 ` [PATCH/committed 2/4] sim: ppc: rename local ALU SIGNED64 macros Mike Frysinger
2024-01-03  7:19 ` [PATCH/committed 3/4] sim: common: include sim-types.h in the endian header directly Mike Frysinger
2024-01-03  7:19 ` [PATCH/committed 4/4] sim: ppc: switch to common endian code Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).