[Beignet] [PATCH] Re-format the asm print for long imm
junyan.he at inbox.com
junyan.he at inbox.com
Thu Jan 29 03:24:54 PST 2015
From: Junyan He <junyan.he at linux.intel.com>
Use decimal to print signed long and use hex to print
unsigned long, which make the format more clear.
Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
backend/src/backend/gen/gen_mesa_disasm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/backend/src/backend/gen/gen_mesa_disasm.c b/backend/src/backend/gen/gen_mesa_disasm.c
index 640c0fe..e6a2c6b 100644
--- a/backend/src/backend/gen/gen_mesa_disasm.c
+++ b/backend/src/backend/gen/gen_mesa_disasm.c
@@ -989,17 +989,17 @@ static int imm(FILE *file, uint32_t type, const void* inst)
case GEN_TYPE_F:
format(file, "%-gF", GEN_BITS_FIELD(inst, bits3.f));
break;
- case GEN_TYPE_L:
+ case GEN_TYPE_UL:
assert(!(gen_version < 80));
- format(file, "0x%.8x %.8xQ", (((const union Gen8NativeInstruction *)inst)->bits3).ud,
+ format(file, "0x%.8x %.8xUQ", (((const union Gen8NativeInstruction *)inst)->bits3).ud,
(((const union Gen8NativeInstruction *)inst)->bits2).ud);
break;
- case GEN_TYPE_UL:
+ case GEN_TYPE_L:
{
assert(!(gen_version < 80));
uint64_t val = (((const union Gen8NativeInstruction *)inst)->bits3).ud;
val = (val << 32) + ((((const union Gen8NativeInstruction *)inst)->bits2).ud);
- format(file, "0x%luUQ", val);
+ format(file, "0x%ldQ", val);
}
}
return 0;
--
1.9.1
More information about the Beignet
mailing list