> -----Original Message----- > From: Taylor Simpson > Sent: Sunday, February 9, 2020 2:51 PM > To: Richard Henderson <richard.hender...@linaro.org>; Richard Henderson > <r...@twiddle.net>; qemu-devel@nongnu.org > Cc: Paolo Bonzini <pbonz...@redhat.com> > Subject: RE: [PATCH] Add support for a helper with 7 arguments > > > However, you should prefer to use tcg_gen_addi_* over tcg_gen_add_* > > (etc) when > > you know that one operand is constant. This will optimize away the add > zero > > immediately as opposed to allocating memory and walking the data > > structures to > > eliminate it later. > > OK, will work on this. >
One question I have from implementing this is - Is there a way to pass a constant value to gen_helper_XXX? It would be great if this would be possible instead of calling tcg_const_tl() and passing the TCGv. AFAICT, the DEF_HELPER macros don't have an operand type that takes a constant. I think s32, i32, and int all expect TCGv at the call site. Thanks, Taylor