qemu-s390x
[Top][All Lists]
Advanced

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

Re: [PATCH v6 3/4] tests/tcg/s390x: Tests for Miscellaneous-Instruction-


From: Richard Henderson
Subject: Re: [PATCH v6 3/4] tests/tcg/s390x: Tests for Miscellaneous-Instruction-Extensions Facility 3
Date: Wed, 23 Feb 2022 09:45:22 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 2/17/22 13:17, David Miller wrote:
+#define F_PRO    asm ( \
+    "lg %%r2, %[a]\n"  \
+    "lg %%r3, %[b]\n"  \
+    "lg %%r0, %[c]\n"  \
+    "ltgr %%r0, %%r0"  \
+    : : [a] "m" (a),   \
+        [b] "m" (b),   \
+        [c] "m" (c)    \
+    : "r0", "r2", "r3", "r4")
+
+
+
+#define Fi3(S, ASM) uint64_t S(uint64_t a, uint64_t b, uint64_t c) \
+{ uint64_t res = 0; F_PRO ; ASM ; return res; }
+
+
+Fi3 (_selre,     asm("selre    %%r0, %%r3, %%r2\n" F_EPI))
+Fi3 (_selgrz,    asm("selgrz   %%r0, %%r3, %%r2\n" F_EPI))
+Fi3 (_selfhrnz,  asm("selfhrnz %%r0, %%r3, %%r2\n" F_EPI))

You can't split these two asm, lest the ltgr and sel not be adjacent, and the flags not having the correct value when we arrive at the sel.

No test for popcnt, seeing as there's a bug in m3?


r~



reply via email to

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