2020-10-17 08:20:55 +03:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
/*
|
|
|
|
* Define i386 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.
|
|
|
|
*
|
|
|
|
* C_N1_Im(...) defines a constraint set with 1 output and <m> inputs,
|
|
|
|
* except that the output must use a new register.
|
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 08:20:55 +03:00
|
|
|
*/
|
|
|
|
C_O0_I1(r)
|
|
|
|
C_O0_I2(L, L)
|
|
|
|
C_O0_I2(qi, r)
|
|
|
|
C_O0_I2(re, r)
|
|
|
|
C_O0_I2(ri, r)
|
2024-01-10 01:15:07 +03:00
|
|
|
C_O0_I2(r, reT)
|
2020-10-17 08:20:55 +03:00
|
|
|
C_O0_I2(s, L)
|
|
|
|
C_O0_I2(x, r)
|
|
|
|
C_O0_I3(L, L, L)
|
|
|
|
C_O0_I3(s, L, L)
|
|
|
|
C_O0_I4(L, L, L, L)
|
|
|
|
C_O0_I4(r, r, ri, ri)
|
|
|
|
C_O1_I1(r, 0)
|
|
|
|
C_O1_I1(r, L)
|
|
|
|
C_O1_I1(r, q)
|
|
|
|
C_O1_I1(r, r)
|
|
|
|
C_O1_I1(x, r)
|
|
|
|
C_O1_I1(x, x)
|
2023-08-13 21:49:27 +03:00
|
|
|
C_O1_I2(q, 0, qi)
|
2024-01-10 01:15:07 +03:00
|
|
|
C_O1_I2(q, r, reT)
|
2020-10-17 08:20:55 +03:00
|
|
|
C_O1_I2(r, 0, ci)
|
|
|
|
C_O1_I2(r, 0, r)
|
|
|
|
C_O1_I2(r, 0, re)
|
|
|
|
C_O1_I2(r, 0, reZ)
|
|
|
|
C_O1_I2(r, 0, ri)
|
|
|
|
C_O1_I2(r, 0, rI)
|
|
|
|
C_O1_I2(r, L, L)
|
|
|
|
C_O1_I2(r, r, re)
|
|
|
|
C_O1_I2(r, r, ri)
|
|
|
|
C_O1_I2(r, r, rI)
|
|
|
|
C_O1_I2(x, x, x)
|
|
|
|
C_N1_I2(r, r, r)
|
|
|
|
C_N1_I2(r, r, rW)
|
2021-12-18 21:48:43 +03:00
|
|
|
C_O1_I3(x, 0, x, x)
|
2020-10-17 08:20:55 +03:00
|
|
|
C_O1_I3(x, x, x, x)
|
2024-01-10 01:15:07 +03:00
|
|
|
C_O1_I4(r, r, reT, r, 0)
|
2020-10-17 08:20:55 +03:00
|
|
|
C_O1_I4(r, r, r, ri, ri)
|
|
|
|
C_O2_I1(r, r, L)
|
|
|
|
C_O2_I2(a, d, a, r)
|
|
|
|
C_O2_I2(r, r, L, L)
|
|
|
|
C_O2_I3(a, d, 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, re, re)
|