tcg/s390x: Implement INDEX_op_lea
Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
1 parent
16aef4431f
commit
0e68878f96
2 files changed
+15
-3
No files matched your search
@@ -77,7 +77,8 @@ tcg_target_sextract_valid(TCGType type, unsigned ofs, unsigned len)
|
||||
}
|
||||
#define TCG_TARGET_sextract_valid tcg_target_sextract_valid
|
||||
|
||||
#define TCG_TARGET_lea_sh_valid(type, sh) 0
|
||||
#define TCG_TARGET_lea_imm_valid(type, imm) 0
|
||||
#define TCG_TARGET_lea_sh_valid(type, sh) ((sh) == 0)
|
||||
#define TCG_TARGET_lea_imm_valid(type, imm) \
|
||||
((imm) >= -0x80000 && (imm) < 0x80000)
|
||||
|
||||
#endif
|
||||
@@ -3187,8 +3187,19 @@ static const TCGOutOpStore outop_st = {
|
||||
.out_r = tcg_out_st,
|
||||
};
|
||||
|
||||
static void tgen_lea(TCGContext *s, TCGType type, TCGReg a0, TCGReg a1,
|
||||
TCGReg a2, unsigned sh, tcg_target_long imm)
|
||||
{
|
||||
if (imm >= 0 && imm < 0x1000) {
|
||||
tcg_out_insn(s, RX, LA, a0, a1, a2, imm);
|
||||
} else {
|
||||
tcg_out_insn(s, RXY, LAY, a0, a1, a2, imm);
|
||||
}
|
||||
}
|
||||
|
||||
static const TCGOutOpLea outop_lea = {
|
||||
.base.static_constraint = C_NotImplemented,
|
||||
.base.static_constraint = C_O1_I2(r, r, r),
|
||||
.out = tgen_lea,
|
||||
};
|
||||
|
||||
static bool tcg_out_dup_vec(TCGContext *s, TCGType type, unsigned vece,
|
||||
|
||||
Reference in new issue
Block a user