+2015-11-21 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-types.h (SIM_PRI_TB): Define.
+ (PRI_TW, PRIiTW, PRIxTW): New PRI target word defines.
+ (PRI_TA, PRIiTA, PRIxTA): New PRI target address defines.
+ (PRI_TC, PRIiTC, PRIxTC): New PRI target cell defines.
+ (PRI_TF, PRIiTF, PRIxTF): New PRI target floating point defines.
+
2015-11-17 Mike Frysinger <vapier@gentoo.org>
* sim-main.h (WITH_MODULO_MEMORY): Delete.
typedef unsigned128 unsigned_16;
+/* Macros for printf. Usage is restricted to this header. */
+#define SIM_PRI_TB(t, b) XCONCAT3 (PRI,t,b)
+
+
/* for general work, the following are defined */
/* unsigned: >= 32 bits */
/* signed: >= 32 bits */
typedef signed16 signed_word;
#endif
+#define PRI_TW(t) SIM_PRI_TB (t, WITH_TARGET_WORD_BITSIZE)
+#define PRIiTW PRI_TW (i)
+#define PRIxTW PRI_TW (x)
+
/* Other instructions */
#if (WITH_TARGET_ADDRESS_BITSIZE == 64)
#endif
typedef unsigned_address address_word;
+#define PRI_TA(t) SIM_PRI_TB (t, WITH_TARGET_ADDRESS_BITSIZE)
+#define PRIiTA PRI_TA (i)
+#define PRIxTA PRI_TA (x)
+
/* IEEE 1275 cell size */
#if (WITH_TARGET_CELL_BITSIZE == 64)
#endif
typedef signed_cell cell_word; /* cells are normally signed */
+#define PRI_TC(t) SIM_PRI_TB (t, WITH_TARGET_CELL_BITSIZE)
+#define PRIiTC PRI_TC (i)
+#define PRIxTC PRI_TC (x)
+
/* Floating point registers */
#if (WITH_TARGET_FLOATING_POINT_BITSIZE == 64)
typedef unsigned32 fp_word;
#endif
+#define PRI_TF(t) SIM_PRI_TB (t, WITH_TARGET_FLOATING_POINT_BITSIZE)
+#define PRIiTF PRI_TF (i)
+#define PRIxTF PRI_TF (x)
+
#endif