Revision: 704
http://vcs.pcre.org/viewvc?view=rev&revision=704
Author: zherczeg
Date: 2011-09-21 13:35:36 +0100 (Wed, 21 Sep 2011)
Log Message:
-----------
Borland C++ JIT support by Dmitry Ukolov
Modified Paths:
--------------
code/trunk/sljit/sljitConfigInternal.h
code/trunk/sljit/sljitNativeX86_common.c
Modified: code/trunk/sljit/sljitConfigInternal.h
===================================================================
--- code/trunk/sljit/sljitConfigInternal.h 2011-09-20 16:27:11 UTC (rev 703)
+++ code/trunk/sljit/sljitConfigInternal.h 2011-09-21 12:35:36 UTC (rev 704)
@@ -225,13 +225,21 @@
/* 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
Modified: code/trunk/sljit/sljitNativeX86_common.c
===================================================================
--- code/trunk/sljit/sljitNativeX86_common.c 2011-09-20 16:27:11 UTC (rev 703)
+++ code/trunk/sljit/sljitNativeX86_common.c 2011-09-21 12:35:36 UTC (rev 704)
@@ -1847,8 +1847,8 @@
#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 @@
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 @@
:
: "%eax", "%ecx", "%edx"
);
-#elif defined(_MSC_VER)
+#elif defined(_MSC_VER) || defined(__BORLANDC__)
/* Intel syntax. */
__asm {
mov eax, 1