<html>
<body>
  <div id="body" style="background-color:#ffffff;" >
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head" style="border-bottom-width:1px;border-bottom-style:solid;" ><td class="headtd" style="padding:0;padding-top:.2em;" colspan="4">Commit in <b><tt>lxdream</tt></b></td></tr>
<tr><td><tt>src/sh4/<a href="#file1">sh4core.in</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+5</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-1</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">852fc1db460a -> 34895c8bab20</td></tr>
<tr class="alt" style=";" ><td><tt>test/<a href="#file2">Makefile.in</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+1</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-1</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">852fc1db460a -> 34895c8bab20</td></tr>
<tr><td><tt>test/sh4/<a href="#file3"><span id="added" style="background-color:#ddffdd;" >subv.s</span></a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+106</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" align="right" nowrap="nowrap">added 34895c8bab20</td></tr>
<tr class="alt" style=";" ><td><tt>        /<a href="#file4">testsh4.c</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+1</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-3</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">852fc1db460a -> 34895c8bab20</td></tr>
<tr><td></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+113</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-5</td><td></td></tr>
</table>
<small id="info" style="color: #888888;" >1 added + 3 modified, total 4 files</small><br />
<pre class="comment" style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd;" >
Add missing SUBV instruction to the emulation core (translation core is ok),
along with test cases. Thanks to D. Jeff Dionne for pointing this out.
</pre>
<hr /><a name="file1" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/sh4</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>sh4core.in</b></big> <small id="info" style="color: #888888;" >852fc1db460a -> 34895c8bab20</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/sh4/sh4core.in
+++ lxdream/src/sh4/sh4core.in
@@ -747,7 +747,11 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     sh4r.r[Rn] = sh4r.r[Rn] - sh4r.r[Rm] - sh4r.t;
     sh4r.t = (sh4r.r[Rn] > tmp || (sh4r.r[Rn] == tmp && sh4r.t == 1));
 :}
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+SUBV Rm, Rn {:
+    tmp = sh4r.r[Rn] - sh4r.r[Rm];
+    sh4r.t = ( (sh4r.r[Rn]>>31) != (sh4r.r[Rm]>>31) && ((sh4r.r[Rn]>>31) != (tmp>>31)) );
+    sh4r.r[Rn] = tmp;
+:}
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > BRAF Rn {:
      CHECKSLOTILLEGAL();
      CHECKDEST( pc + 4 + sh4r.r[Rn] );
</pre></div>
<hr /><a name="file2" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/test</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>Makefile.in</b></big> <small id="info" style="color: #888888;" >852fc1db460a -> 34895c8bab20</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/test/Makefile.in
+++ lxdream/test/Makefile.in
@@ -96,7 +96,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >       sh4/bf.so sh4/bsr.so sh4/bt.so sh4/cmp.so sh4/cmpstr.so \
         sh4/div0.so sh4/div1.so sh4/float.so sh4/fmov.so sh4/ftrc.so \
         sh4/ldc.so sh4/mac.so \
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    sh4/rot.so sh4/shl.so sh4/shld.so sh4/sub.so sh4/subc.so \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+      sh4/rot.so sh4/shl.so sh4/shld.so sh4/sub.so sh4/subc.so <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >sh4/subv.so </span>\
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     sh4/trapa.so sh4/tas.so sh4/xtrct.so \
         sh4/excslot.so sh4/undef.so sh4/tlb.so sh4/vmexit.so
        $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
</pre></div>
<hr /><a name="file3" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span id="added" class="pathname" style="font-family:monospace; float:right; background-color:#ddffdd;" >lxdream/test/sh4</span><br />
<div id="added" class="fileheader" style="margin-bottom:.5em; background-color:#ddffdd;" ><big><b>subv.s</b></big> <small id="info" style="color: #888888;" >added at 34895c8bab20</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/test/sh4/subv.s
+++ lxdream/test/sh4/subv.s
@@ -0,0 +1,106 @@
</small></pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+.section .text
+.include "sh4/inc.s"
+
+.global _test_subv
+_test_subv:
+       start_test
+       mov.l r11, @-r15
+       mov.l test_subv_data_k, r11
+       
+test_subv_loop:
+       mov.l test_subv_data_end_k, r4
+       cmp/eq r11, r4
+       bt test_subv_end
+       add #1, r12
+
+       clc
+       mov.l @r11+, r0
+       mov.l @r11+, r1
+       subv r0, r1
+       stc sr, r4
+       mov.l @r11+, r2
+       mov.l @r11+, r3
+       cmp/eq r1, r2
+       bt test_subv_b
+       fail test_subv_str_k
+       bra test_subv_loop
+       nop
+test_subv_b:
+       ldc r4, sr
+       xor r0, r0
+       add #1, r0
+       and r0, r4
+       cmp/eq r3, r4
+       bt test_subv_loop
+       fail test_subv_str_k
+       bra test_subv_loop
+       nop
+
+test_subv_end:
+       mov.l @r15+, r11
+       end_test test_subv_str_k
+
+       .align 4        
+test_subv_data_k:
+       .long test_subv_data
+test_subv_data:
+test_subv_data_1:
+       .long 0x00000000
+       .long 0x00000000
+       .long 0x00000000
+       .long 0x00000000
+
+       .long 0x0000000F
+       .long 0x7FFFFFFF
+       .long 0x7FFFFFF0
+       .long 0x00000000
+       
+       .long 0x0000000F
+       .long 0xFFFFFFFF
+       .long 0xFFFFFFF0
+       .long 0x00000000
+
+       .long 0xFFFFFFF0
+       .long 0xFFFFFFE0
+       .long 0xFFFFFFF0
+       .long 0x00000000
+
+       .long 0x00000040
+       .long 0x00000020
+       .long 0xFFFFFFE0
+       .long 0x00000000
+
+       .long 0xFFFFFF80
+       .long 0xFFFFFFB2
+       .long 0x00000032
+       .long 0x00000000
+
+       .long 0x00000001
+       .long 0x80000000
+       .long 0x7FFFFFFF
+       .long 0x00000001
+
+       .long 0xFFFFFFFF
+       .long 0x7FFFFFFF
+       .long 0x80000000
+       .long 0x00000001
+
+       .long 0x98765432
+       .long 0x30ECA864
+       .long 0x98765432
+       .long 0x00000001
+
+       .long 0x43214321
+       .long 0x86428642
+       .long 0x43214321
+       .long 0x00000001
+       
+test_subv_data_end:    
+       .align 4
+test_subv_data_end_k:
+       .long test_subv_data_end        
+test_subv_str_k:
+       .long test_subv_str
+test_subv_str:
+       .string "SUBV"
+       
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >\ No newline at end of file
</small></pre></div>
<hr /><a name="file4" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/test/sh4</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>testsh4.c</b></big> <small id="info" style="color: #888888;" >852fc1db460a -> 34895c8bab20</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/test/sh4/testsh4.c
+++ lxdream/test/sh4/testsh4.c
@@ -14,9 +14,6 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 void test_print_failure( char *testname, int number, char *message )
 {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    fprintf( stderr, "Fail" );
-    fprintf( stderr, testname );
-    
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     if( message == NULL ) {
        fprintf( stderr, "%s: Test %d failed!\n", testname, number );
     } else {
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -95,6 +92,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     test_shld();
     test_sub();
     test_subc();
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    test_subv();
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     test_trapa();
     test_tas();
     test_xtrct();
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>