mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 517345: fix jitstats architecture flags, r=gal
--HG-- extra : rebase_source : bea8fd342f3f57071150c64e689971f14ecaa55e
This commit is contained in:
parent
c421bb6e66
commit
7c2e702632
@ -1988,33 +1988,6 @@ TraceRecorder::TraceRecorder(JSContext* cx, VMSideExit* _anchor, Fragment* _frag
|
||||
(void*)this->globalObj, OBJ_SHAPE(this->globalObj));
|
||||
debug_only_printf(LC_TMTreeVis, "TREEVIS RECORD FRAG=%p ANCHOR=%p\n", (void*)fragment,
|
||||
(void*)anchor);
|
||||
|
||||
/* Set up jitstats so that trace-test.js can determine which architecture
|
||||
* we're running on. */
|
||||
jitstats.archIsIA32 = 0;
|
||||
jitstats.archIs64BIT = 0;
|
||||
jitstats.archIsARM = 0;
|
||||
jitstats.archIsSPARC = 0;
|
||||
jitstats.archIsPPC = 0;
|
||||
#if defined NANOJIT_IA32
|
||||
jitstats.archIsIA32 = 1;
|
||||
#endif
|
||||
#if defined NANOJIT_64BIT
|
||||
jitstats.archIs64BIT = 1;
|
||||
#endif
|
||||
#if defined NANOJIT_ARM
|
||||
jitstats.archIsARM = 1;
|
||||
#endif
|
||||
#if defined NANOJIT_SPARC
|
||||
jitstats.archIsSPARC = 1;
|
||||
#endif
|
||||
#if defined NANOJIT_PPC
|
||||
jitstats.archIsPPC = 1;
|
||||
#endif
|
||||
#if defined NANOJIT_X64
|
||||
jitstats.archIsAMD64 = 1;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
lir = lir_buf_writer = new LirBufWriter(lirbuf);
|
||||
@ -7028,6 +7001,33 @@ js_InitJIT(JSTraceMonitor *tm)
|
||||
#if !defined XP_WIN
|
||||
debug_only(memset(&jitstats, 0, sizeof(jitstats)));
|
||||
#endif
|
||||
|
||||
#ifdef JS_JIT_SPEW
|
||||
/* Architecture properties used by test cases. */
|
||||
jitstats.archIsIA32 = 0;
|
||||
jitstats.archIs64BIT = 0;
|
||||
jitstats.archIsARM = 0;
|
||||
jitstats.archIsSPARC = 0;
|
||||
jitstats.archIsPPC = 0;
|
||||
#if defined NANOJIT_IA32
|
||||
jitstats.archIsIA32 = 1;
|
||||
#endif
|
||||
#if defined NANOJIT_64BIT
|
||||
jitstats.archIs64BIT = 1;
|
||||
#endif
|
||||
#if defined NANOJIT_ARM
|
||||
jitstats.archIsARM = 1;
|
||||
#endif
|
||||
#if defined NANOJIT_SPARC
|
||||
jitstats.archIsSPARC = 1;
|
||||
#endif
|
||||
#if defined NANOJIT_PPC
|
||||
jitstats.archIsPPC = 1;
|
||||
#endif
|
||||
#if defined NANOJIT_X64
|
||||
jitstats.archIsAMD64 = 1;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
14
js/src/trace-test/tests/basic/jitstatsArchFlags.js
Normal file
14
js/src/trace-test/tests/basic/jitstatsArchFlags.js
Normal file
@ -0,0 +1,14 @@
|
||||
// Make sure the arch flags are valid on startup, even if nothing has
|
||||
// been traced yet. We don't know what arch the user is building on,
|
||||
// but presumably we want at least 1 flag to be set on all supported
|
||||
// platforms.
|
||||
|
||||
if (jitstats) {
|
||||
assertEq(jitstats.archIsIA32 ||
|
||||
jitstats.archIs64BIT ||
|
||||
jitstats.archIsARM ||
|
||||
jitstats.archIsSPARC ||
|
||||
jitstats.archIsPPC ||
|
||||
jitstats.archIsAMD64,
|
||||
1);
|
||||
}
|
Loading…
Reference in New Issue
Block a user