From 77ee7339f8efaa983bdff4f0a645f31c54714065 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Thu, 7 Sep 2023 22:08:47 +0300 Subject: [PATCH] libsvp64: support FPR operands --- src/libsvp64/codegen.py | 4 ++++ src/libsvp64/svp64.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/libsvp64/codegen.py b/src/libsvp64/codegen.py index bbf32d6c..f41e244c 100644 --- a/src/libsvp64/codegen.py +++ b/src/libsvp64/codegen.py @@ -304,9 +304,13 @@ class DisGenSource(Source): def gpr_handler(span): yield from generic_handler(span, "SVP64_OPERAND_GPR") + def fpr_handler(span): + yield from generic_handler(span, "SVP64_OPERAND_FPR") + handlers = { insndb.SignedOperand: signed_handler, insndb.GPROperand: gpr_handler, + insndb.GPROperand: fpr_handler, } self.emit(f"case 0x{(path + 1):02x}: /* {', '.join(node.names)} */") with self: diff --git a/src/libsvp64/svp64.h b/src/libsvp64/svp64.h index 023bc612..7b502024 100644 --- a/src/libsvp64/svp64.h +++ b/src/libsvp64/svp64.h @@ -34,6 +34,7 @@ struct svp64_operand { #define SVP64_OPERAND_SIGNED (UINT32_C(1) << UINT32_C(0)) #define SVP64_OPERAND_GPR (UINT32_C(1) << UINT32_C(1)) +#define SVP64_OPERAND_FPR (UINT32_C(1) << UINT32_C(2)) struct svp64_ctx { struct svp64_record const *record; -- 2.30.2