Cc: Richard Henderson <r...@twiddle.net> Cc: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Aurelien Jarno <aurel...@aurel32.net> --- tcg/optimize.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/tcg/optimize.c b/tcg/optimize.c index b1f736b..044f456 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -787,6 +787,19 @@ static TCGArg *tcg_constant_folding(TCGContext *s, uint16_t *tcg_opc_ptr, mask = temps[args[3]].mask | temps[args[4]].mask; break; + CASE_OP_32_64(ld8u): + case INDEX_op_qemu_ld8u: + mask = 0xff; + break; + CASE_OP_32_64(ld16u): + case INDEX_op_qemu_ld16u: + mask = 0xffff; + break; + case INDEX_op_ld32u_i64: + case INDEX_op_qemu_ld32u: + mask = 0xffffffffu; + break; + default: break; } -- 1.7.10.4