Re: [pcre-dev] [PATCH] JIT support with Intel compiler, old…

Top Page
Delete this message
Author: Daniel Richard G
Date:  
To: Zoltán Herczeg
CC: pcre-dev
Subject: Re: [pcre-dev] [PATCH] JIT support with Intel compiler, older Solaris
On Wed, 14 Nov 2012, Zoltán Herczeg wrote:

> Hi Daniel,
>
> thanks for the patch! Would it be a problem, if I would land it after
> the next pcre release? We focus on fixes now, and this is kind of a new
> feature.


This was intended as a fix! I couldn't build PCRE as it was.

> +#if defined(_MSC_VER) && _MSC_VER >= 1400
>
> What happens if _MSC_VER < 1400 (btw that is LARGE version number :P) Is
> there any 64 bit x86 support before 1400?


Aside: Have a look at

     http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/c3f1ba1f-c59d-46a3-a028-bcfabe9fbe2c/


I'm not sure whether or not 64-bit support was available before 1400 (i.e.
MSVC8), but I confirmed that __cpuid() is not available in 7.1.

> -#define SLJIT_CALL __stdcall
>
> Your patch removes __stdcall which I think is necessary. Some x86/32
> compilers use exotic ABIs, and this define helps detecting it.


You need more explicit logic for the __stdcall case, rather than using it
as a fallback. I got rid of it because "icc -no-gcc" on Linux wasn't
matching any of the other cases, and did not recognize __stdcall.

> Btw, is the Intel C compiler works with defining its ABI type?


(I'm sorry; could you rephrase the question?)

> The other modifications seem ok.
>
> About the sparc: I think you can just add an ifdef around the cache
> flush instruction, which is accepted by your compiler.


Wait, what? The flush instruction is in the asm block, which the compiler
isn't accepting...

Anyway, it seems that this compiler is a lot more rudimentary in its
handling of inline assembly. See this page:

     http://docs.oracle.com/cd/E19957-01/805-4952/z400016f34f4/


"volatile" isn't mentioned at all, and even the colon parts after the
assembly string are gone. Local variables have to be referenced via the
stack register, it seems. Do you think this is enough to work with?

> (I hope you tried to compile it in 32 bit mode, since sparc64 is not yet
> supported.)


I was trying to see what would happen in a 64-bit build ^_^


--Daniel


--
Daniel Richard G. || danielg@??? || Software Developer
Teragram Linguistic Technologies (a division of SAS)
http://www.teragram.com/