This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] m32c sim: mov optimization, sub borrow fix
- From: DJ Delorie <dj at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 26 Jun 2006 16:31:44 -0400
- Subject: [patch] m32c sim: mov optimization, sub borrow fix
Minor fixes. Committed.
2006-06-26 DJ Delorie <dj@redhat.com>
* r8c.opc (decode_r8c): Don't bother reading the destination
before moving a constant into it. Fix borrow comparison for SUB.
Index: r8c.opc
===================================================================
RCS file: /cvs/src/src/sim/m32c/r8c.opc,v
retrieving revision 1.2
diff -p -U3 -r1.2 r8c.opc
--- r8c.opc 14 Mar 2006 03:34:28 -0000 1.2
+++ r8c.opc 26 Jun 2006 20:29:32 -0000
@@ -885,7 +885,7 @@ decode_r8c()
/** 0111 010w 1100 dest MOV.size:G #IMM,dest */
- UNARY_UOP;
+ dc = decode_srcdest4 (dest, w);
imm = IMM(w);
v = imm;
tprintf("%x = %x\n", v, v);
@@ -894,7 +894,7 @@ decode_r8c()
/** 1101 100w immm dest MOV.size:Q #IMM,dest */
- UNARY_SOP;
+ dc = decode_srcdest4 (dest, w);
v = sign_ext (immm, 4);
tprintf ("%x = %x\n", v, v);
set_sz (v, w+1);
@@ -1530,14 +1530,14 @@ decode_r8c()
sc = decode_srcdest4(srcx, w);
dc = decode_srcdest4(dest, w);
b = get_src (sc);
- MATH_OP (dc, b, 0, -, > 0);
+ MATH_OP (dc, b, 0, -, >= 0);
/** 0010 1d sr SUB.B:S src,R0L/R0H */
sc = decode_src2 (sr, 0, d);
dc = decode_dest1 (d, 0);
b = get_src (sc);
- MATH_OP (dc, b, 0, -, > 0);
+ MATH_OP (dc, b, 0, -, >= 0);
/** 0111 011w 0000 dest TST.size #IMM, dest */