qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 03/16] tcg: Propagate args to op->args in tcg.c


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 03/16] tcg: Propagate args to op->args in tcg.c
Date: Mon, 26 Jun 2017 08:07:25 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

On 06/26/2017 08:02 AM, Alex Bennée wrote:
  #if TARGET_LONG_BITS > TCG_TARGET_REG_BITS
-                a = ((target_ulong)args[i * 2 + 1] << 32) | args[i * 2];
+                a = deposit64(op->args[i * 2], 32, 32, op->args[i * 2
              + 1]);

It doesn't now but should be assert against us overflowing the args
buffer here when dealing with encoded data? Or should it have faulted
when planting the ops?

Statically checked via preprocessor in tcg/tcg-op.h:

#elif TARGET_INSN_START_WORDS == 3
...
#else
# error "Unhandled number of operands to insn_start"
#endif

which maxes out at 6 host arguments, which is less than MAX_OPC_PARAM.


r~



reply via email to

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