mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-18 15:42:09 -06:00
tcg/optimize: Introduce const value accessors for TempOptInfo
Introduce ti_is_const, ti_const_val, ti_is_const_val. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
f3ed3cffb9
commit
e1b6c141e9
1 changed files with 17 additions and 3 deletions
|
@ -79,15 +79,29 @@ static inline TempOptInfo *arg_info(TCGArg arg)
|
||||||
return ts_info(arg_temp(arg));
|
return ts_info(arg_temp(arg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool ti_is_const(TempOptInfo *ti)
|
||||||
|
{
|
||||||
|
return ti->is_const;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline uint64_t ti_const_val(TempOptInfo *ti)
|
||||||
|
{
|
||||||
|
return ti->val;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool ti_is_const_val(TempOptInfo *ti, uint64_t val)
|
||||||
|
{
|
||||||
|
return ti_is_const(ti) && ti_const_val(ti) == val;
|
||||||
|
}
|
||||||
|
|
||||||
static inline bool ts_is_const(TCGTemp *ts)
|
static inline bool ts_is_const(TCGTemp *ts)
|
||||||
{
|
{
|
||||||
return ts_info(ts)->is_const;
|
return ti_is_const(ts_info(ts));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool ts_is_const_val(TCGTemp *ts, uint64_t val)
|
static inline bool ts_is_const_val(TCGTemp *ts, uint64_t val)
|
||||||
{
|
{
|
||||||
TempOptInfo *ti = ts_info(ts);
|
return ti_is_const_val(ts_info(ts), val);
|
||||||
return ti->is_const && ti->val == val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool arg_is_const(TCGArg arg)
|
static inline bool arg_is_const(TCGArg arg)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue