From 7cc70cd5e806b22a73d1e64005f3246e75d2c111 Mon Sep 17 00:00:00 2001 From: alex-bellon Date: Fri, 17 Jun 2022 17:11:39 -0700 Subject: [PATCH] Added DYNAMIC flag to toString for OperandType --- .../ghidra/program/model/lang/OperandType.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/OperandType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/OperandType.java index 75fe4c01ed..9ed542cf73 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/OperandType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/OperandType.java @@ -341,6 +341,16 @@ public final class OperandType { public static boolean isCoProcessor(int operandType) { return (operandType & COP) != 0; } + + /** + * check the DYNAMIC flag. + * @param operandType the bit field to examine. + * + * @return true if the DYNAMIC flag is set. + */ + public static boolean isDynamic(int operandType) { + return (operandType & DYNAMIC) != 0; + } /** * check if both a scalar and an address @@ -458,6 +468,10 @@ public final class OperandType { append(buf, "COP "); } + if (isDynamic(operandType)) { + append(buf, "DYN "); + } + return buf.toString(); }