Revision: 1455
http://vcs.pcre.org/viewvc?view=rev&revision=1455
Author: zherczeg
Date: 2014-02-10 08:59:31 +0000 (Mon, 10 Feb 2014)
Log Message:
-----------
JIT compiler update.
Modified Paths:
--------------
code/trunk/sljit/sljitNativeARM_64.c
code/trunk/sljit/sljitNativeX86_common.c
Modified: code/trunk/sljit/sljitNativeARM_64.c
===================================================================
--- code/trunk/sljit/sljitNativeARM_64.c 2014-02-09 18:55:03 UTC (rev 1454)
+++ code/trunk/sljit/sljitNativeARM_64.c 2014-02-10 08:59:31 UTC (rev 1455)
@@ -108,11 +108,11 @@
#define SMADDL 0x9b200000
#define SMULH 0x9b403c00
#define STP 0xa9000000
+#define STP_PRE 0xa9800000
#define STRI 0xf9000000
-#define STR_F 0x3d000000
+#define STR_FI 0x3d000000
#define STR_FR 0x3c206800
-#define STP_PRE 0xa9800000
-#define STUR_F 0x3c000000
+#define STUR_FI 0x3c000000
#define SUB 0xcb000000
#define SUBI 0xd1000000
#define SUBS 0xeb000000
@@ -1461,16 +1461,16 @@
arg &= REG_MASK;
if (arg && argw >= 0 && ((argw >> shift) <= 0xfff) && (argw & ((1 << shift) - 1)) == 0)
- return push_inst(compiler, STR_F | ins_bits | VT(reg) | RN(arg) | (argw << (10 - shift)));
+ return push_inst(compiler, STR_FI | ins_bits | VT(reg) | RN(arg) | (argw << (10 - shift)));
if (arg && argw <= 255 && argw >= -256)
- return push_inst(compiler, STUR_F | ins_bits | VT(reg) | RN(arg) | ((argw & 0x1ff) << 12));
+ return push_inst(compiler, STUR_FI | ins_bits | VT(reg) | RN(arg) | ((argw & 0x1ff) << 12));
/* Slow cases */
if (compiler->cache_arg == SLJIT_MEM && argw != compiler->cache_argw) {
diff = argw - compiler->cache_argw;
if (!arg && diff <= 255 && diff >= -256)
- return push_inst(compiler, STUR_F | ins_bits | VT(reg) | RN(TMP_REG3) | ((diff & 0x1ff) << 12));
+ return push_inst(compiler, STUR_FI | ins_bits | VT(reg) | RN(TMP_REG3) | ((diff & 0x1ff) << 12));
if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, argw - compiler->cache_argw) != SLJIT_ERR_UNSUPPORTED) {
FAIL_IF(compiler->error);
compiler->cache_argw = argw;
@@ -1485,7 +1485,7 @@
if (arg & REG_MASK)
return push_inst(compiler, STR_FR | ins_bits | VT(reg) | RN(arg) | RM(TMP_REG3));
- return push_inst(compiler, STR_F | ins_bits | VT(reg) | RN(TMP_REG3));
+ return push_inst(compiler, STR_FI | ins_bits | VT(reg) | RN(TMP_REG3));
}
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op,
Modified: code/trunk/sljit/sljitNativeX86_common.c
===================================================================
--- code/trunk/sljit/sljitNativeX86_common.c 2014-02-09 18:55:03 UTC (rev 1454)
+++ code/trunk/sljit/sljitNativeX86_common.c 2014-02-10 08:59:31 UTC (rev 1455)
@@ -118,8 +118,8 @@
#define REX_B 0x41
#define REX 0x40
-#define IS_HALFWORD(x) ((x) <= 0x7fffffffll && (x) >= -0x80000000ll)
-#define NOT_HALFWORD(x) ((x) > 0x7fffffffll || (x) < -0x80000000ll)
+#define IS_HALFWORD(x) ((x) <= 0x7fffffffl && (x) >= -0x80000000l)
+#define NOT_HALFWORD(x) ((x) > 0x7fffffffl || (x) < -0x80000000l)
#define CHECK_EXTRA_REGS(p, w, do)
@@ -397,7 +397,7 @@
short_jump = (sljit_sw)(label_addr - (jump->addr + 2)) >= -128 && (sljit_sw)(label_addr - (jump->addr + 2)) <= 127;
#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if ((sljit_sw)(label_addr - (jump->addr + 1)) > 0x7fffffffll || (sljit_sw)(label_addr - (jump->addr + 1)) < -0x80000000ll)
+ if ((sljit_sw)(label_addr - (jump->addr + 1)) > 0x7fffffffl || (sljit_sw)(label_addr - (jump->addr + 1)) < -0x80000000l)
return generate_far_jump_code(jump, code_ptr, type);
#endif
@@ -526,7 +526,7 @@
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
*(sljit_sw*)jump->addr = (sljit_sw)(jump->u.label->addr - (jump->addr + sizeof(sljit_sw)));
#else
- SLJIT_ASSERT((sljit_sw)(jump->u.label->addr - (jump->addr + sizeof(sljit_si))) >= -0x80000000ll && (sljit_sw)(jump->u.label->addr - (jump->addr + sizeof(sljit_si))) <= 0x7fffffffll);
+ SLJIT_ASSERT((sljit_sw)(jump->u.label->addr - (jump->addr + sizeof(sljit_si))) >= -0x80000000l && (sljit_sw)(jump->u.label->addr - (jump->addr + sizeof(sljit_si))) <= 0x7fffffffl);
*(sljit_si*)jump->addr = (sljit_si)(jump->u.label->addr - (jump->addr + sizeof(sljit_si)));
#endif
}
@@ -534,7 +534,7 @@
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
*(sljit_sw*)jump->addr = (sljit_sw)(jump->u.target - (jump->addr + sizeof(sljit_sw)));
#else
- SLJIT_ASSERT((sljit_sw)(jump->u.target - (jump->addr + sizeof(sljit_si))) >= -0x80000000ll && (sljit_sw)(jump->u.target - (jump->addr + sizeof(sljit_si))) <= 0x7fffffffll);
+ SLJIT_ASSERT((sljit_sw)(jump->u.target - (jump->addr + sizeof(sljit_si))) >= -0x80000000l && (sljit_sw)(jump->u.target - (jump->addr + sizeof(sljit_si))) <= 0x7fffffffl);
*(sljit_si*)jump->addr = (sljit_si)(jump->u.target - (jump->addr + sizeof(sljit_si)));
#endif
}