2020-10-17 21:15:40 +03:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
/*
|
|
|
|
* Define S390 target-specific constraint sets.
|
|
|
|
* Copyright (c) 2021 Linaro
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* C_On_Im(...) defines a constraint set with <n> outputs and <m> inputs.
|
|
|
|
* Each operand should be a sequence of constraint letters as defined by
|
|
|
|
* tcg-target-con-str.h; the constraint combination is inclusive or.
|
tcg/{i386, s390x}: Add earlyclobber to the op_add2's first output
i386 and s390x implementations of op_add2 require an earlyclobber,
which is currently missing. This breaks VCKSM in s390x guests. E.g., on
x86_64 the following op:
add2_i32 tmp2,tmp3,tmp2,tmp3,tmp3,tmp2 dead: 0 2 3 4 5 pref=none,0xffff
is translated to:
addl %ebx, %r12d
adcl %r12d, %ebx
Introduce a new C_N1_O1_I4 constraint, and make sure that earlyclobber
of aliased outputs is honored.
Cc: qemu-stable@nongnu.org
Fixes: 82790a870992 ("tcg: Add markup for output requires new register")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230719221310.1968845-7-iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-07-20 01:11:18 +03:00
|
|
|
*
|
|
|
|
* C_Nn_Om_Ik(...) defines a constraint set with <n + m> outputs and <k>
|
|
|
|
* inputs, except that the first <n> outputs must use new registers.
|
2020-10-17 21:15:40 +03:00
|
|
|
*/
|
|
|
|
C_O0_I1(r)
|
|
|
|
C_O0_I2(r, r)
|
|
|
|
C_O0_I2(r, ri)
|
2023-10-28 08:34:24 +03:00
|
|
|
C_O0_I2(r, rC)
|
2020-09-15 02:33:14 +03:00
|
|
|
C_O0_I2(v, r)
|
2023-04-19 18:58:23 +03:00
|
|
|
C_O0_I3(o, m, r)
|
2020-10-17 21:15:40 +03:00
|
|
|
C_O1_I1(r, r)
|
2020-09-15 02:33:14 +03:00
|
|
|
C_O1_I1(v, r)
|
2020-09-15 04:23:16 +03:00
|
|
|
C_O1_I1(v, v)
|
2020-09-15 02:33:14 +03:00
|
|
|
C_O1_I1(v, vr)
|
2020-10-17 21:15:40 +03:00
|
|
|
C_O1_I2(r, 0, ri)
|
|
|
|
C_O1_I2(r, 0, rI)
|
|
|
|
C_O1_I2(r, 0, rJ)
|
2022-02-24 03:04:25 +03:00
|
|
|
C_O1_I2(r, r, r)
|
2020-10-17 21:15:40 +03:00
|
|
|
C_O1_I2(r, r, ri)
|
2023-10-28 08:34:24 +03:00
|
|
|
C_O1_I2(r, r, rC)
|
2022-02-24 06:03:20 +03:00
|
|
|
C_O1_I2(r, r, rI)
|
2022-02-24 04:28:44 +03:00
|
|
|
C_O1_I2(r, r, rJ)
|
2022-12-08 20:28:19 +03:00
|
|
|
C_O1_I2(r, r, rK)
|
2022-02-24 03:04:25 +03:00
|
|
|
C_O1_I2(r, r, rKR)
|
|
|
|
C_O1_I2(r, r, rNK)
|
2022-12-08 21:06:03 +03:00
|
|
|
C_O1_I2(r, r, rNKR)
|
2020-10-17 21:15:40 +03:00
|
|
|
C_O1_I2(r, rZ, r)
|
2020-09-15 05:00:38 +03:00
|
|
|
C_O1_I2(v, v, r)
|
2020-09-15 02:33:14 +03:00
|
|
|
C_O1_I2(v, v, v)
|
2020-09-15 06:36:36 +03:00
|
|
|
C_O1_I3(v, v, v, v)
|
2024-09-11 06:24:10 +03:00
|
|
|
C_O1_I4(v, v, v, vZ, v)
|
|
|
|
C_O1_I4(v, v, v, vZM, v)
|
2022-02-24 03:24:05 +03:00
|
|
|
C_O1_I4(r, r, ri, rI, r)
|
2023-10-28 08:34:24 +03:00
|
|
|
C_O1_I4(r, r, rC, rI, r)
|
2023-04-19 18:58:23 +03:00
|
|
|
C_O2_I1(o, m, r)
|
2022-10-10 18:41:15 +03:00
|
|
|
C_O2_I2(o, m, 0, r)
|
2022-02-24 04:35:43 +03:00
|
|
|
C_O2_I2(o, m, r, r)
|
2022-10-10 18:41:15 +03:00
|
|
|
C_O2_I3(o, m, 0, 1, r)
|
tcg/{i386, s390x}: Add earlyclobber to the op_add2's first output
i386 and s390x implementations of op_add2 require an earlyclobber,
which is currently missing. This breaks VCKSM in s390x guests. E.g., on
x86_64 the following op:
add2_i32 tmp2,tmp3,tmp2,tmp3,tmp3,tmp2 dead: 0 2 3 4 5 pref=none,0xffff
is translated to:
addl %ebx, %r12d
adcl %r12d, %ebx
Introduce a new C_N1_O1_I4 constraint, and make sure that earlyclobber
of aliased outputs is honored.
Cc: qemu-stable@nongnu.org
Fixes: 82790a870992 ("tcg: Add markup for output requires new register")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230719221310.1968845-7-iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-07-20 01:11:18 +03:00
|
|
|
C_N1_O1_I4(r, r, 0, 1, ri, r)
|
2023-10-28 07:57:06 +03:00
|
|
|
C_N1_O1_I4(r, r, 0, 1, rJU, r)
|