diff options
author | zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-10-31 06:10:14 +0000 |
---|---|---|
committer | zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-10-31 06:10:14 +0000 |
commit | a29ff98c9e8af311491720b4b61281ee707dafc2 (patch) | |
tree | 96f2cce4e694baf7cb26309ac8ab468db41da204 /sljit/sljitNativeX86_common.c | |
parent | adb232d7233c9a3e8d4bde718215395f937e8fb2 (diff) | |
download | pcre-a29ff98c9e8af311491720b4b61281ee707dafc2.tar.gz |
Updating the JIT compiler
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@740 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'sljit/sljitNativeX86_common.c')
-rw-r--r-- | sljit/sljitNativeX86_common.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/sljit/sljitNativeX86_common.c b/sljit/sljitNativeX86_common.c index f86546e..c6661bc 100644 --- a/sljit/sljitNativeX86_common.c +++ b/sljit/sljitNativeX86_common.c @@ -24,7 +24,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -SLJIT_CONST char* sljit_get_platform_name() +SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name() { #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) return "x86-32"; @@ -275,7 +275,7 @@ static sljit_ub* generate_near_jump_code(struct sljit_jump *jump, sljit_ub *code return code_ptr; } -void* sljit_generate_code(struct sljit_compiler *compiler) +SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler) { struct sljit_memory_fragment *buf; sljit_ub *code; @@ -473,7 +473,7 @@ static void SLJIT_CALL sljit_touch_stack(sljit_w local_size) #include "sljitNativeX86_64.c" #endif -int sljit_emit_op0(struct sljit_compiler *compiler, int op) +SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op0(struct sljit_compiler *compiler, int op) { sljit_ub *buf; @@ -927,7 +927,7 @@ static int emit_clz(struct sljit_compiler *compiler, int op, return SLJIT_SUCCESS; } -int sljit_emit_op1(struct sljit_compiler *compiler, int op, +SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op1(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int src, sljit_w srcw) { @@ -955,7 +955,7 @@ int sljit_emit_op1(struct sljit_compiler *compiler, int op, compiler->mode32 = 0; #endif - SLJIT_ASSERT(SLJIT_MOV + 7 == SLJIT_MOVU); + SLJIT_COMPILE_ASSERT(SLJIT_MOV + 7 == SLJIT_MOVU, movu_offset); if (op >= SLJIT_MOVU) { update = 1; op -= 7; @@ -1418,7 +1418,7 @@ static int emit_mul(struct sljit_compiler *compiler, } else { /* Neither argument is immediate. */ - if (depends_on(src2, dst_r)) + if (ADDRESSING_DEPENDS_ON(src2, dst_r)) dst_r = TMP_REGISTER; EMIT_MOV(compiler, dst_r, 0, src1, src1w); code = emit_x86_instruction(compiler, 2, dst_r, 0, src2, src2w); @@ -1706,7 +1706,7 @@ static int emit_shift(struct sljit_compiler *compiler, *code |= mode; EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, TMP_REGISTER, 0); } - else if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS && dst != src2 && !depends_on(src2, dst)) { + else if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS && dst != src2 && !ADDRESSING_DEPENDS_ON(src2, dst)) { if (src1 != dst) EMIT_MOV(compiler, dst, 0, src1, src1w); EMIT_MOV(compiler, TMP_REGISTER, 0, SLJIT_PREF_SHIFT_REG, 0); @@ -1744,7 +1744,7 @@ static int emit_shift(struct sljit_compiler *compiler, return SLJIT_SUCCESS; } -int sljit_emit_op2(struct sljit_compiler *compiler, int op, +SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op2(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int src1, sljit_w src1w, int src2, sljit_w src2w) @@ -1893,7 +1893,7 @@ static void init_compiler() #endif -int sljit_is_fpu_available(void) +SLJIT_API_FUNC_ATTRIBUTE int sljit_is_fpu_available(void) { /* Always available. */ return 1; @@ -1938,7 +1938,7 @@ static SLJIT_INLINE int emit_sse2_store(struct sljit_compiler *compiler, } #if !(defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO) -int sljit_emit_fop1(struct sljit_compiler *compiler, int op, +SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op, #else static int sljit_emit_sse2_fop1(struct sljit_compiler *compiler, int op, #endif @@ -2000,7 +2000,7 @@ static int sljit_emit_sse2_fop1(struct sljit_compiler *compiler, int op, } #if !(defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO) -int sljit_emit_fop2(struct sljit_compiler *compiler, int op, +SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op, #else static int sljit_emit_sse2_fop2(struct sljit_compiler *compiler, int op, #endif @@ -2123,7 +2123,7 @@ static int emit_fop_regs(struct sljit_compiler *compiler, } #if !(defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO) -int sljit_emit_fop1(struct sljit_compiler *compiler, int op, +SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op, #else static int sljit_emit_fpu_fop1(struct sljit_compiler *compiler, int op, #endif @@ -2188,7 +2188,7 @@ static int sljit_emit_fpu_fop1(struct sljit_compiler *compiler, int op, } #if !(defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO) -int sljit_emit_fop2(struct sljit_compiler *compiler, int op, +SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op, #else static int sljit_emit_fpu_fop2(struct sljit_compiler *compiler, int op, #endif @@ -2266,7 +2266,7 @@ static int sljit_emit_fpu_fop2(struct sljit_compiler *compiler, int op, #if (defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO) -int sljit_emit_fop1(struct sljit_compiler *compiler, int op, +SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int src, sljit_w srcw) { @@ -2276,7 +2276,7 @@ int sljit_emit_fop1(struct sljit_compiler *compiler, int op, return sljit_emit_fpu_fop1(compiler, op, dst, dstw, src, srcw); } -int sljit_emit_fop2(struct sljit_compiler *compiler, int op, +SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int src1, sljit_w src1w, int src2, sljit_w src2w) @@ -2293,7 +2293,7 @@ int sljit_emit_fop2(struct sljit_compiler *compiler, int op, /* Conditional instructions */ /* --------------------------------------------------------------------- */ -struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler) +SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler) { sljit_ub *buf; struct sljit_label *label; @@ -2322,7 +2322,7 @@ struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler) return label; } -struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, int type) +SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, int type) { sljit_ub *buf; struct sljit_jump *jump; @@ -2359,7 +2359,7 @@ struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, int type) return jump; } -int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw) +SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw) { sljit_ub *code; struct sljit_jump *jump; @@ -2441,7 +2441,7 @@ int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w return SLJIT_SUCCESS; } -int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type) +SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type) { sljit_ub *buf; sljit_ub cond_set = 0; @@ -2629,7 +2629,7 @@ int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, slji return SLJIT_SUCCESS; } -struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w init_value) +SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w init_value) { sljit_ub *buf; struct sljit_const *const_; @@ -2675,7 +2675,7 @@ struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, s return const_; } -void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr) +SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr) { #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) *(sljit_w*)addr = new_addr - (addr + 4); @@ -2684,7 +2684,7 @@ void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr) #endif } -void sljit_set_const(sljit_uw addr, sljit_w new_constant) +SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_w new_constant) { *(sljit_w*)addr = new_constant; } |