<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/src/sh4</tt></b></td></tr>
<tr><td><tt><a href="#file1">sh4x86.in</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+21</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-19</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">a14dbddafd13 -> 904fba59a705</td></tr>
</table>
<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;" >
Improve handling of NAN in fcmp/eq and ftrc
</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>sh4x86.in</b></big> <small id="info" style="color: #888888;" >a14dbddafd13 -> 904fba59a705</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/sh4/sh4x86.in
+++ lxdream/src/sh4/sh4x86.in
@@ -304,18 +304,20 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define JNA_label(label) JCC_cc_rel8(X86_COND_NA,-1); MARK_JMP8(label)
#define JNE_label(label) JCC_cc_rel8(X86_COND_NE,-1); MARK_JMP8(label)
#define JNO_label(label) JCC_cc_rel8(X86_COND_NO,-1); MARK_JMP8(label)
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define JP_label(label) JCC_cc_rel8(X86_COND_P,-1); MARK_JMP8(label)
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define JS_label(label) JCC_cc_rel8(X86_COND_S,-1); MARK_JMP8(label)
#define JMP_label(label) JMP_rel8(-1); MARK_JMP8(label)
#define JNE_exc(exc) JCC_cc_rel32(X86_COND_NE,0); sh4_x86_add_backpatch(xlat_output, pc, exc)
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define LOAD_t() if( sh4_x86.tstate == TSTATE_NONE ) { \
+ CMPL_imms_rbpdisp( 1, R_T ); sh4_x86.tstate = TSTATE_E; }
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > /** Branch if T is set (either in the current cflags, or in sh4r.t) */
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-#define JT_label(label) if( sh4_x86.tstate == TSTATE_NONE ) { \
- CMPL_imms_rbpdisp( 1, R_T ); sh4_x86.tstate = TSTATE_E; } \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define JT_label(label) LOAD_t() \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > JCC_cc_rel8(sh4_x86.tstate,-1); MARK_JMP8(label)
/** Branch if T is clear (either in the current cflags or in sh4r.t) */
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-#define JF_label(label) if( sh4_x86.tstate == TSTATE_NONE ) { \
- CMPL_imms_rbpdisp( 1, R_T ); sh4_x86.tstate = TSTATE_E; } \
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define JF_label(label) LOAD_t() \
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > JCC_cc_rel8(sh4_x86.tstate^1, -1); MARK_JMP8(label)
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -1957,10 +1959,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > sh4_x86.branch_taken = TRUE;
return 2;
} else {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- if( sh4_x86.tstate == TSTATE_NONE ) {
- CMPL_imms_rbpdisp( 1, R_T );
- sh4_x86.tstate = TSTATE_E;
- }
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ LOAD_t();
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > sh4vma_t target = disp + pc + 4;
JCC_cc_rel32(sh4_x86.tstate,0);
uint32_t *patch = ((uint32_t *)xlat_output)-1;
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -2095,10 +2094,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > sh4_x86.branch_taken = TRUE;
return 2;
} else {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- if( sh4_x86.tstate == TSTATE_NONE ) {
- CMPL_imms_rbpdisp( 1, R_T );
- sh4_x86.tstate = TSTATE_E;
- }
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ LOAD_t();
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > JCC_cc_rel32(sh4_x86.tstate^1,0);
uint32_t *patch = ((uint32_t *)xlat_output)-1;
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -2431,14 +2427,15 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > } else {
push_fr( FRm );
}
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ MOVP_immptr_rptr( &min_int, REG_ECX );
+ FILD_r32disp( REG_ECX, 0 );
+ FCOMIP_st(1);
+ JAE_label( sat );
+ JP_label( sat2 );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > MOVP_immptr_rptr( &max_int, REG_ECX );
FILD_r32disp( REG_ECX, 0 );
FCOMIP_st(1);
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- JNA_label( sat );
- MOVP_immptr_rptr( &min_int, REG_ECX );
- FILD_r32disp( REG_ECX, 0 );
- FCOMIP_st(1);
- JAE_label( sat2 );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ JNA_label( sat3 );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > MOVP_immptr_rptr( &save_fcw, REG_EAX );
FNSTCW_r32disp( REG_EAX, 0 );
MOVP_immptr_rptr( &trunc_fcw, REG_EDX );
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -2449,6 +2446,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >
JMP_TARGET(sat);
JMP_TARGET(sat2);
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ JMP_TARGET(sat3);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > MOVL_r32disp_r32( REG_ECX, 0, REG_ECX ); // 2
MOVL_r32_rbpdisp( REG_ECX, R_FPUL );
FPOP_st();
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -2626,10 +2624,14 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > push_fr(FRm);
push_fr(FRn);
}
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ XORL_r32_r32(REG_EAX, REG_EAX);
+ XORL_r32_r32(REG_EDX, REG_EDX);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > FCOMIP_st(1);
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- SETE_t();
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ SETCCB_cc_r8(X86_COND_NP, REG_DL);
+ CMOVCCL_cc_r32_r32(X86_COND_E, REG_EDX, REG_EAX);
+ MOVL_r32_rbpdisp(REG_EAX, R_T);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > FPOP_st();
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- sh4_x86.tstate = TSTATE_E;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ sh4_x86.tstate = TSTATE_<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >NON</span>E;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > :}
FCMP/GT FRm, FRn {:
COUNT_INST(I_FCMPGT);
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>