Commit Graph

207 Commits

Author SHA1 Message Date
Nicholas Nethercote
ed2756a1e0 Backed out changeset 8d7d6dcce7eb (due to ARM and WinNT bustage).
--HG--
extra : convert_revision : 2d17a9b2e8daa8f3e89cd756a7eb23a41579f7e1
2009-12-01 15:16:57 +11:00
Nicholas Nethercote
e3584b76b3 Bug 527754 - CseFilter not able to handle downstream modification of instructions. r=rreitmai,gal.
--HG--
extra : convert_revision : 8d7d6dcce7ebda66b1aab48f40b46c1e7df2d91d
2009-12-01 14:56:44 +11:00
Nicholas Nethercote
dfc1dd039d Bug 515313 - nanojit: finish killing reservations. r=edwsmith.
--HG--
extra : convert_revision : 1b6cb808f3048c25857613fa6e77e865fee51d8e
2009-11-24 23:00:23 -08:00
Nicholas Nethercote
90a5b3e9bc Bug 505662 - nanojit: kill operandCount. r=graydon,edwsmith.
--HG--
extra : convert_revision : ab7d225a3c8b1562eb74336099abc564f770e7f3
2009-11-24 22:21:27 -08:00
Nicholas Nethercote
97e38dea03 Bug 518242 - NJ: Remove insSkip and supporting machinery. r=graydon.
--HG--
extra : convert_revision : d0134ea858d0e34c389868a59aac7085451865b4
2009-11-13 16:18:40 +11:00
Nicholas Nethercote
ce6dd615de Bug 513865 - nanojit: make LirReader::read() clearer and faster. r=gal.
--HG--
extra : convert_revision : d78bd673c8652d17489559744f4a221c78811286
2009-11-13 09:26:26 +11:00
Edwin Smith
d7a89e77b5 Add LIR_jtbl instruction, and patch up lirasm to remove LIR_ji (bug 465582 r=nnethercote+, rreitmai+)
new opcode: LIR_jtbl.  jtbl takes a uint32_t index and a table of label
references (LIns**), representing a jump to one of the labels.

the index must be in range (range checking is not included in the opcode).

the table is allocated in memory at least as long lived as the LIR; this is
accomplished by doing the allocation from the same Allocator used by LirBuffer.

In the x86 backend, this is implemented with a simple jmp [R*4+ADDR] where ADDR
is the address of the table.  I added a new dataAllocator (Allocator&)
parameter to Assembler, which is used for allocating data along with code (data
& code have same lifetime).  The x86 backend allocates the final table of
addresses from this allocator and embeds the pointer to the table in code.

In other backends more than one instruction must be used due to limited range
of the constant part of the addressing mode (ppc, arm), or non-support for
full-range pc-relative indexing (x64, ppc64).

Anyone generating LIR code for use with LIR_jtbl must also generate a
LIR_regfence instruction after each label reachable by a forwards edge
from LIR_jtbl.  This is to workaround the register allocator's inability
to merge register states between 2 or more pre-existing targets.  LIR_regfence
is not required for backwards edges.

--HG--
extra : convert_revision : ee709eaaa30f720f77ab863ba4c9e6d10d69982b
2009-11-11 14:38:12 -05:00
Graydon Hoare
53519f8859 Bug 527178 - Improve valid-displacement checks, r=edwsmith, r=dvander.
--HG--
extra : rebase_source : b95743173b293bd4a2a54b37124d4e85cb16d425
extra : convert_revision : eadf0b1a3fd0bd28303b12b905eb94a09a2ade1b
2009-11-10 14:55:35 -08:00
Nicholas Nethercote
8b9cbc6e8b Bug 525437 - clean up LIR_call. r=edwsmith.
--HG--
extra : convert_revision : 2f6b3b6eedb27044cc7699c923d4220dd169b823
2009-11-10 14:12:18 +11:00
Nicholas Nethercote
dd4a2ec015 Bug 512634 - nanojit: identify RegAlloc invariants. r=edwsmith.
--HG--
extra : convert_revision : 2d5d94694fceca54934270a518a5b341ce13b2d0
2009-11-05 11:56:48 +11:00
Nicholas Nethercote
13dad87c06 Bug 502778 - nanojit: speed up CseFilter. r=edwsmith.
--HG--
extra : convert_revision : 98b64e95f3f98c85e4dfab9e66d16543cb27a8b6
2009-11-05 09:40:33 +11:00
Graydon Hoare
108c884253 Bug 522591 - move reader pipeline from assemble() to compile(), r=gal. 2009-10-23 14:58:10 -07:00
Graydon Hoare
426e720124 Bug 522413 - remove uses of static avmcore::config, r=gal. 2009-10-15 16:02:59 -07:00
Graydon Hoare
bb3cb0015c Bug 522363 - remove debug-break, unused parameters on displacement check, r=dvander.
--HG--
extra : rebase_source : 13ef7b6d16e5b66bb70816cfdd417ab4f9bcd758
2009-10-14 15:30:00 -07:00
Andreas Gal
caf1760bb4 ARM backend does not support displacements > 12bits (519805, r=graydon). 2009-10-02 18:25:36 -07:00
Graydon Hoare
59db3f60b0 Bug 519575 - NJ merge: more LIR.h drift, r=gal. 2009-09-29 16:36:37 -07:00
Brendan Eich
4bf4354638 High-level CSE for shape guards (518448, r=jorendorff). 2009-09-29 19:05:19 -07:00
Robert Sayre
6b74778c56 Merge backout. 2009-09-26 18:58:56 -07:00
Robert Sayre
7e3d716d38 Backed out changeset f5ea964eb493sdf 2009-09-26 18:55:25 -07:00
Brendan Eich
69fd06459c High-level CSE for shape guards (518448, r=jorendorff). 2009-09-25 14:07:08 -07:00
Nicholas Nethercote
9598899fc8 Bug 518477 - NJ merge: LIR.{cpp,h} changes from TR. r=graydon. 2009-09-24 10:42:25 +10:00
Graydon Hoare
a18f57ecfd Bug 495734 - NJ: don't store non-LIR data in LIR buffers, r=gal.
--HG--
extra : rebase_source : 4a73fd251f3077fe3623ef1341a8aa3729a4e8bf
2009-09-22 16:06:52 -07:00
Nicholas Nethercote
401cfd7471 Bug 518061 - NJ merge: add ExprFilter::insLoad(). r=graydon. 2009-09-22 17:21:59 +10:00
Graydon Hoare
e102fc5e1c Bug 517299 - Allocator mismatch (calloc+delete) for class TraceRecorder and LirWriter, r=gal. 2009-09-21 14:06:42 -07:00
Graydon Hoare
c421bb6e66 Bug 517530 - NJ merge: whitespace, equivalent code, PPC churn, r=dvander. 2009-09-18 13:31:09 -07:00
Graydon Hoare
963fd74e53 Bug 516620 - Kill off residue of MMgc, r=gal.
--HG--
extra : rebase_source : 1bd814f499014507fb60ad554687b12b9fe09a3e
2009-09-10 16:29:36 -07:00
Graydon Hoare
2521578c2d Backed out changeset 35777195800a, perf regression. 2009-09-14 21:07:57 -07:00
Graydon Hoare
5d33edd2e9 Bug 516620 - Kill off residue of MMgc, r=gal. 2009-09-10 16:29:36 -07:00
Graydon Hoare
ee59e42dc3 Bug 518730 - TM: change the allocators to calloc, r=gal. 2009-09-25 15:16:10 -07:00
Nicholas Nethercote
a5ab37ac5f Fix bustage caused by the patch for 514066. 2009-09-10 14:24:57 +10:00
Nicholas Nethercote
b29cd64403 Bug 514066 - TM: Make short functions in LIR.cpp inline. r=gal. 2009-09-10 14:02:59 +10:00
Nicholas Nethercote
f110b091bc Bug 514349 - nanojit: start to kill Reservations. r=edwsmith,rreitmai. 2009-09-10 11:00:18 +10:00
David Anderson
22a1120a3e Added LIR helpers for x64 code generation (bug 514532, r=edwsmith). 2009-09-09 11:15:48 -07:00
Nicholas Nethercote
21dbf49f8b Bug 515138 - TM/nanojit: merge the two StackFilter passes. r=gal. 2009-09-09 11:48:30 +10:00
Nicholas Nethercote
6ee8551d7d Bug 512824 - TM: gcc complains about invalid aliasing in LIR.h. r=gal. 2009-09-09 09:18:41 +10:00
David Anderson
0650a2788b LIR sanity checker from tamarin-redux (bug 514503, r=gal,edwsmith). 2009-09-04 17:56:22 -07:00
Nicholas Nethercote
ea4545c24a Follow-up to bug 513843. r=gal (via IRC). 2009-09-04 11:07:36 +10:00
Andreas Gal
6771d193dd Introduce a register fence instruction to force all registers to be spilled (514374, r=edwsmith,rreitmai). 2009-09-03 14:43:30 -07:00
Nicholas Nethercote
5adc17c6a5 Bug 514110 - nanojit: avoid getresv() because it has a redundant test. r=gal. 2009-09-03 09:36:51 +10:00
Nicholas Nethercote
320a2cfb64 Backed out changeset 48928150aa27 due to Tinderbox breakage. 2009-09-02 12:14:09 +10:00
Nicholas Nethercote
85c5abe0a7 Bug 513865 - nanojit: make LirReader::read() clearer and faster. r=gal. 2009-09-02 10:20:28 +10:00
David Anderson
21466cd521 Added LIR_float to distinguish NULL from 0.0 on x64 (bug 513838, r=gal,rreitmai). 2009-09-01 14:26:24 -07:00
Andreas Gal
64b13a5ec6 Remove useless FASTCALL declarations and make hashcode and equals less branchy (513539, r=dvander). 2009-08-30 00:11:12 -07:00
Andreas Gal
317b5f2e3a Remove explicitSavedRegs and loop hacks from nanojit (513139, r=dvander). 2009-08-27 18:46:45 -07:00
Graydon Hoare
5b06cc0665 Bug 510602 - Massage LIR opcodes to merge state, r=dvander. 2009-08-27 17:52:46 -07:00
David Anderson
83d28f8a00 Merged LIR_alloc changes from tamarin-redux (bug 513069, r=gal). 2009-08-27 13:22:30 -07:00
David Anderson
32cdaad163 Merged 64-bit arithmetic ops from tamarin-redux (bug 512836, r=gal). 2009-08-26 17:14:18 -07:00
David Anderson
83fc2d7e10 Merge 64-bit comparison opcodes from tamarin-redux (bug 512826, r=gal). 2009-08-26 16:30:23 -07:00
Graydon Hoare
503c025d90 Bug 511309 - Delete class Fragmento and all uses of it, r=dvander.
--HG--
extra : rebase_source : 47047589288ac0758e0068307b5a8f393db97606
2009-08-20 17:22:47 -07:00
Edwin Smith
87b101337d Bug 510545 - Convert LInsHashSet to use Allocator instead of GC, r=gal.
--HG--
extra : rebase_source : 233cf623b49f030ca083ba250294e00b61afdac5
2009-08-06 09:41:07 -04:00
Edwin Smith
fa572124fd Bug 510116 - Remove dead code paths and arguments in nanojit::compile, r=gal. 2009-08-05 15:06:00 -04:00
Edwin Smith
83930e09a2 Bug 510095 - allocate LirBuffer with Allocator instead of GC, don't extend GCFinalizedObject, r=gal.
--HG--
extra : rebase_source : 42aa431e0d795351860f0794ea0392e1f663132b
2009-08-04 15:03:34 -04:00
Edwin Smith
ad06720f03 Bug 510078 - Convert LirNameMap to HashMap<> and Allocator, r=gal.
* * *
Don't allocate CodeAlloc with GC and dont extend GCFinalizedObject (bug 506390 r=tharwood+)

