i965/fs: Add is_null() method to fs_reg.
Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Paul Berry <stereotype441@gmail.com>
This commit is contained in:
parent
8dfc9f038e
commit
f768f998e0
|
@ -466,6 +466,14 @@ fs_reg::is_one() const
|
|||
return type == BRW_REGISTER_TYPE_F ? imm.f == 1.0 : imm.i == 1;
|
||||
}
|
||||
|
||||
bool
|
||||
fs_reg::is_null() const
|
||||
{
|
||||
return file == HW_REG &&
|
||||
fixed_hw_reg.file == BRW_ARCHITECTURE_REGISTER_FILE &&
|
||||
fixed_hw_reg.nr == BRW_ARF_NULL;
|
||||
}
|
||||
|
||||
bool
|
||||
fs_reg::is_valid_3src() const
|
||||
{
|
||||
|
|
|
@ -77,6 +77,7 @@ public:
|
|||
bool equals(const fs_reg &r) const;
|
||||
bool is_zero() const;
|
||||
bool is_one() const;
|
||||
bool is_null() const;
|
||||
bool is_valid_3src() const;
|
||||
fs_reg retype(uint32_t type);
|
||||
|
||||
|
|
Loading…
Reference in New Issue