[subrepo]
remote = https://github.com/pcercuei/gnu_lightning.git
branch = pcsx_rearmed
- commit = ac905ceb09ce479623377733c4b463f1aa3eb99e
- parent = b74a54b1ac0fa605f56411704fb902d7cf17c71a
+ commit = 6f101bf8eccef737d60bf7e6ba85558db49e7908
+ parent = 02dbc8694f303728f19734328166a1c6dfef289c
method = merge
cmdver = 0.4.3
alu_rsh.tst alu_rsh.ok \
alu_com.tst alu_com.ok \
alu_neg.tst alu_neg.ok \
+ movzr.tst movzr.ok \
fop_abs.tst fop_abs.ok \
fop_sqrt.tst fop_sqrt.ok \
varargs.tst varargs.ok \
alu_and alu_or alu_xor \
alu_lsh alu_rsh \
alu_com alu_neg \
+ movzr \
fop_abs fop_sqrt \
varargs stack \
clobber carry call \
alu_and.x87 alu_or.x87 alu_xor.x87 \
alu_lsh.x87 alu_rsh.x87 \
alu_com.x87 alu_neg.x87 \
+ movzr.x87 \
fop_abs.x87 fop_sqrt.x87 \
varargs.x87 stack.x87 \
clobber.x87 carry.x87 call.x87 \
alu_and.x87.nodata alu_or.x87.nodata alu_xor.x87.nodata \
alu_lsh.x87.nodata alu_rsh.x87.nodata \
alu_com.x87.nodata alu_neg.x87.nodata \
+ movzr.x87.nodata \
fop_abs.x87.nodata fop_sqrt.x87.nodata \
varargs.x87.nodata stack.x87.nodata \
clobber.x87.nodata carry.x87.nodata call.x87.nodata \
alu_and.arm alu_or.arm alu_xor.arm \
alu_lsh.arm alu_rsh.arm \
alu_com.arm alu_neg.arm \
+ movzr.arm \
fop_abs.arm fop_sqrt.arm \
varargs.arm stack.arm \
clobber.arm carry.arm call.arm \
alu_and.swf alu_or.swf alu_xor.swf \
alu_lsh.swf alu_rsh.swf \
alu_com.swf alu_neg.swf \
+ movzr.swf \
fop_abs.swf fop_sqrt.swf \
varargs.swf stack.swf \
clobber.swf carry.swf call.swf \
alu_and.arm.swf alu_or.arm.swf alu_xor.arm.swf \
alu_lsh.arm.swf alu_rsh.arm.swf \
alu_com.arm.swf alu_neg.arm.swf \
+ movzr.arm.swf \
fop_abs.arm.swf fop_sqrt.arm.swf \
varargs.arm.swf stack.arm.swf \
clobber.arm.swf carry.arm.swf call.arm.swf \
alu_and.arm4.swf alu_or.arm4.swf alu_xor.arm4.swf \
alu_lsh.arm4.swf alu_rsh.arm4.swf \
alu_com.arm4.swf alu_neg.arm4.swf \
+ movzr.arm4.swf \
fop_abs.arm4.swf fop_sqrt.arm4.swf \
varargs.arm4.swf stack.arm4.swf \
clobber.arm4.swf carry.arm4.swf call.arm4.swf \
alu_and.nodata alu_or.nodata alu_xor.nodata \
alu_lsh.nodata alu_rsh.nodata \
alu_com.nodata alu_neg.nodata \
+ movzr.nodata \
fop_abs.nodata fop_sqrt.nodata \
varargs.nodata stack.nodata \
clobber.nodata carry.nodata call.nodata \
static void htonr_ul(void); static void ntohr_ul(void);
#endif
static void htonr(void); static void ntohr(void);
+static void movnr(void); static void movzr(void);
static void ldr_c(void); static void ldi_c(void);
static void ldr_uc(void); static void ldi_uc(void);
static void ldr_s(void); static void ldi_s(void);
entry(htonr_ul), entry(ntohr_ul),
#endif
entry(htonr), entry(ntohr),
+ entry(movnr), entry(movzr),
entry(ldr_c), entry(ldi_c),
entry(ldr_uc), entry(ldi_uc),
entry(ldr_s), entry(ldi_s),
entry_ir_ir(htonr_ul) entry_ir_ir(ntohr_ul)
#endif
entry_ir_ir(htonr) entry_ir_ir(ntohr)
+entry_ir_ir_ir(movnr) entry_ir_ir_ir(movzr)
entry_ir_ir(ldr_c) entry_ir_pm(ldi_c)
entry_ir_ir(ldr_uc) entry_ir_pm(ldi_uc)
entry_ir_ir(ldr_s) entry_ir_pm(ldi_s)
# define A64_CBNZ 0x35000000
# define A64_B_C 0x54000000
# define A64_CSINC 0x1a800400
+# define A64_CSSEL 0x1a800000
# define A64_REV 0xdac00c00
# define A64_UDIV 0x1ac00800
# define A64_SDIV 0x1ac00c00
# define LDPI_PRE(Rt,Rt2,Rn,Simm7) oxxx7(A64_LDP_PRE|XS,Rt,Rt2,Rn,Simm7)
# define STPI_POS(Rt,Rt2,Rn,Simm7) oxxx7(A64_STP_POS|XS,Rt,Rt2,Rn,Simm7)
# define CSET(Rd,Cc) CSINC(Rd,XZR_REGNO,XZR_REGNO,Cc)
+# define CSEL(Rd,Rn,Rm,Cc) oxxxc(A64_CSSEL|XS,Rd,Rn,Rm,Cc)
# define B(Simm26) o26(A64_B,Simm26)
# define BL(Simm26) o26(A64_BL,Simm26)
# define BR(Rn) o_x_(A64_BR,Rn)
# define rshr_u(r0,r1,r2) LSR(r0,r1,r2)
# define rshi_u(r0,r1,i0) _rshi_u(_jit,r0,r1,i0)
static void _rshi_u(jit_state_t*,jit_int32_t,jit_int32_t,jit_word_t);
+# define movnr(r0,r1,r2) _movnr(_jit,r0,r1,r2)
+static void _movnr(jit_state_t*,jit_int32_t,jit_int32_t,jit_int32_t);
+# define movzr(r0,r1,r2) _movzr(_jit,r0,r1,r2)
+static void _movzr(jit_state_t*,jit_int32_t,jit_int32_t,jit_int32_t);
# define negr(r0,r1) NEG(r0,r1)
# define comr(r0,r1) MVN(r0,r1)
# define andr(r0,r1,r2) AND(r0,r1,r2)
}
}
+static void
+_movnr(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1, jit_int32_t r2)
+{
+ CMPI(r2, 0);
+ CSEL(r0, r0, r1, CC_NE);
+}
+
+static void
+_movzr(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1, jit_int32_t r2)
+{
+ CMPI(r2, 0);
+ CSEL(r0, r0, r1, CC_EQ);
+}
+
static void
_andi(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1, jit_word_t i0)
{
0, /* movi_d_ww */
0, /* movr_d_w */
0, /* movi_d_w */
+ 8, /* movnr */
+ 8, /* movzr */
#endif /* __WORDSIZE */
case_rr(ext, _i);
case_rr(ext, _ui);
case_rr(mov,);
+ case_rrr(movn,);
+ case_rrr(movz,);
case jit_code_movi:
if (node->flag & jit_flag_node) {
temp = node->v.n;
static void _movi(jit_state_t*,jit_int32_t,jit_word_t);
# define movi_p(r0,i0) _movi_p(_jit,r0,i0)
static jit_word_t _movi_p(jit_state_t*,jit_int32_t,jit_word_t);
+# define movnr(r0,r1,r2) _movnr(_jit,r0,r1,r2)
+static void _movnr(jit_state_t*,jit_int32_t,jit_int32_t,jit_int32_t);
+# define movzr(r0,r1,r2) _movzr(_jit,r0,r1,r2)
+static void _movzr(jit_state_t*,jit_int32_t,jit_int32_t,jit_int32_t);
# define comr(r0,r1) _comr(_jit,r0,r1)
static void _comr(jit_state_t*,jit_int32_t,jit_int32_t);
# define negr(r0,r1) _negr(_jit,r0,r1)
return (w);
}
+static void
+_movznr(jit_state_t *_jit, int ct, jit_int32_t r0,
+ jit_int32_t r1, jit_int32_t r2)
+{
+ if (jit_thumb_p()) {
+ if (r2 < 7)
+ T1_CMPI(r2, 0);
+ else
+ T2_CMPI(r2, 0);
+ IT(ct);
+ T1_MOV(r0, r1);
+ } else {
+ CMPI(r2, 0);
+ CC_MOV(ct, r0, r1);
+ }
+}
+
+static void
+_movnr(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1, jit_int32_t r2)
+{
+ _movznr(_jit, ARM_CC_NE, r0, r1, r2);
+}
+
+static void
+_movzr(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1, jit_int32_t r2)
+{
+ _movznr(_jit, ARM_CC_EQ, r0, r1, r2);
+}
+
static void
_comr(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1)
{
12, /* movi_d_ww */
0, /* movr_d_w */
0, /* movi_d_w */
+ 8, /* movnr */
+ 8, /* movzr */
#endif /* __ARM_PCS_VFP */
#endif /* __WORDSIZE */
case_rr(ext, _s);
case_rr(ext, _us);
case_rr(mov,);
+ case_rrr(movn,);
+ case_rrr(movz,);
case jit_code_movi:
if (node->flag & jit_flag_node) {
temp = node->v.n;
static void _movr(jit_state_t*,jit_int32_t,jit_int32_t);
# define movi(r0,i0) _movi(_jit,r0,i0)
static void _movi(jit_state_t*,jit_int32_t,jit_word_t);
+# define movnr(r0,r1,r2) _movnr(_jit,r0,r1,r2)
+static void _movnr(jit_state_t*,jit_int32_t,jit_int32_t,jit_int32_t);
+# define movzr(r0,r1,r2) _movzr(_jit,r0,r1,r2)
+static void _movzr(jit_state_t*,jit_int32_t,jit_int32_t,jit_int32_t);
# define movi_p(r0,i0) _movi_p(_jit,r0,i0)
static jit_word_t _movi_p(jit_state_t*,jit_int32_t,jit_word_t);
# define negr(r0,r1) NEG(r0,r1)
}
}
+static void
+_movnr(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1, jit_int32_t r2)
+{
+ CMPWI(r2, 0);
+ BEQ(8);
+ MR(r0, r1);
+}
+
+static void
+_movzr(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1, jit_int32_t r2)
+{
+ CMPWI(r2, 0);
+ BNE(8);
+ MR(r0, r1);
+}
+
static jit_word_t
_movi_p(jit_state_t *_jit, jit_int32_t r0, jit_word_t i0)
{
0, /* movi_d_ww */
0, /* movr_d_w */
0, /* movi_d_w */
+ 12, /* movnr */
+ 12, /* movzr */
#endif /* _CALL_SYV */
#endif /* __BYTE_ORDER */
#endif /* __powerpc__ */
0, /* movi_d_ww */
0, /* movr_d_w */
0, /* movi_d_w */
+ 12, /* movnr */
+ 12, /* movzr */
#endif /* _CALL_AIX */
#endif /* __BYTEORDER */
#endif /* __powerpc__ */
0, /* movi_d_ww */
0, /* movr_d_w */
0, /* movi_d_w */
+ 12, /* movnr */
+ 12, /* movzr */
#endif /* __BYTEORDER */
#endif /* __powerpc__ */
#endif /* __WORDSIZE */
0, /* movi_d_ww */
0, /* movr_d_w */
0, /* movi_d_w */
+ 12, /* movnr */
+ 12, /* movzr */
#endif /* __BYTE_ORDER */
#endif /* __powerpc__ */
#endif /* __WORDSIZE */
# endif
case_rr(neg,);
case_rr(com,);
+ case_rrr(movn,);
+ case_rrr(movz,);
case_rr(mov,);
case jit_code_movi:
if (node->flag & jit_flag_node) {