From 1cb210f4bc412a9c1fef12e05ea9d9fe8995f4d5 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 2 Nov 2017 18:29:03 -0700 Subject: [PATCH] intel/reg: Add helpers for 64-bit integer immediates MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Samuel Iglesias Gonsálvez --- src/intel/compiler/brw_reg.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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) -- 2.30.2