Add patches to allow building a debug-flavoured working package (at
least on amd64). Codepaths only used in that case.
This commit is contained in:
parent
8b6fcfa861
commit
9b8dad4d1e
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-js_src_nanojit_Assembler_cpp,v 1.1 2010/10/27 08:10:59 landry Exp $
|
||||
allow to build a debug FLAVOR on !i386
|
||||
--- js/src/nanojit/Assembler.cpp.orig Tue Oct 26 23:36:11 2010
|
||||
+++ js/src/nanojit/Assembler.cpp Tue Oct 26 23:37:38 2010
|
||||
@@ -1223,10 +1223,12 @@ namespace nanojit
|
||||
countlir_label();
|
||||
LabelState *label = _labels.get(ins);
|
||||
// add profiling inc, if necessary.
|
||||
+#ifdef NANOJIT_IA32
|
||||
verbose_only( if (_logc->lcbits & LC_FragProfile) {
|
||||
if (ins == _thisfrag->loopLabel)
|
||||
asm_inc_m32(& _thisfrag->profCount);
|
||||
})
|
||||
+#endif
|
||||
if (!label) {
|
||||
// label seen first, normal target of forward jump, save addr & allocator
|
||||
_labels.add(ins, _nIns, _allocator);
|
14
www/mozilla-firefox/patches/patch-js_src_nanojit_Assembler_h
Normal file
14
www/mozilla-firefox/patches/patch-js_src_nanojit_Assembler_h
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-js_src_nanojit_Assembler_h,v 1.1 2010/10/27 08:10:59 landry Exp $
|
||||
allow to build a debug FLAVOR on !i386
|
||||
--- js/src/nanojit/Assembler.h.orig Tue Oct 26 23:33:05 2010
|
||||
+++ js/src/nanojit/Assembler.h Tue Oct 26 23:33:50 2010
|
||||
@@ -259,7 +259,9 @@ namespace nanojit
|
||||
|
||||
bool _inExit, vpad2[3];
|
||||
|
||||
+#ifdef NANOJIT_IA32
|
||||
verbose_only( void asm_inc_m32(uint32_t*); )
|
||||
+#endif
|
||||
void asm_setcc(Register res, LIns *cond);
|
||||
NIns * asm_jmpcc(bool brOnFalse, LIns *cond, NIns *target);
|
||||
void asm_mmq(Register rd, int dd, Register rs, int ds);
|
@ -0,0 +1,42 @@
|
||||
$OpenBSD: patch-js_src_nanojit_NativeX64_cpp,v 1.1 2010/10/27 08:10:59 landry Exp $
|
||||
allow to build the debug FLAVOR
|
||||
--- js/src/nanojit/NativeX64.cpp.orig Tue Oct 26 23:24:13 2010
|
||||
+++ js/src/nanojit/NativeX64.cpp Tue Oct 26 23:28:39 2010
|
||||
@@ -1388,9 +1388,9 @@ namespace nanojit
|
||||
// really do need a page break
|
||||
verbose_only(if (_logc->lcbits & LC_Assembly) outputf("newpage %p:", pc);)
|
||||
if (_inExit)
|
||||
- codeAlloc(exitStart, exitEnd, _nIns);
|
||||
+ codeAlloc(exitStart, exitEnd, _nIns verbose_only(, exitBytes));
|
||||
else
|
||||
- codeAlloc(codeStart, codeEnd, _nIns);
|
||||
+ codeAlloc(codeStart, codeEnd, _nIns verbose_only(, codeBytes));
|
||||
}
|
||||
// now emit the jump, but make sure we won't need another page break.
|
||||
// we're pedantic, but not *that* pedantic.
|
||||
@@ -1402,9 +1402,9 @@ namespace nanojit
|
||||
if (pc - bytes < top) {
|
||||
verbose_only(if (_logc->lcbits & LC_Assembly) outputf("newpage %p:", pc);)
|
||||
if (_inExit)
|
||||
- codeAlloc(exitStart, exitEnd, _nIns);
|
||||
+ codeAlloc(exitStart, exitEnd, _nIns verbose_only(, exitBytes));
|
||||
else
|
||||
- codeAlloc(codeStart, codeEnd, _nIns);
|
||||
+ codeAlloc(codeStart, codeEnd, _nIns verbose_only(, codeBytes));
|
||||
// this jump will call underrunProtect again, but since we're on a new
|
||||
// page, nothing will happen.
|
||||
JMP(pc);
|
||||
@@ -1418,11 +1418,11 @@ namespace nanojit
|
||||
|
||||
void Assembler::nativePageSetup() {
|
||||
if (!_nIns) {
|
||||
- codeAlloc(codeStart, codeEnd, _nIns);
|
||||
+ codeAlloc(codeStart, codeEnd, _nIns verbose_only(, codeBytes));
|
||||
IF_PEDANTIC( pedanticTop = _nIns; )
|
||||
}
|
||||
if (!_nExitIns) {
|
||||
- codeAlloc(exitStart, exitEnd, _nExitIns);
|
||||
+ codeAlloc(exitStart, exitEnd, _nExitIns verbose_only(, exitBytes));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user