aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-04-30 17:31:38 -0400
committerMarge Bot <[email protected]>2020-05-01 00:27:23 +0000
commitf1f4f1b816ae4fe6ca0ce96af24f949363ed7715 (patch)
tree486276e0954cf843866ede338378bfc02a5ee936
parent130a3fba1c744dce5c052840b4f78437d4c73bf8 (diff)
pan/bit: Add framework forinterpreting double vs float
Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844>
-rw-r--r--src/panfrost/bifrost/test/bi_interpret.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/panfrost/bifrost/test/bi_interpret.c b/src/panfrost/bifrost/test/bi_interpret.c
index eaa3327430c..f858b812d95 100644
--- a/src/panfrost/bifrost/test/bi_interpret.c
+++ b/src/panfrost/bifrost/test/bi_interpret.c
@@ -140,18 +140,21 @@ bit_write(struct bit_state *s, unsigned index, nir_alu_type T, bit_t value, bool
bint(bit_i64 ## name, bit_i32 ## name, bit_i16 ## name, bit_i8 ## name); \
unreachable("Invalid type");
-#define bit_make_float(name, expr) \
+#define bit_make_float_2(name, expr32, expr64) \
static inline double \
bit_f64 ## name(double a, double b, double c, double d) \
{ \
- return expr; \
+ return expr64; \
} \
static inline float \
bit_f32 ## name(float a, float b, float c, float d) \
{ \
- return expr; \
+ return expr32; \
} \
+#define bit_make_float(name, expr) \
+ bit_make_float_2(name, expr, expr)
+
#define bit_make_int(name, expr) \
static inline int64_t \
bit_i64 ## name (int64_t a, int64_t b, int64_t c, int64_t d) \