qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH 3/3] tests/tcg/ppc64le: Use vector types instead of __int


From: Matheus K. Ferst
Subject: Re: [RFC PATCH 3/3] tests/tcg/ppc64le: Use vector types instead of __int128
Date: Thu, 17 Feb 2022 09:46:04 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 17/02/2022 05:09, Cédric Le Goater wrote:
On 2/8/22 21:31, matheus.ferst@eldorado.org.br wrote:
From: Matheus Ferst <matheus.ferst@eldorado.org.br>

LLVM/Clang doesn't like inline asm with __int128, use a vector type
instead.

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
---
Alternatively, we could pass VSR values in GPR pairs, as we did in
tests/tcg/ppc64le/non_signalling_xscv.c
---
  tests/tcg/ppc64le/bcdsub.c | 92 +++++++++++++++++++++-----------------
  1 file changed, 52 insertions(+), 40 deletions(-)

diff --git a/tests/tcg/ppc64le/bcdsub.c b/tests/tcg/ppc64le/bcdsub.c
index 8c188cae6d..17403daf22 100644
--- a/tests/tcg/ppc64le/bcdsub.c
+++ b/tests/tcg/ppc64le/bcdsub.c
@@ -1,6 +1,7 @@
  #include <assert.h>
  #include <unistd.h>
  #include <signal.h>
+#include <altivec.h>

  #define CRF_LT  (1 << 3)
  #define CRF_GT  (1 << 2)
@@ -8,6 +9,16 @@
  #define CRF_SO  (1 << 0)
  #define UNDEF   0

+#ifdef __LITTLE_ENDIAN__

Shouldn't we be using :

#if BYTE_ORDER == LITTLE_ENDIAN

instead ?


I guess it is better, I'll send a v2.

Thanks,
Matheus K. Ferst
Instituto de Pesquisas ELDORADO <http://www.eldorado.org.br/>
Analista de Software
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>

reply via email to

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