[otbn] Fix disassembly of negative PC-relative immediates
Without this change, you get things like ".+-10". Now it's just
".-10" (conveniently, we already had the code to do this for ISA doc
generation)
Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
diff --git a/hw/ip/otbn/util/shared/operand.py b/hw/ip/otbn/util/shared/operand.py
index 97109a1..a19b650 100644
--- a/hw/ip/otbn/util/shared/operand.py
+++ b/hw/ip/otbn/util/shared/operand.py
@@ -388,7 +388,7 @@
#
# The other time this is used is objdump, where either version
# works fine.
- return '.+{}'.format(op_val - cur_pc)
+ return ImmOperandType._doc_rel_to_abs(op_val - cur_pc)
else:
return str(op_val)