qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-4.0 v2 05/37] tcg/i386: Add constraints for


From: Alex Bennée
Subject: Re: [Qemu-devel] [PATCH for-4.0 v2 05/37] tcg/i386: Add constraints for r8 and r9
Date: Thu, 29 Nov 2018 15:00:41 +0000
User-agent: mu4e 1.1.0; emacs 26.1.90

Richard Henderson <address@hidden> writes:

> These are function call arguments for x86_64 we will need soon.
>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
>  tcg/i386/tcg-target.inc.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c
> index 4f66a0c5ae..8aef66e430 100644
> --- a/tcg/i386/tcg-target.inc.c
> +++ b/tcg/i386/tcg-target.inc.c
> @@ -233,6 +233,14 @@ static const char 
> *target_parse_constraint(TCGArgConstraint *ct,
>          ct->ct |= TCG_CT_REG;
>          tcg_regset_set_reg(ct->u.regs, TCG_REG_EDI);
>          break;
> +    case 'E': /* "Eight", r8 */
> +        ct->ct |= TCG_CT_REG;
> +        tcg_regset_set_reg(ct->u.regs, TCG_REG_R8);
> +        break;
> +    case 'N': /* "Nine", r9 */
> +        ct->ct |= TCG_CT_REG;
> +        tcg_regset_set_reg(ct->u.regs, TCG_REG_R9);
> +        break;

I would be nice to flesh out the missing comments in tcg.h:

#define TCG_CT_ALIAS  0x80
#define TCG_CT_IALIAS 0x40
#define TCG_CT_NEWREG 0x20 /* output requires a new register */
#define TCG_CT_REG    0x01
#define TCG_CT_CONST  0x02 /* any constant of register size */

Anyway:

Reviewed-by: Alex Bennée <address@hidden>

>      case 'q':
>          /* A register that can be used as a byte operand.  */
>          ct->ct |= TCG_CT_REG;


--
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]