Bug 609222 - JM: Fix call mechanism and recompilation. r=dvander. Patch to make Sun Studio on X86 work (typedef int32).

This commit is contained in:
Leon Sha 2010-11-30 11:19:17 +08:00
Родитель 2292ce87a4
Коммит 676f1b20c6
4 изменённых файлов: 15 добавлений и 7 удалений

Просмотреть файл

@ -91,6 +91,14 @@ typedef JSIntn intn;
*/
#if defined(AIX) && defined(HAVE_SYS_INTTYPES_H)
#include <sys/inttypes.h>
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
typedef JSInt64 int64;
/* Explicit signed keyword for bitfield types is required. */
/* Some compilers may treat them as unsigned without it. */
typedef signed int int32;
typedef signed short int16;
typedef signed char int8;
#else
typedef JSInt64 int64;

Просмотреть файл

@ -87,7 +87,7 @@ struct VMFrame
# ifdef JS_NO_FASTCALL
inline void** returnAddressLocation() {
return reinterpret_cast<void**>(this) - 3;
return reinterpret_cast<void**>(this) - 5;
}
# else
inline void** returnAddressLocation() {

Просмотреть файл

@ -146,7 +146,7 @@ TrampolineCompiler::generateForceReturnFast(Assembler &masm)
#else
// In case of no fast call, when we change the return address,
// we need to make sure add esp by 8.
masm.addPtr(Imm32(8), Registers::StackPointer);
masm.addPtr(Imm32(16), Registers::StackPointer);
#endif
return generateForceReturn(masm);
}

Просмотреть файл

@ -1,4 +1,4 @@
/ -*- Mode: C++/ tab-width: 4/ indent-tabs-mode: nil/ c-basic-offset: 4 -*-
/ -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/ ***** BEGIN LICENSE BLOCK *****
/ Version: MPL 1.1/GPL 2.0/LGPL 2.1
/
@ -92,8 +92,8 @@ JaegerTrampolineReturn:
.type JaegerThrowpoline, @function
JaegerThrowpoline:
/* For Sun Studio there is no fast call. */
/* We add the stack by 8 before. */
addl $0x8, %esp
/* We add the stack by 16 before. */
addl $0x10, %esp
/* Align the stack to 16 bytes. */
pushl %esp
pushl (%esp)
@ -127,8 +127,8 @@ InjectJaegerReturn:
movl 0x1C(%ebx), %ecx /* fp->rval_ type */
movl 0x14(%ebx), %eax /* fp->ncode_ */
/* For Sun Studio there is no fast call. */
/* We add the stack by 8 before. */
addl $0x8, %esp
/* We add the stack by 16 before. */
addl $0x10, %esp
/* Restore frame regs. */
movl 0x1C(%esp), %ebx /* f.fp */
jmp *%eax