Search
lxdream.org :: lxdream/src/sh4/sh4x86.in :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4x86.in
changeset 1006:3a169c224c12
prev1004:eae001858134
next1011:fdd58619b760
author nkeynes
date Tue Apr 07 10:55:03 2009 +0000 (11 years ago)
branchxlat-refactor
permissions -rw-r--r--
last change Commit current work-in-progress to xlat-refactor branch
file annotate diff log raw
1.1 --- a/src/sh4/sh4x86.in Sat Apr 04 10:17:57 2009 +0000
1.2 +++ b/src/sh4/sh4x86.in Tue Apr 07 10:55:03 2009 +0000
1.3 @@ -160,9 +160,6 @@
1.4 #define TSTATE_A X86_COND_A
1.5 #define TSTATE_AE X86_COND_AE
1.6
1.7 -#define MARK_JMP8(x) uint8_t *_mark_jmp_##x = (xlat_output-1)
1.8 -#define JMP_TARGET(x) *_mark_jmp_##x += (xlat_output - _mark_jmp_##x)
1.9 -
1.10 /* Convenience instructions */
1.11 #define LDC_t() CMPB_imms_rbpdisp(1,R_T); CMC()
1.12 #define SETE_t() SETCCB_cc_rbpdisp(X86_COND_E,R_T)
1.13 @@ -174,25 +171,17 @@
1.14 #define SETO_t() SETCCB_cc_rbpdisp(X86_COND_O,R_T)
1.15 #define SETNE_t() SETCCB_cc_rbpdisp(X86_COND_NE,R_T)
1.16 #define SETC_r8(r1) SETCCB_cc_r8(X86_COND_C, r1)
1.17 -#define JAE_label(label) JCC_cc_rel8(X86_COND_AE,-1); MARK_JMP8(label)
1.18 -#define JE_label(label) JCC_cc_rel8(X86_COND_E,-1); MARK_JMP8(label)
1.19 -#define JGE_label(label) JCC_cc_rel8(X86_COND_GE,-1); MARK_JMP8(label)
1.20 -#define JNA_label(label) JCC_cc_rel8(X86_COND_NA,-1); MARK_JMP8(label)
1.21 -#define JNE_label(label) JCC_cc_rel8(X86_COND_NE,-1); MARK_JMP8(label)
1.22 -#define JNO_label(label) JCC_cc_rel8(X86_COND_NO,-1); MARK_JMP8(label)
1.23 -#define JS_label(label) JCC_cc_rel8(X86_COND_S,-1); MARK_JMP8(label)
1.24 -#define JMP_label(label) JMP_rel8(-1); MARK_JMP8(label)
1.25 #define JNE_exc(exc) JCC_cc_rel32(X86_COND_NE,0); sh4_x86_add_backpatch(xlat_output, pc, exc)
1.26
1.27 /** Branch if T is set (either in the current cflags, or in sh4r.t) */
1.28 #define JT_label(label) if( sh4_x86.tstate == TSTATE_NONE ) { \
1.29 CMPL_imms_rbpdisp( 1, R_T ); sh4_x86.tstate = TSTATE_E; } \
1.30 - JCC_cc_rel8(sh4_x86.tstate,-1); MARK_JMP8(label)
1.31 + JCC_cc_rel8(sh4_x86.tstate,-1); _MARK_JMP8(label)
1.32
1.33 /** Branch if T is clear (either in the current cflags or in sh4r.t) */
1.34 #define JF_label(label) if( sh4_x86.tstate == TSTATE_NONE ) { \
1.35 CMPL_imms_rbpdisp( 1, R_T ); sh4_x86.tstate = TSTATE_E; } \
1.36 - JCC_cc_rel8(sh4_x86.tstate^1, -1); MARK_JMP8(label)
1.37 + JCC_cc_rel8(sh4_x86.tstate^1, -1); _MARK_JMP8(label)
1.38
1.39
1.40 #define load_reg(x86reg,sh4reg) MOVL_rbpdisp_r32( REG_OFFSET(r[sh4reg]), x86reg )
.