shil/param: add imm_value()

This commit is contained in:
Stefanos Kornilios Mitsis Poiitidis 2015-07-23 02:05:07 +02:00
parent 5b92793c42
commit 67a8ceabdd
1 changed files with 3 additions and 1 deletions

View File

@ -118,9 +118,11 @@ struct shil_param
bool is_imm_u16() const { return is_imm() && is_u16(_imm); }
u32* reg_ptr() const { verify(is_reg()); return GetRegPtr(_reg); }
s32 reg_nofs() const { verify(is_reg()); return (u8*)GetRegPtr(_reg) - (u8*)GetRegPtr(reg_xf_0)-sizeof(Sh4cntx); }
s32 reg_nofs() const { verify(is_reg()); return (s32)((u8*)GetRegPtr(_reg) - (u8*)GetRegPtr(reg_xf_0)-sizeof(Sh4cntx)); }
u32 reg_aofs() const { return -reg_nofs(); }
u32 imm_value() { verify(is_imm()); return _imm; }
bool is_vector() const { return type>=FMT_VECTOR_BASE; }
u32 count() const { return type==FMT_F64?2:type==FMT_V2?2: