Commit Graph

59 Commits

Author SHA1 Message Date
Andreas Gal
4a9dbdaf12 Push a dummy copy of EBP onto the stack to make sure EBP is aligned in the new stack frame (472791, r=graydon,edwsmith). 2009-01-09 15:18:00 -08:00
Graydon Hoare
bb7e9793cf Bug 468484 - back out most of changeset 2963765d5585 and ifdef-guard members of avmplus::Config, fix arm build.
* * *
Bug 468484 - ifdef-guard members of avmplus::Config structure that broke ARM build.
2008-12-11 13:50:55 -08:00
Graydon Hoare
3cbd1cd998 Bug 450000 - Back out nanojit jump-patching machinery, r=danderson. 2008-12-10 17:31:17 -08:00
Graydon Hoare
ba3dc13800 Bug 468484 - Minor adjustments to match changes in tamarin, r=gal. 2008-12-10 17:25:46 -08:00
Graydon Hoare
37cfe58e72 Bug 468484 - Rename avmplus::AvmConfiguration, adjust sites of use, r=gal. 2008-12-10 17:19:40 -08:00
Rick Reitmaier
a70c5b7d48 Bug 468484 - LirBuffer has been modified to provide advance warning of out of memory (OOM) conditions, r=danderson.
LirBuffer has been modified to provide advance warning of
out of memory (OOM) conditions.

A new page is allocated LIR_BUF_THRESHOLD instructions
prior to reaching the end of page.  If the page allocation fails,
call to outOmem() will return true.  The buffer can still be
safely written to during during this period but it is assumed
the higher level code will catch this condition and handle
it appropriately as writing LIR_BUF_THRESHOLD instructions
past this point will cause a crash.

This opportunity was also taken to re-factor the code for
LirBufWriter making it more platform agnostic.
- All non-LInsp data in the instruction stream is now managed
  through structures that overlay the memory region.
- prepFor() was added to replace the multiple
  ensureReferenceable() calls for each instruction.
- insCall() was also modified somewhat in that the
  arguments are now stored growing downwards from
  the position of the pseudo instruction LirCallIns.

CodegenLIR now has LirBuffer checks at the granularity
of each emitXXX() call that is exposed publicly.  This seemed
like a reasonable approach since a client could potentially
call at this level indefinitely.  If we want to reduce the frequency
of these checks then we'd have to push the check up into the
verifier.

Assembler OOM handling has also changed.  The variable
_startingIns was added and contains the location at which
the assembler began writing code for the current
begin/assem/end sequence.   If an OOM condition occurs
the assembler will reset the current instruction pointer
to _startingIns, effectively overwriting the code that has
been generated.  This allows the assembler to produce
code indefinitely (and without error) until the upper layers
have noticed the error and respond accordingly.

The constant LARGEST_UNDERRUN_PROT was added
and needs to be set to a platform specific value that is
equal to or greater than the number of NIns written for
the largest possible instruction.  i.e.  you cannot write
more than this number of NIns to the buffer for each
call to underrunProtect().
2008-11-14 12:46:35 -08:00
Leon Sha<leon.sha@sun.com>
314e79c76f Bug 468484 - Bug 463182 - Can not build tamarin-redux on solaris with Sun compiler. stejohns: review+, r=gal. 2008-11-06 13:37:37 +08:00
Edwin Smith
903336fe43 Bug 468484 - Fixed bug causing too much spilling, other arm tweaks, r=danderson. 2008-10-28 15:16:05 -04:00
Steven Johnson
4dfea32fd4 Bug 468484 - redid nMarkExecute() to fix the bug. Now it always does exactly one page, r=gal. 2008-10-21 18:34:10 -07:00
Edwin Smith
4ab0561335 Bug 468484 - make asm_output[123] varadic, and add some LIR instruction comments, r=gal. 2008-10-21 14:53:14 -04:00
Steven Johnson
fbc6fd0ad9 Bug 468484 - internal tamarin-redux merge (mostly formatting), r=gal. 2008-10-20 15:52:11 -07:00
David Anderson
ed25d09ae1 Fixed a register allocation bug in nanojit when an argument using FST0 appeared twice in an argument list (bug 465484, r=edwsmith). 2008-12-04 12:34:38 -08:00
Brendan Eich
37c40ca7c0 Merge. 2008-11-17 16:29:40 -08:00
David Anderson
d46ed014cf Fixed edge case in nanojit register allocation for shl/shr (bug 465135, r=gal). 2008-11-16 21:36:33 -08:00
timeless@mozdev.org
1efe45f72f Bug 464212nanojit/Nativei386.cpp(148) : warning C4309: 'initializing' : truncation of constant value
r=gal
2008-11-11 11:20:07 +01:00
Andreas Gal
e609f0bb95 Cleanup GuardRecord, SideExit, and InterpStruct and extract VM-dependant fields (463313, r=danderson). 2008-11-07 15:23:43 -08:00
David Anderson
5ee0ea8b50 Fix using wrong regalloc helper in asm_ld peephole opt (r=rreitmai). 2008-11-04 16:52:25 -08:00
David Anderson
16b6dd740c Peephole optimize various LIR load patterns for x86 addressing (bug 444682, r=gal). 2008-11-04 16:34:13 -08:00
Graydon Hoare
6901121f8d Fix MSVC sensitivity to symbols called 'far' 2008-11-04 16:28:05 -08:00
Graydon Hoare
9198f045ad Bug 462228 - Add interface to disconnect and reconnect loops in nanojit, r=gal. 2008-11-04 14:20:19 -08:00
Graydon Hoare
5cfd909934 Bug 462228 - Merge code-patching functions in nanojit, r=rreitmai. 2008-11-04 14:18:17 -08:00
David Mandelin
f8d1b7798b Preserve param1 over loop iters if it is used, desk r=danderson 2008-10-31 16:48:14 -07:00
Andreas Gal
4eafb60801 Add 16-bit non-volatile loads to nanojit (454301, r=danderson). 2008-10-30 14:17:42 -07:00
Andreas Gal
e2a6acb46a Use LIR_loop for loop edge to avoid going into a side exit handler at every loop edge (461231, r=danderson). 2008-10-22 16:00:08 -07:00
Graydon Hoare
95bed8b2ed Bug 461205 - make callee-save LIR_param use optional. r=gal,edwsmith 2008-10-22 14:32:37 -07:00
Andreas Gal
b14d526b66 Merge. 2008-10-21 17:50:52 -07:00
Andreas Gal
ec7efc925c Remove code to unlink trees to reduce the size of GuardRecord. Allow GuardRecords to share one common SideExit structure. The VM places both explicitly into the LIR (460538, r=danderson). 2008-10-21 17:50:32 -07:00
Rick Reitmaier
2cc651e33b refactor Assembler.cpp ; passing acceptance on mac 2008-10-20 10:15:07 -07:00
Edwin Smith
9ce451ef43 fix linux compile errors 2008-10-20 10:15:07 -07:00
Edwin Smith
1896977ce5 fixes to enable ARM nanojit to build, at least 2008-10-20 10:15:07 -07:00
Graydon Hoare
bf84bf6273 Merge tamarin-redux (nanojit2) into tracemonkey (457786, r=edwsmith,gal,danderson). 2008-10-13 13:29:18 -07:00
Jason Orendorff
a27d101dab Bug 458735 - Improve internal API for traceable natives (r=brendan, nanojit r=edwsmith) 2008-10-08 17:08:33 -05:00
David Anderson
9c7d3f333f Fixed regression where cmov was disabled on AMD64. 2008-10-01 17:58:38 -05:00
Vladimir Vukicevic
f761c61b8e TM: move cmov_available setting into nj arch backends where appropriate 2008-09-30 17:15:09 -07:00
Andreas Gal
5fdd5d2b67 Properly handle cmov and sse2 flags, and put them in a central place not into each platform-dependant assembler (457355, r=danderson). 2008-09-26 20:39:21 -07:00
Ginn Chen
2763e5d63e Make TraceMonkey build on Solaris x86 with Sun Studio 12 (bug 452588, r=danderson). 2008-09-05 16:56:03 -07:00
Ginn Chen
a3f5be56ad Added new macro AVMPLUS_UNIX to reduce redundancy and add Solaris support to the TM browser build (bug 452589, r=dvander). 2008-09-05 15:15:00 -07:00
David Anderson
073cbf54c2 Improved AMD64 allocation for float ops that get stored back into memory. 2008-09-04 11:56:54 -07:00
David Anderson
5e828c58d4 Fixed float ops to deal with being handed an LHS GPR reservation on AMD64.
Fixed nanojit LIR verbosity crashing on AMD64.
2008-09-04 11:53:49 -07:00
Ginn Chen
76f8dc0daf On x86 compilers without fastcall, simulate it when invoking traces and un-simulate it when invoking builtins (bug 452390, r=dvander). 2008-09-02 11:43:55 -07:00
David Anderson
1be49b5c2e Use mmap() instead of valloc() in nanojit, abort on mprotect() failure (bug 451946, patch+r from Asko Tontti). 2008-09-02 10:15:26 -07:00
David Anderson
d5e48e84d7 Added descriptive messages to always-taken assertions in Nativei386.cpp. 2008-08-28 17:27:29 -07:00
David Anderson
bc995a482b Fixed AMD64 loop branch patching for >32-bit offstes. 2008-08-27 16:52:28 -07:00
David Anderson
d0d64bbeff Added LIR_qior/pior. Fixed more AMD64 page jumping bugs. Fixed some other AMD64 usage bugs in jstracer. 2008-08-27 16:08:59 -07:00
David Anderson
d7c7f1645b Improved AMD64 out-of-range jumping, some cases are still broken though. Fixed i386 build. 2008-08-26 23:14:13 -07:00
David Anderson
2a4faa131c Fixed crashing with the incremental allocation changes. Very long jumps are still a problem but at least now we assert. 2008-08-26 15:15:15 -07:00
David Anderson
9a5b3b4307 AMD64 trace-tests.js passes now (hacked in LIR_qcmov opcode, corrected builtin return types). 2008-08-19 17:19:19 -07:00
David Anderson
aef458673b Fixed codegen bug for amd64 64-bit binary ops. 2008-08-19 11:00:17 -07:00
David Anderson
b39fadd1f3 Updated nanojit for the AMD64 patch. 2008-08-18 12:32:14 -07:00
Andreas Gal
f0c74cce54 Sync with tamarin-tracing/nanojit tip. 2008-07-31 13:28:12 -07:00