aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-02-13 17:14:05 -0500
committerAlyssa Rosenzweig <[email protected]>2020-02-16 09:16:50 -0500
commit8ab0bf1f939af480997fafd8bf562644a60df08a (patch)
tree8fe347113fee12ef933d5881d24a935ef9ec7f46 /src/panfrost/midgard
parent6af14d3685fac433193b92f9ad6c9f8a3eaf87ff (diff)
pan/midgard: Use fprintf instead of printf for constants
I was wondering where those constants disappeared to :-) Signed-off-by: Alyssa Rosenzweig <[email protected]> Fixes: 968f36d1fc0 ("pan/midgard: Support disassembling to a file") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
Diffstat (limited to 'src/panfrost/midgard')
-rw-r--r--src/panfrost/midgard/midgard_print.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/panfrost/midgard/midgard_print.c b/src/panfrost/midgard/midgard_print.c
index 94a0f1a6453..e23e7d59817 100644
--- a/src/panfrost/midgard/midgard_print.c
+++ b/src/panfrost/midgard/midgard_print.c
@@ -138,11 +138,11 @@ mir_print_constant_component(FILE *fp, const midgard_constants *consts, unsigned
switch (reg_mode) {
case midgard_reg_mode_64:
if (is_sint) {
- printf("%"PRIi64, consts->i64[c]);
+ fprintf(fp, "%"PRIi64, consts->i64[c]);
} else if (is_uint) {
- printf("%"PRIu64, consts->u64[c]);
+ fprintf(fp, "%"PRIu64, consts->u64[c]);
} else if (is_hex) {
- printf("0x%"PRIX64, consts->u64[c]);
+ fprintf(fp, "0x%"PRIX64, consts->u64[c]);
} else {
double v = consts->f64[c];
@@ -164,7 +164,7 @@ mir_print_constant_component(FILE *fp, const midgard_constants *consts, unsigned
else
v = consts->i32[c];
- printf("%"PRIi64, v);
+ fprintf(fp, "%"PRIi64, v);
} else if (is_uint || is_hex) {
uint64_t v;
@@ -173,14 +173,14 @@ mir_print_constant_component(FILE *fp, const midgard_constants *consts, unsigned
else
v = consts->u32[c];
- printf(is_uint ? "%"PRIu64 : "0x%"PRIX64, v);
+ fprintf(fp, is_uint ? "%"PRIu64 : "0x%"PRIX64, v);
} else {
float v = consts->f32[c];
if (mod & MIDGARD_FLOAT_MOD_ABS) v = fabsf(v);
if (mod & MIDGARD_FLOAT_MOD_NEG) v = -v;
- printf("%g", v);
+ fprintf(fp, "%g", v);
}
break;
@@ -195,7 +195,7 @@ mir_print_constant_component(FILE *fp, const midgard_constants *consts, unsigned
else
v = consts->i16[c];
- printf("%d", v);
+ fprintf(fp, "%d", v);
} else if (is_uint || is_hex) {
uint32_t v;
@@ -204,14 +204,14 @@ mir_print_constant_component(FILE *fp, const midgard_constants *consts, unsigned
else
v = consts->u16[c];
- printf(is_uint ? "%u" : "0x%X", v);
+ fprintf(fp, is_uint ? "%u" : "0x%X", v);
} else {
float v = _mesa_half_to_float(consts->f16[c]);
if (mod & MIDGARD_FLOAT_MOD_ABS) v = fabsf(v);
if (mod & MIDGARD_FLOAT_MOD_NEG) v = -v;
- printf("%g", v);
+ fprintf(fp, "%g", v);
}
break;