qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 6/8] target/riscv: Support of compiler's 128-bit integer type


From: Richard Henderson
Subject: Re: [PATCH 6/8] target/riscv: Support of compiler's 128-bit integer types
Date: Mon, 30 Aug 2021 20:38:55 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 8/30/21 10:16 AM, Frédéric Pétrot wrote:
diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
index 6528b4540e..4321b03b94 100644
--- a/target/riscv/cpu.h
+++ b/target/riscv/cpu.h
@@ -60,6 +60,19 @@
  #define RV64 ((target_ulong)2 << (TARGET_LONG_BITS - 2))
  /* To be used on misah, the upper part of misa */
  #define RV128 ((target_ulong)3 << (TARGET_LONG_BITS - 2))
+/*
+ * Defined to force the use of tcg 128-bit arithmetic
+ * if the compiler does not have a 128-bit built-in type
+ */
+#define SOFT_128BIT
+/*
+ * If available and not explicitly disabled,
+ * use compiler's 128-bit integers.
+ */
+#if defined(__SIZEOF_INT128__) && !defined(SOFT_128BIT)
+#define HARD_128BIT
+#endif

This doesn't belong here.  CONFIG_INT128 is more correct.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]