summaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-02-24 23:58:52 +0000
committerNick Clifton <nickc@redhat.com>2000-02-24 23:58:52 +0000
commit8d517a40e7dfd20c971f9c0597b0990702fd1225 (patch)
treea5fe65651e23655d1e73137d80421ed17f78b299 /opcodes
parentcb2ab3671fd684c08ed941b19e5492ba0cbfaab7 (diff)
downloadgdb-8d517a40e7dfd20c971f9c0597b0990702fd1225.tar.gz
Add functions to modify/examine the signed_overflow_ok_p field in cpu_desc.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog6
-rw-r--r--opcodes/cgen-opc.c26
2 files changed, 31 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 9726b03de93..a4355894171 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,9 @@
+2000-02-24 Nick Clifton <nickc@cygnus.com>
+
+ * cgen-opc.c (cgen_set_signed_overflow_ok): New function.
+ (cgen_clear_signed_overflow_ok): New function.
+ (cgen_signed_overflow_ok_p): New function.
+
2000-02-23 Andrew Haley <aph@cygnus.com>
* m32r-asm.c, m32r-desc.c, m32r-desc.h, m32r-dis.c,
diff --git a/opcodes/cgen-opc.c b/opcodes/cgen-opc.c
index 56840a6a6f9..ede3adde115 100644
--- a/opcodes/cgen-opc.c
+++ b/opcodes/cgen-opc.c
@@ -1,6 +1,6 @@
/* CGEN generic opcode support.
- Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU Binutils and GDB, the GNU debugger.
@@ -595,3 +595,27 @@ cgen_lookup_get_insn_operands (cd, insn, insn_int_value, insn_bytes_value,
cgen_get_insn_operands (cd, insn, fields, indices);
return insn;
}
+
+/* Allow signed overflow of instruction fields. */
+void
+cgen_set_signed_overflow_ok (cd)
+ CGEN_CPU_DESC cd;
+{
+ cd->signed_overflow_ok_p = 1;
+}
+
+/* Generate an error message if a signed field in an instruction overflows. */
+void
+cgen_clear_signed_overflow_ok (cd)
+ CGEN_CPU_DESC cd;
+{
+ cd->signed_overflow_ok_p = 0;
+}
+
+/* Will an error message be generated if a signed field in an instruction overflows ? */
+unsigned int
+cgen_signed_overflow_ok_p (cd)
+ CGEN_CPU_DESC cd;
+{
+ return cd->signed_overflow_ok_p;
+}