Closed
Bug 870696
Opened 12 years ago
Closed 4 years ago
Failed to compile SpiderMonkey on PPCLinux64
Categories
(Core :: MFBT, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: wangzhonnew, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
Steps to reproduce:
compile spider monkey on PPCLinux 64, which is big endian 64 bit
Actual results:
in jsval_layout, jsval_layout.s.payload.word is not defined in big-endian 64 bit environment, so compilation on on payloadWord() failed
const jsuword *payloadWord() const {
return &data.s.payload.word;
}
Expected results:
In order to let it run on ppclinux64, the fix should looks like the following:
typedef union jsval_layout
{
uint64 asBits;
struct {
JSValueTag tag:17;
uint64 payload47: 47;
} debugView ;
struct {
union {
int 32 i32;
uint32 u32;
struct
{
int32 pad ;
JSWhyMagic why;
} why ;
jsuword word ;
} payload ;
} s;
...
note "jsuword word" is added to fix payloadWord() function. However in
bool isMagic ( JSWhyMagic why ) const {
JS_ASSERT_IF(isMagic(), data.s.payload.why == why ) ;
return JSVAL_IS_MAGIC_IMPL(data);
}
The program assert on data.s.payload.why == why because in big-endian environment, "why" variable is refering to the high 32-bit instead of low 32-bit.
In this case whenever we try to display something in an array, we failed at this assertion.
The fix is changing 3 places of "data.s.payload.why" in jsvalue.h to
#if defined ( IS_LITTLE_ENDIAN) || JS_BITS_PER_WORD == 32
<old approach>
#else
<use data.s.payload.why.why instead of data.s.payload.why>
#endif
Comment 1•11 years ago
|
||
Can you check if this is still an issue with SpiderMonkey 24?
(SpiderMonkey 24 seems to compile okay on my Linux ppc64 machine)
Comment 2•4 years ago
|
||
After 8 years, I think so much has changed in both the code base and the toolchain that it's unlikely this issue persists as is. Closing the bug, please reopen with current details if necessary.
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•