Commit Graph

172 Commits

Author SHA1 Message Date
Nicholas Nethercote
b61775ba66 Bug 540368 - nanojit: split LIR_qlo, LIR_live and LIR_ret into two opcodes each to faciliate LIR type-checking (NJ-specific part). r=edwsmith.
--HG--
extra : convert_revision : 54cf6d39a21dc1e209d3e0e48bb6c2b61ab5f909
2010-01-28 08:45:29 +11:00
Nicholas Nethercote
b2dcc26c38 Bug 538924 - nanojit: rework reservations. r=edwsmith.
--HG--
extra : convert_revision : 51a78a175b1074c933323e0bf24d6f64b5c6c35d
2010-01-25 10:39:36 +11:00
Nicholas Nethercote
a0704e558a Bug 540351 - nanojit: refactor hint() and registerAlloc(). r=rreitmai.
--HG--
extra : convert_revision : fa4f34a51239317d312b9388f2eb9ca2631b463e
2010-01-25 09:40:11 +11:00
Nicholas Nethercote
43cc6ace57 Bug 534313 - nanojit: split isQuad() into isI64() + isF64() + is64(). r=dvander,stejohns.
--HG--
extra : convert_revision : f24a70adec4c24dffd3a9c6c3572c5755938291a
2010-01-25 08:25:04 +11:00
Jacek Caban
135d5bea4f Bug 505034 - Compiling Nativei386.cpp on MinGW fails because of different syntax of inline asm. r=graydon
--HG--
extra : convert_revision : 998ded176a21bee139e444182005f320bcbcfa1e
2010-01-18 20:34:13 -05:00
Jeff Walden
731a9fd5f8 Oops, back out changeset af515d48bdcf, should have gone to nanojit-central instead. :-\ 2010-01-18 20:27:43 -05:00
Jacek Caban
8991f44a3c Bug 505034 - Compiling Nativei386.cpp on MinGW fails because of different syntax of inline asm. r=graydon 2010-01-18 15:08:30 -05:00
Nicholas Nethercote
0c9683a5c5 Bug 539379 - TM: Crash [@ ExecuteTrace] or [@ ExecuteTree]. r=edwsmith.
--HG--
extra : convert_revision : a5115ee971c8496182e9b4f6847ad91619b4a585
2010-01-15 15:07:32 +11:00
Vladimir Vukicevic
78c3d13a0e b=523251; add LIR_f2i; r=njn,edwsmith
--HG--
extra : convert_revision : 95e6284a8725404dfb1f2685e1ee5efdc334d169
2010-01-13 14:40:35 -08:00
Edwin Smith
313f22a44e Lazy-allocate code memory for side exits (bug 538393 r=nnethercote+)
--HG--
extra : convert_revision : 97bacc5dff62389b91741265ca30dc73a2a8f532
2010-01-12 08:58:14 -05:00
Vladimir Vukicevic
37cc5c283f Backed out changeset fea4da580994 -- need to split LIR_f2i into nj-central and tm patches 2010-01-11 21:54:02 -08:00
Vladimir Vukicevic
373168d7d3 b=523251; add LIR_f2i; r=gal 2010-01-11 21:41:20 -08:00
Nicholas Nethercote
b3361ed5f3 Bug 538060 - nanojit: improve 64-bit loads and stores in the X64 back-end. r=gal,rreitmai,edwsmith.
--HG--
extra : convert_revision : 1fd416d0954dc667073f3a92087c01fc23e5c3aa
2010-01-11 15:51:49 +11:00
Edwin Smith
127df225b6 Whitespace hygene (r=me)
--HG--
extra : convert_revision : f5f333d75636ed9e4c7869bdcf6aaa69beb35a2e
2010-01-07 13:05:33 -05:00
Steven Johnson
9efa35156a Add NJ_USES_QUAD_CONSTANTS mode (and i386 implementation) to allow for faster float constants on CPUs without useful 64-bit immediates. Instead of allocating stack space for the constants (and filling them in via move-immediates), allocate data space for them and embed literal pointers into the code stream. (r=edwsmith, r=nnethercote, bug=533546)
--HG--
extra : convert_revision : 42048199209f5614ee62adaa25cc6bf75821911a
2010-01-05 15:28:40 -08:00
Ginn Chen
01e2876566 Bug 535765 debug build Firefox failed to start on Solaris r=gal 2010-01-06 15:24:30 +08:00
Nicholas Nethercote
1022818501 Bug 520714 - nanojit: distinguish 64-bit int and float loads/stores. r=gal,rreitmai.
--HG--
extra : convert_revision : a19809f7ba60b4381b77b84363bebf0ff7cf9629
2010-01-05 14:03:49 +11:00
Nicholas Nethercote
1c0554f24b Bug 524640 - nanojit: avoid calling releaseRegisters() twice. r=gal.
--HG--
extra : convert_revision : 5af925a7a5ceae6ab8bb9219585bfacccdf56ef0
2009-12-22 21:37:49 +11:00
Edwin Smith
245eaeb9f7 Whitespace hygene (r=me)
--HG--
extra : convert_revision : b7a4852a92d3ceb74592c1da0e1cd0beace84eb5
2009-12-21 15:05:48 -05:00
Steven Johnson
f6bd527266 Encapsulate AR structure (r=nnethercote,bug=473769)
--HG--
extra : convert_revision : a2bdfa990384135e642f027d79dd7c01c48e8994
2009-12-21 10:51:57 -08:00
Nicholas Nethercote
0a83128602 Bug 516347 - nanojit: avoid premature regalloc state updates in the i386 backend. r=edwsmith,dvander.
--HG--
extra : convert_revision : e7b2c0d805eb61ca0ead9402f8a01f6bb85de29f
2009-12-18 12:39:16 +11:00
Nicholas Nethercote
387808d7b9 Bug 527178 - NJ: all our efforts at handling valid displacements are defeated (take 2a). r=graydon,gal.
--HG--
extra : convert_revision : c2be4b89e09d6dd1b8c83b14240d00d57c084419
2009-12-18 08:24:39 +11:00
Nicholas Nethercote
0cda95948c Bug 534575 - nanojit: fix bogosity in asm_cmp(). r=edwsmith.
--HG--
extra : convert_revision : f5573b092a7f11abed716341629dff0b36bb09e6
2009-12-16 10:16:47 +11:00
Nicholas Nethercote
d0b6417b4c Backed out changeset 2bd8a736808d, caused ARM bustage.
--HG--
extra : convert_revision : 7fd3a1258dbf608d4c62862029d1a30317f7b9e5
2009-12-15 13:16:54 +11:00
Nicholas Nethercote
84f5fd65b2 Bug 527178 - NJ: all our efforts at handling valid displacements are defeated (take 2). r=graydon,gal.
--HG--
extra : convert_revision : 2bd8a736808d4a2582233d05832f11899ccc2fd7
2009-12-15 12:54:26 +11:00
Steven Johnson
b14fa9aead nanojit/Nativei386.cpp: asm_load64 for i386 wasn't properly copying the loaded value into the stack frames in all cases for non-sse2 path. (r=edwsmith, bug=534613)
--HG--
extra : convert_revision : 107017b4c232e89e4ecb11ef69c11747644a6dc3
2009-12-14 10:58:24 -08:00
Nicholas Nethercote
51c20028df Bug 533233 - nanojit: get rid of LC_NoCodeAddrs. r=edwsmith.
--HG--
extra : convert_revision : 5edcef2131dfd0f521b306aee9a40a51b487efb9
2009-12-08 07:57:17 -08:00
Nicholas Nethercote
a4408cec60 Bug 531347 - nanojit: rejig asm_call(). r=edwsmith.
--HG--
extra : convert_revision : 1c68f440a757a8cb002c8da9118d034a9c7d4fab
2009-12-01 18:50:07 -08:00
Steven Johnson
45a6270f4c Add new opcodes to allow load/store of 8-bit int, 16-bit int, and 32-bit floats. Initially implemented only for i386, other backend implementations to follow. See https://bugzilla.mozilla.org/show_bug.cgi?id=527083 for more detail. (r=rreitmai, nnethercote)
--HG--
extra : convert_revision : 7c5395e67078266797de2e2de6555974ee61acf7
2009-12-01 16:50:03 -08:00
Rick Reitmaier
5be99c7ad2 Bug 500466 - avmshell crashes on P3 cpu machine with JIT enabled (r+nnethercote,edwsmith)
Copy x86 CPU detection code from jstracer into Nativei386;
allowing hosts to share the common code.