* Change PageMgr::CodeAlloc from pointer to embedded instance.
* Assembler takes CodeAlloc& now, like it already does for Allocator&
* PoolObject.cpp|h now use VMCFG_NANOJIT instead of (deprecated) FEATURE_NANOJIT
  (both #defines are equivalent)

--HG--
extra : rebase_source : 90847a654d7f669a4c2ac364dd9aae7be38cae77
2009-08-04 14:18:38 -04:00
Edwin Smith
3967b233d5 Bug 510036 - Convert LabelMap to HashMap<> and Allocator, r=gal.
--HG--
extra : rebase_source : 4f1385922085fe086084c418aa22dcc4cc4c1961
2009-08-04 13:56:48 -04:00
Edwin Smith
7de6b2bc04 Bug 509890 - Convert InsList to SeqBuilder<> and Allocator, r=gal.
--HG--
extra : rebase_source : 22303e739a0a6669c634595149028872aa7bd334
2009-08-04 13:11:53 -04:00
Graydon Hoare
77e519e3e4 Bug 509883 - Grab bag of formatting churn, r=gal.
--HG--
extra : rebase_source : 05d7b651a381a9e5daca47a2140bd6f1b1154a5b
2009-08-04 11:33:14 -04:00
Edwin Smith
6652a33cf1 Bug 509833 - Convert live() analyzer to Allocator, r=gal. 2009-08-04 10:18:25 -04:00
Edwin Smith
1913010941 Bug 509818 - Replace StringList with SeqBuilder<char*>, use Allocator, r=dvander. 2009-08-04 09:54:47 -04:00
Edwin Smith
186c032f2a Bug 509598 - Remove dead nanojit::CseFilter and LInsHashSet::replace, r=dvander.
--HG--
extra : rebase_source : ec7d125901bb032ad0dc5d7021070181bf8cde3d
2009-08-03 15:45:01 -04:00
Edwin Smith
10163c0cd1 Bug 507042 - class BitSet doesn't need GC support, r=dvander.
--HG--
extra : rebase_source : ad1835e60e926a8cdb570711b9deec0e1c40ead1
2009-07-08 16:21:55 -04:00
Edwin Smith
e299aec675 Bug 507031 - Replace use of avmplus:String with Allocator and char* in nanojit::LabelMap and LirNameMap, r=dvander.
--HG--
extra : rebase_source : 3c59dc7bff1ece5ac282da9b0cb8820674345684
2009-07-15 12:34:17 -04:00
Graydon Hoare
b8154cc364 Bug 504462 - Merge tamarin's CodeAlloc into tracemonkey, r=gal. 2009-07-15 16:50:01 -07:00
Jacek Caban
5da4c824d2 Bug 505123 - js3250.dll linking fails on MinGW on fastcall inline functions, a=jacek, r=graydon. 2009-08-06 13:40:05 -07:00
Nicholas Nethercote
f71d930576 Bug 507528 - TM/nanojit: add indirect call code to the core and x86 back-end. r=rreitmai. 2009-08-03 08:54:02 +10:00
Graydon Hoare
2e92fcbbe3 Backed out changeset d0be9284ea67 2009-07-30 14:28:26 -07:00
Graydon Hoare
ef5f70907e Backed out changeset fc66e3f4afc9 2009-07-30 14:27:10 -07:00
Graydon Hoare
402e209fc1 Backed out changeset 83f39b3e8b10 2009-07-30 14:23:35 -07:00
Edwin Smith
1e964d04a7 Bug 507042 - class BitSet doesn't need GC support, r=dvander. 2009-07-08 16:21:55 -04:00
Edwin Smith
4179e603b3 Bug 507031 - Replace use of avmplus:String with Allocator and char* in nanojit::LabelMap and LirNameMap, r=dvander. 2009-07-15 12:34:17 -04:00
Graydon Hoare
caf3859643 Bug 504462 - Merge tamarin's CodeAlloc into tracemonkey, r=gal. 2009-07-15 16:50:01 -07:00
Nicholas Nethercote
93a1b3630d Bug 507087 - TM/nanojit: change _argtypes fields from 2 bits to 3 bits (TR sync). r=rreitmai,jorendorff. 2009-07-30 10:44:34 +10:00
Nicholas Nethercote
c414a79e4f Bug 501232 - nanojit: remove LIR_2 (3rd attempt!). r=edwsmith,gal. 2009-07-22 10:28:25 +10:00
David Mandelin
ae3b1ce36c Bug 505314: don't use LIR_ialloc with size 0, r=gal 2009-07-21 12:14:33 -07:00
Andreas Gal
9f57d1a918 Backed out changeset 8877e1f8645b (bug 501232). 2009-07-20 14:18:17 -07:00
Nicholas Nethercote
52ab095147 Bug 501232 - nanojit: remove LIR_2. r=edwsmith. 2009-07-17 16:25:18 +10:00
Nicholas Nethercote
d2f31c8fbd Bug 504465 - NJ: Move GC classes to namespace MMgc, r=graydon. 2009-07-16 11:50:27 -07:00
Nicholas Nethercote
acc2840ef2 Bug 504213: nanojit: rename LIR_alloc, LIR_addp, LIR_param to match tamarin-redux. r=graydon. 2009-07-15 10:00:43 +10:00
Peter Van der Beken
c4e9e647fb Backed out changeset c5433450795f (Bug 503990: make isStmt() table-driven). 2009-07-14 11:22:41 +02:00
Nicholas Nethercote
1704e7aacf Bug 503990: make isStmt() table-driven. r=gal. 2009-07-14 13:08:38 +10:00
Julian Seward
b9dc1bb9d6 Bug 496693 - NJ: comment and refactor DeadCodeFilter vs Assembler::gen interactions, r=edwsmith.
--HG--
extra : rebase_source : e675f824946d4a8bb83b2aed8ff1911c8b23caee
2009-07-13 11:50:42 -07:00
Graydon Hoare
e404f743cd Bug 503593 - NJ: whitespace and modeline cleanup, r=gal.
--HG--
extra : rebase_source : c7fcc1acaadb2264796a3ee7a20866eecc4dc484
2009-07-10 12:58:34 -07:00
Nicholas Nethercote
b23341dd32 Fix compile breakage on optimized builds caused by my last commit. 2009-07-07 09:49:55 +10:00
Nicholas Nethercote
ab0511054e Bug 502539: move displacements into load instructions. r=gal,edwsmith. 2009-07-07 09:26:12 +10:00
Nicholas Nethercote
5842226e62 Bug 492866: implement variable-width LIR. r=graydon. 2009-07-01 14:18:55 +10:00
Nicholas Nethercote
8de6422b09 Backed out changeset ae16e5919d19 (tree was closed for talos maintenance). 2009-07-01 11:33:54 +10:00
Nicholas Nethercote
4af0dc60ae Make LIR variable-width (bug 492866, r=graydon). 2009-07-01 11:13:22 +10:00
Julian Seward
b96eed42da Bug 494864 - Make nanojit debug output easier to follow, r=graydon. 2009-06-24 20:32:00 -07:00
Andreas Gal
f3194e9335 Move details of LIns format into LIns class itself (500053, r=dvander). 2009-06-23 14:51:15 -07:00
Nicholas Nethercote
7595f38896 Remove unused field 'parent' from class LabelMap (bug 499400, r=gal). 2009-06-23 14:11:09 +10:00
Nicholas Nethercote
ae3ac6a734 Remove unused isCse() and LirBuffer() args (bug 499260, r=edwsmith). 2009-06-22 14:48:16 +10:00
Nicholas Nethercote
a5db26a0e2 Fix assertion failure in trace-test.js with TRACEMONKEY=verbose (bug 499154, r=graydon). 2009-06-22 10:48:36 +10:00
nnethercote@mozilla.com
015cf5504c remove LIR_calli and LIR_fcalli (492478, r=edwsmith,jorendorff). 2009-06-19 10:20:26 +01:00
Andreas Gal
ac13e56ffd Backed out changeset 1b5584a4eba4. Accidentally committed some unreviewed changes. 2009-06-19 09:42:34 +01:00
Jacob.Bramley@arm.com
7ecc26f135 Remove remaining obsolete ARM Thumb code (486535, r=gal). 2009-06-19 09:37:38 +01:00
Nicholas Nethercote
c4b939cd8f Bug 494639 - NJ: fix numerous LIR memory management problems, r=graydon 2009-06-16 14:01:31 -07:00
Nicholas Nethercote
de28e96de9 NJ: fix load opcode checking, r=graydon. 2009-06-15 12:04:06 -07:00
Andreas Gal
659a7a9b6c Implement oracle-based speculative fmod/fdiv/fmul demotion (474443, r=graydon,dvander). 2009-06-12 08:33:32 -07:00
Nicholas Nethercote
96dd8702a9 Bug 495028. nanojit: add opcode checks to all LIR get/set methods. r=edwsmith 2009-06-06 12:58:11 -04:00
Julian Seward
a61d112402 Bug 494157 - nanojit debug output uses inconsistent output channels. r=jorendorff. 2009-05-26 13:14:41 -05:00
Graydon Hoare
e4863bdb1c Bug 494084 - TM: Lower maximum LIR skip size further, r=gal. 2009-05-21 18:44:37 -07:00