On 6/17/24 23:15, Richard Henderson wrote:
On 6/17/24 03:40, Chinmay Rath wrote:
static TCGv do_ea_calc_ra(DisasContext *ctx, int ra)
{
TCGv EA;
if (!ra) {
return tcg_constant_tl(0);
}
if (NARROW_MODE(ctx)) {
EA = tcg_temp_new();
tcg_gen_ext32u_tl(EA, cpu_gpr[ra]);
} else {
return cpu_gpr[ra];
}
return EA;
}
If you need to modify the resulting EA, then you also need to make a
copy for 0.
Hey, didn't properly get what you meant here.
Did you mean : Since I'm using a tcg_constant for 0, if the EA is to
be modified later, this constant would be an issue, in which case, I
should make a copy for it ??
Yes.
Considering that, there are no tcg level modifications with this EA.
Ok, good.
However, the underlying helper method, which considers this EA as a
target_ulong type does modify it, which I don't think should be an
issue.
Correct, that's fine.
Awesome ! Thanks for the clarification.
Regards,
Chinmay
r~