aboutsummaryrefslogtreecommitdiff
path: root/cpu/m32c.opc
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/m32c.opc')
-rw-r--r--cpu/m32c.opc18
1 files changed, 18 insertions, 0 deletions
diff --git a/cpu/m32c.opc b/cpu/m32c.opc
index 6235326..f664e9a 100644
--- a/cpu/m32c.opc
+++ b/cpu/m32c.opc
@@ -534,6 +534,24 @@ parse_imm3_S (CGEN_CPU_DESC cd, const char **strp,
}
static const char *
+parse_bit3_S (CGEN_CPU_DESC cd, const char **strp,
+ int opindex, signed long *valuep)
+{
+ const char *errmsg = 0;
+ signed long value;
+
+ errmsg = cgen_parse_signed_integer (cd, strp, opindex, & value);
+ if (errmsg)
+ return errmsg;
+
+ if (value < 0 || value > 7)
+ return _("immediate is out of range 0-7");
+
+ *valuep = value;
+ return 0;
+}
+
+static const char *
parse_lab_5_3 (CGEN_CPU_DESC cd,
const char **strp,
int opindex ATTRIBUTE_UNUSED,