With the STDCALL prefix, on Linux a function pointer is not implicitly converted to a FunctionPtr obj.
Created attachment 109118 [details] the patch
Comment on attachment 109118 [details] the patch Looks like this patch is pre r96293, is there still a problem post-r96293? I don't think we want to take this change. We should be able to give FunctionPtr an appropriate set of constructors. If Linux defaults to stdcall, it is possible that the '#if CPU(X86) && COMPILER(GCC)' check in DFGOperations.h should be '#if CALLING_CONVENTION_IS_CDECL'. We should be able to fix the problem without littering the JIT with explicit constructor calls.
Hi Gavin, Linux also defaults to cdecl. And surely we expects stdcall for JSValue32_64 DFG operations (which was a bug in previous code).
Created attachment 109153 [details] patch This patch fixed the stdcall FunctionPtr constructors issue on Linux.
Comment on attachment 109153 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=109153&action=review > Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h:55 > +#if CPU(X86) && COMPILER(GCC) I don't think GCC is the right test here. It will definitely be wrong for people building with clang. But I think it may also be wrong for people building with GCC on non-cdecl platforms, since cdecl is a property of the platform ABI, not the compiler. I'd suggest (OS(DARWIN) || OS(LINUX)) here.
I think stdcall is only a convention in windows, so per geoff's comments I'm going to make this !PLATFORM(WINDOWS), r+ & land.
Fixed in r96347
(In reply to comment #6) > I think stdcall is only a convention in windows, so per geoff's comments I'm going to make this !PLATFORM(WINDOWS), r+ & land. But what about Open Watcom C++??? :)