From 3efb3c04b80206d986b51767e6b879119d219e42 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 20 Nov 2023 23:10:12 +0000 Subject: gentoo auto-resync : 20:11:2023 - 23:10:12 --- app-emulation/qemu/Manifest | 1 - .../qemu/files/qemu-7.2.0-tcg-curl-ssl.patch | 182 --------------------- 2 files changed, 183 deletions(-) delete mode 100644 app-emulation/qemu/files/qemu-7.2.0-tcg-curl-ssl.patch (limited to 'app-emulation/qemu') diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest index 4e094d40bf98..74fbedb621ef 100644 --- a/app-emulation/qemu/Manifest +++ b/app-emulation/qemu/Manifest @@ -6,7 +6,6 @@ AUX qemu-7.1.0-also-build-virtfs-proxy-helper.patch 1167 BLAKE2B dee6c98a547a510 AUX qemu-7.1.0-capstone-include-path.patch 1076 BLAKE2B cb595acb50ff2a64d0b879d5d8439d89b0d6295434ae09d1c45c01d3b18f547dcac201e79140eb9dc376d2d8c1d1b72a5adfe7ac477da61c86da148ed486ff2b SHA512 857504916325984150f8e0869aa44b158ed829b53d2bcb7f7012390d2d404ae1553af50184be6e2d8f91ffedfc5c061b7f64b9f28feb38bf18379dee56704732 AUX qemu-7.2.0-disable-gmp.patch 1554 BLAKE2B ac21e5985676123e8b61de8d590d8489de1d7401e5005899e5a95d7e86b77741572087a294d4b63533c26fe53f81c76e23ee482fd3a371f2e3700859644b6c8a SHA512 d4a600cfe42f1c49d45cffae64ba1e1225ae8e75a92454cbb534be5f95e1b8dbdbf441d092764cc9f9e97ed6bf6367175d7b56cdf97694dec57da2c8fabd1969 AUX qemu-7.2.0-linux-headers-6.2-glibc-2.36.patch 5148 BLAKE2B 74d22dbc2113d7e7150908046f5c7c04be2f330143d7f61b5a08d8b837b3665857327f50176393a3df0078c5b856cd34b72e779825d10fb8faec9678812d8654 SHA512 3c4a7d41710b34bdce4ab09929aba25fe3995c85dfa1e2a88ea780179709e8ccfe7e7c5073ef321c986061282725896ca615193be68c48674d6b5632f4995661 -AUX qemu-7.2.0-tcg-curl-ssl.patch 6514 BLAKE2B 02bde5269b02472a9afb24019bbeee6995a317ca6c0ab355dad20bcfa088be7ac2c82ce3f544d8397fb44db52dc94cb060139b74515c216479d12ccb1b152f8d SHA512 1117179b48824d0aed39e352783f8228658a39e8f52a171076ba60df42cd5869bde6092d7bd63b88a594e4d7b355935f8f2294057a19be26a53c63b98d8cb761 AUX qemu-8.0.0-disable-keymap.patch 968 BLAKE2B f9496eb2c1fd91c2b570d3328d309f880bc15380a5302266aa18a0e85ed63df2263efa12c2295a7a3ec94a7ab205394b817a066b66e61e7ed875e3c501a3465b SHA512 3d686bfb9b4d7d58f1aec1ebd28f158e4e4ea521df9da5d15e6e28fc11de74da141c88e4f0a1eda234eb06fcd1e1767847aaa1883009c8468099cfa6acbd8761 AUX qemu-8.0.0-make.patch 231 BLAKE2B a38c26a1150a47b627add1ebf43d319cc405855515a6ee75a44dc31e042f2e5049e142367d1371efd3377d1a3be133ec95c1b9c4755097c0f522bfad67718178 SHA512 1c23959b5d860829000cf699a6943215f073530eb57745a8683d8df0978ddb380cbdcbdd9ed6936ca5d1c4b7897b8d92068bb37c894f8ffa39ee8c8751e0a56c AUX qemu-8.0.0-remove-python-meson-check.patch 1413 BLAKE2B b5e24afacb4289126b7b6b475406f2aead0dd62009a57649a929a15689caf3e41e9240e42930f05bf2889d902dee91bd5b7ef37825ab1a91bfd7a0ea8dfaa7af SHA512 fc59b3f413496337c84a63f85552fb571e77d343b7ad5271120f08b14aee9a2d6e5ea16b6c28c9fbbf22ce86924e399185797f3f18575d8c23334b0872fae592 diff --git a/app-emulation/qemu/files/qemu-7.2.0-tcg-curl-ssl.patch b/app-emulation/qemu/files/qemu-7.2.0-tcg-curl-ssl.patch deleted file mode 100644 index 2b0a9f630371..000000000000 --- a/app-emulation/qemu/files/qemu-7.2.0-tcg-curl-ssl.patch +++ /dev/null @@ -1,182 +0,0 @@ -https://bugs.gentoo.org/895746#c3 -https://gitlab.com/qemu-project/qemu/-/issues/1471 -https://gitlab.com/qemu-project/qemu/-/commit/60c7dd22e1383754d5f150bc9f7c2785c662a7b6 - -From 60c7dd22e1383754d5f150bc9f7c2785c662a7b6 Mon Sep 17 00:00:00 2001 -From: Paolo Bonzini -Date: Tue, 31 Jan 2023 09:48:03 +0100 -Subject: [PATCH] target/i386: fix ADOX followed by ADCX - -When ADCX is followed by ADOX or vice versa, the second instruction's -carry comes from EFLAGS and the condition codes use the CC_OP_ADCOX -operation. Retrieving the carry from EFLAGS is handled by this bit -of gen_ADCOX: - - tcg_gen_extract_tl(carry_in, cpu_cc_src, - ctz32(cc_op == CC_OP_ADCX ? CC_C : CC_O), 1); - -Unfortunately, in this case cc_op has been overwritten by the previous -"if" statement to CC_OP_ADCOX. This works by chance when the first -instruction is ADCX; however, if the first instruction is ADOX, -ADCX will incorrectly take its carry from OF instead of CF. - -Fix by moving the computation of the new cc_op at the end of the function. -The included exhaustive test case fails without this patch and passes -afterwards. - -Because ADCX/ADOX need not be invoked through the VEX prefix, this -regression bisects to commit 16fc5726a6e2 ("target/i386: reimplement -0x0f 0x38, add AVX", 2022-10-18). However, the mistake happened a -little earlier, when BMI instructions were rewritten using the new -decoder framework. - -Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1471 -Reported-by: Paul Jolly -Fixes: 1d0b926150e5 ("target/i386: move scalar 0F 38 and 0F 3A instruction to new decoder", 2022-10-18) -Cc: qemu-stable@nongnu.org -Signed-off-by: Paolo Bonzini ---- a/target/i386/tcg/emit.c.inc -+++ b/target/i386/tcg/emit.c.inc -@@ -1015,6 +1015,7 @@ VSIB_AVX(VPGATHERQ, vpgatherq) - - static void gen_ADCOX(DisasContext *s, CPUX86State *env, MemOp ot, int cc_op) - { -+ int opposite_cc_op; - TCGv carry_in = NULL; - TCGv carry_out = (cc_op == CC_OP_ADCX ? cpu_cc_dst : cpu_cc_src2); - TCGv zero; -@@ -1022,14 +1023,8 @@ static void gen_ADCOX(DisasContext *s, CPUX86State *env, MemOp ot, int cc_op) - if (cc_op == s->cc_op || s->cc_op == CC_OP_ADCOX) { - /* Re-use the carry-out from a previous round. */ - carry_in = carry_out; -- cc_op = s->cc_op; -- } else if (s->cc_op == CC_OP_ADCX || s->cc_op == CC_OP_ADOX) { -- /* Merge with the carry-out from the opposite instruction. */ -- cc_op = CC_OP_ADCOX; -- } -- -- /* If we don't have a carry-in, get it out of EFLAGS. */ -- if (!carry_in) { -+ } else { -+ /* We don't have a carry-in, get it out of EFLAGS. */ - if (s->cc_op != CC_OP_ADCX && s->cc_op != CC_OP_ADOX) { - gen_compute_eflags(s); - } -@@ -1053,7 +1048,14 @@ static void gen_ADCOX(DisasContext *s, CPUX86State *env, MemOp ot, int cc_op) - tcg_gen_add2_tl(s->T0, carry_out, s->T0, carry_out, s->T1, zero); - break; - } -- set_cc_op(s, cc_op); -+ -+ opposite_cc_op = cc_op == CC_OP_ADCX ? CC_OP_ADOX : CC_OP_ADCX; -+ if (s->cc_op == CC_OP_ADCOX || s->cc_op == opposite_cc_op) { -+ /* Merge with the carry-out from the opposite instruction. */ -+ set_cc_op(s, CC_OP_ADCOX); -+ } else { -+ set_cc_op(s, cc_op); -+ } - } - - static void gen_ADCX(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode) ---- a/tests/tcg/i386/Makefile.target -+++ b/tests/tcg/i386/Makefile.target -@@ -14,7 +14,7 @@ config-cc.mak: Makefile - I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c)) - ALL_X86_TESTS=$(I386_SRCS:.c=) - SKIP_I386_TESTS=test-i386-ssse3 test-avx test-3dnow test-mmx --X86_64_TESTS:=$(filter test-i386-bmi2 $(SKIP_I386_TESTS), $(ALL_X86_TESTS)) -+X86_64_TESTS:=$(filter test-i386-adcox test-i386-bmi2 $(SKIP_I386_TESTS), $(ALL_X86_TESTS)) - - test-i386-sse-exceptions: CFLAGS += -msse4.1 -mfpmath=sse - run-test-i386-sse-exceptions: QEMU_OPTS += -cpu max -@@ -28,6 +28,10 @@ test-i386-bmi2: CFLAGS=-O2 - run-test-i386-bmi2: QEMU_OPTS += -cpu max - run-plugin-test-i386-bmi2-%: QEMU_OPTS += -cpu max - -+test-i386-adcox: CFLAGS=-O2 -+run-test-i386-adcox: QEMU_OPTS += -cpu max -+run-plugin-test-i386-adcox-%: QEMU_OPTS += -cpu max -+ - # - # hello-i386 is a barebones app - # ---- /dev/null -+++ b/tests/tcg/i386/test-i386-adcox.c -@@ -0,0 +1,75 @@ -+/* See if various BMI2 instructions give expected results */ -+#include -+#include -+#include -+ -+#define CC_C 1 -+#define CC_O (1 << 11) -+ -+#ifdef __x86_64__ -+#define REG uint64_t -+#else -+#define REG uint32_t -+#endif -+ -+void test_adox_adcx(uint32_t in_c, uint32_t in_o, REG adcx_operand, REG adox_operand) -+{ -+ REG flags; -+ REG out_adcx, out_adox; -+ -+ asm("pushf; pop %0" : "=r"(flags)); -+ flags &= ~(CC_C | CC_O); -+ flags |= (in_c ? CC_C : 0); -+ flags |= (in_o ? CC_O : 0); -+ -+ out_adcx = adcx_operand; -+ out_adox = adox_operand; -+ asm("push %0; popf;" -+ "adox %3, %2;" -+ "adcx %3, %1;" -+ "pushf; pop %0" -+ : "+r" (flags), "+r" (out_adcx), "+r" (out_adox) -+ : "r" ((REG)-1), "0" (flags), "1" (out_adcx), "2" (out_adox)); -+ -+ assert(out_adcx == in_c + adcx_operand - 1); -+ assert(out_adox == in_o + adox_operand - 1); -+ assert(!!(flags & CC_C) == (in_c || adcx_operand)); -+ assert(!!(flags & CC_O) == (in_o || adox_operand)); -+} -+ -+void test_adcx_adox(uint32_t in_c, uint32_t in_o, REG adcx_operand, REG adox_operand) -+{ -+ REG flags; -+ REG out_adcx, out_adox; -+ -+ asm("pushf; pop %0" : "=r"(flags)); -+ flags &= ~(CC_C | CC_O); -+ flags |= (in_c ? CC_C : 0); -+ flags |= (in_o ? CC_O : 0); -+ -+ out_adcx = adcx_operand; -+ out_adox = adox_operand; -+ asm("push %0; popf;" -+ "adcx %3, %1;" -+ "adox %3, %2;" -+ "pushf; pop %0" -+ : "+r" (flags), "+r" (out_adcx), "+r" (out_adox) -+ : "r" ((REG)-1), "0" (flags), "1" (out_adcx), "2" (out_adox)); -+ -+ assert(out_adcx == in_c + adcx_operand - 1); -+ assert(out_adox == in_o + adox_operand - 1); -+ assert(!!(flags & CC_C) == (in_c || adcx_operand)); -+ assert(!!(flags & CC_O) == (in_o || adox_operand)); -+} -+ -+int main(int argc, char *argv[]) { -+ /* try all combinations of input CF, input OF, CF from op1+op2, OF from op2+op1 */ -+ int i; -+ for (i = 0; i <= 15; i++) { -+ printf("%d\n", i); -+ test_adcx_adox(!!(i & 1), !!(i & 2), !!(i & 4), !!(i & 8)); -+ test_adox_adcx(!!(i & 1), !!(i & 2), !!(i & 4), !!(i & 8)); -+ } -+ return 0; -+} -+ --- -GitLab -- cgit v1.2.3