On 11/15/18 11:35 PM, Alistair Francis wrote:
> + case 'L':
> + /* qemu_ld/qemu_st constraint */
> + ct->ct |= TCG_CT_REG;
> + ct->u.regs = 0xffffffff;
> + /* qemu_ld/qemu_st uses TCG_REG_TMP0 */
> +#if defined(CONFIG_SOFTMMU)
> + /* tcg_out_tlb_load uses TCG_REG_TMP0/TMP1 and TCG_REG_L0/L1 */
> + /* tcg_regset_reset_reg(ct->u.regs, TCG_REG_TMP0); */
> + /* tcg_regset_reset_reg(ct->u.regs, TCG_REG_TMP1); */
> + tcg_regset_reset_reg(ct->u.regs, TCG_REG_TMP2);
Normally TMP registers are reserved and do not need to be mentioned in
constraints at all.
> + if ((ct & TCG_CT_CONST_S12) && val >= -2048 && val <= 2047) {
> + return 1;
> + }
> + if ((ct & TCG_CT_CONST_N12) && val >= -2047 && val <= 2048) {
> + return 1;
> + }
Clearer as val == sextracttl(val, 0, 12)
and -val == sextracttl(-val, 0, 12)?
r~