One potential issue with this patch is that the detection code is
executed each time an Assembler object is created.

If it becomes an issue, it might be worthwhile to add a tri-state
to config in order to capture the value post-test.

--HG--
extra : convert_revision : ab0a893ffe833f1562216186567d4e7798be45aa
2009-12-01 11:36:07 -08:00
Nicholas Nethercote
b7cf8c804f Bug 531324 - nanojit: improve int32 constant generation in i386 backend. r=graydon.
--HG--
extra : convert_revision : 3b04b5fdd47f0469f040fb147d60ed4cd30d8c8e
2009-11-30 17:26:15 +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
a603d864d1 Bug 512181 - nanojit: rework TMFLAGS=assembly,regalloc,activation. r=edwsmith.
--HG--
extra : convert_revision : 43e64a1135f17761aad95ee7ce2d1692aa937579
2009-11-24 22:38:51 -08:00
Nicholas Nethercote
b33368aede Bug 525379 - nanojit: make the _nIns/_nExitIns swap hack more consistent. r=edwsmith.
--HG--
extra : convert_revision : bad9394918255f4afcbff259153dc9d8c9afad25
2009-11-24 14:56:33 +11:00
Nicholas Nethercote
348df1cdbf Bug 529725 - nanojit: improve asm_prep_fcall() in i386 and Sparc backends. r=rreitmai.
--HG--
extra : convert_revision : 30767eb970427b1044fae5db99c2427f57e576fe
2009-11-23 11:04:59 +11:00
Nicholas Nethercote
e26daf15b9 Bug 513863 - nanojit: refactor registerAlloc(). r=rreitmai.
--HG--
extra : convert_revision : 6b7cffb8984f821980d38d4c9ccd31f8bdd3e363
2009-11-18 12:27:57 +11:00
Nicholas Nethercote
391f339dc4 Bustage fix: avoid compiler warning (which is treated as an error by tinderbox). r=me.
--HG--
extra : convert_revision : 225c22dfb86b51c2e28e0328d98032d52e10d58d
2009-11-18 11:35:39 +11:00
Nicholas Nethercote
5fd3964fe4 Bug 528419 - nanojit: overhaul i386 comparison handling. r=edwsmith.
--HG--
extra : convert_revision : f05d2e60125fd7ffc5ab67bb0541012638d4d1cb
2009-11-18 11:15:20 +11:00
Nicholas Nethercote
3cdf300b3f Bug 527874 - nanojit: add and remove some uses of findSpecificRegForUnallocated(). r=rreitmai.
--HG--
extra : convert_revision : 8a61bb2085985eb84772ca1ad924eee5b7fe544f
2009-11-13 09:23:14 +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
b19353ba34 Bug 517405 - nanojit: don't compute x86 FP conditions twice(!). r=rreitmai.
--HG--
extra : convert_revision : bb0d40d10977953fffe3063745de0d8778bec6c6
2009-11-04 16:44:13 +11:00
Nicholas Nethercote
d97e5c6a9e Bug 516348 - nanojit: add findSpecificRegForUnallocated(). r=edwsmith.
--HG--
extra : convert_revision : 0e40a8977b80a96f9233488878589afcdfc8d800
2009-11-04 14:45:29 +11:00
Graydon Hoare
9d9ae9f4a1 Bug 525293 - Cumulative remainder of changes from tamarin, r=dvander. 2009-10-29 12:29:28 -07:00
Graydon Hoare
c287bc3151 Bug 522314 - Make x86 virtual stack pointer code optional, g=gal.
--HG--
extra : rebase_source : c0feec3b6f94580fab0e8569a817bf36db7ed1ab
2009-10-23 13:46:09 -07:00
Graydon Hoare
399e52afa4 Bug 523505 - move icache flushing logic around, r=gal. 2009-10-21 16:26:52 -07:00
Graydon Hoare
d88df29f9d Bug 522316 - more miscellaneous drift from tamarin, r=dvander.
--HG--
extra : rebase_source : 7b92362823d4ef60ebced322c1588b6cd9f445e4
2009-10-14 13:48:00 -07:00
Andreas Gal
b4c8bbda6f Avoid redundant stack pointer fiddling when calling functions (514827, r=rreitmai,dvander). 2009-10-07 14:25:29 -07:00
Nicholas Nethercote
4565f5f07e Bug 519376 - NJ merge: move __SUNPRO _CC gunk. r=dvander. 2009-09-30 11:25:39 +10:00
Makoto Kato
968b3b2fc0 Bug 518775 - Remove unused Windows x64 code of Nativei386.cpp. r=gal 2009-09-28 18:27:21 +09:00