summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-09-21 12:35:36 +0000
committerzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-09-21 12:35:36 +0000
commitdbc7a6926ec2ed732556f906824a6ddb946c31b3 (patch)
treedbaf532a9c1a72af7a128b4d4f6e814d7ffad743
parent50a41668c9882fecb864bc3178708471d164b6d6 (diff)
downloadpcre-dbc7a6926ec2ed732556f906824a6ddb946c31b3.tar.gz
Borland C++ JIT support by Dmitry Ukolov
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@704 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--sljit/sljitConfigInternal.h12
-rw-r--r--sljit/sljitNativeX86_common.c8
2 files changed, 14 insertions, 6 deletions
diff --git a/sljit/sljitConfigInternal.h b/sljit/sljitConfigInternal.h
index 5904ced..e82bed7 100644
--- a/sljit/sljitConfigInternal.h
+++ b/sljit/sljitConfigInternal.h
@@ -225,13 +225,21 @@ typedef long int sljit_w;
/* ABI (Application Binary Interface) types. */
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-#ifdef __GNUC__
+#if defined(__GNUC__)
+
#define SLJIT_CALL __attribute__ ((fastcall))
#define SLJIT_X86_32_FASTCALL 1
+
#elif defined(_WIN32)
+
+#ifdef __BORLANDC__
+#define SLJIT_CALL __msfastcall
+#else /* __BORLANDC__ */
#define SLJIT_CALL __fastcall
+#endif /* __BORLANDC__ */
#define SLJIT_X86_32_FASTCALL 1
-#else
+
+#else /* defined(_WIN32) */
#define SLJIT_CALL __stdcall
#endif
diff --git a/sljit/sljitNativeX86_common.c b/sljit/sljitNativeX86_common.c
index ab7b351..dd993e0 100644
--- a/sljit/sljitNativeX86_common.c
+++ b/sljit/sljitNativeX86_common.c
@@ -1847,8 +1847,8 @@ static int sse2_available = 0;
#if (defined SLJIT_SSE2 && SLJIT_SSE2)
/* Alignment + 2 * 16 bytes. */
-static int sse2_data[3 + 4 + 4];
-static int *sse2_buffer;
+static sljit_i sse2_data[3 + 4 + 4];
+static sljit_i *sse2_buffer;
static void init_compiler()
{
@@ -1856,7 +1856,7 @@ static void init_compiler()
int features = 0;
#endif
- sse2_buffer = (int*)(((sljit_uw)sse2_data + 15) & ~0xf);
+ sse2_buffer = (sljit_i*)(((sljit_uw)sse2_data + 15) & ~0xf);
sse2_buffer[0] = 0;
sse2_buffer[1] = 0x80000000;
sse2_buffer[4] = 0xffffffff;
@@ -1875,7 +1875,7 @@ static void init_compiler()
:
: "%eax", "%ecx", "%edx"
);
-#elif defined(_MSC_VER)
+#elif defined(_MSC_VER) || defined(__BORLANDC__)
/* Intel syntax. */
__asm {
mov eax, 1