diff options
author | Jason Ekstrand <[email protected]> | 2017-11-02 18:29:03 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-11-07 10:41:24 -0800 |
commit | 1cb210f4bc412a9c1fef12e05ea9d9fe8995f4d5 (patch) | |
tree | 854724c855533709445c5fb9920eaa2325f8a91d | |
parent | df81b81fb91f45e6da0c504ee672d45829c41d06 (diff) |
intel/reg: Add helpers for 64-bit integer immediates
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
-rw-r--r-- | src/intel/compiler/brw_reg.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_reg.h b/src/intel/compiler/brw_reg.h index 9d63717fb45..ec1045b612a 100644 --- a/src/intel/compiler/brw_reg.h +++ b/src/intel/compiler/brw_reg.h @@ -597,6 +597,24 @@ brw_imm_f(float f) return imm; } +/** Construct int64_t immediate register */ +static inline struct brw_reg +brw_imm_q(int64_t q) +{ + struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_Q); + imm.d64 = q; + return imm; +} + +/** Construct int64_t immediate register */ +static inline struct brw_reg +brw_imm_uq(uint64_t uq) +{ + struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_UQ); + imm.u64 = uq; + return imm; +} + /** Construct integer immediate register */ static inline struct brw_reg brw_imm_d(int d) |