2020-10-17 11:15:40 -07: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 00:11:18 +02: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 11:15:40 -07:00
|
|
|
*/
|
|
|
|
C_O0_I1(r)
|
|
|
|
C_O0_I2(r, r)
|
|
|
|
C_O0_I2(r, ri)
|
2022-12-08 21:48:00 +00:00
|
|
|
C_O0_I2(r, rA)
|
2020-09-14 16:33:14 -07:00
|
|
|
C_O0_I2(v, r)
|
2023-04-19 17:58:23 +02:00
|
|
|
C_O0_I3(o, m, r)
|
2020-10-17 11:15:40 -07:00
|
|
|
C_O1_I1(r, r)
|
2020-09-14 16:33:14 -07:00
|
|
|
C_O1_I1(v, r)
|
2020-09-14 18:23:16 -07:00
|
|
|
C_O1_I1(v, v)
|
2020-09-14 16:33:14 -07:00
|
|
|
C_O1_I1(v, vr)
|
2020-10-17 11:15:40 -07:00
|
|
|
C_O1_I2(r, 0, ri)
|
|
|
|
C_O1_I2(r, 0, rI)
|
|
|
|
C_O1_I2(r, 0, rJ)
|
2022-02-24 00:04:25 +00:00
|
|
|
C_O1_I2(r, r, r)
|
2020-10-17 11:15:40 -07:00
|
|
|
C_O1_I2(r, r, ri)
|
2022-12-08 21:48:00 +00:00
|
|
|
C_O1_I2(r, r, rA)
|
2022-02-24 03:03:20 +00:00
|
|
|
C_O1_I2(r, r, rI)
|
2022-02-24 01:28:44 +00:00
|
|
|
C_O1_I2(r, r, rJ)
|
2022-12-08 17:28:19 +00:00
|
|
|
C_O1_I2(r, r, rK)
|
2022-02-24 00:04:25 +00:00
|
|
|
C_O1_I2(r, r, rKR)
|
|
|
|
C_O1_I2(r, r, rNK)
|
2022-12-08 18:06:03 +00:00
|
|
|
C_O1_I2(r, r, rNKR)
|
2020-10-17 11:15:40 -07:00
|
|
|
C_O1_I2(r, rZ, r)
|
2020-09-14 19:00:38 -07:00
|
|
|
C_O1_I2(v, v, r)
|
2020-09-14 16:33:14 -07:00
|
|
|
C_O1_I2(v, v, v)
|
2020-09-14 20:36:36 -07:00
|
|
|
C_O1_I3(v, v, v, v)
|
2022-02-24 00:24:05 +00:00
|
|
|
C_O1_I4(r, r, ri, rI, r)
|
2022-12-08 21:48:00 +00:00
|
|
|
C_O1_I4(r, r, rA, rI, r)
|
2023-04-19 17:58:23 +02:00
|
|
|
C_O2_I1(o, m, r)
|
2022-10-10 08:41:15 -07:00
|
|
|
C_O2_I2(o, m, 0, r)
|
2022-02-24 01:35:43 +00:00
|
|
|
C_O2_I2(o, m, r, r)
|
2022-10-10 08:41:15 -07: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 00:11:18 +02:00
|
|
|
C_N1_O1_I4(r, r, 0, 1, ri, r)
|
|
|
|
C_N1_O1_I4(r, r, 0, 1, rA, r)
|