Mike Pall
e205ad0c55
FFI: Fix FOLD rules for int64_t comparisons.
...
Thanks to Peter Cawley.
2017-03-30 11:35:29 +02:00
Mike Pall
4416e885d2
Fix FOLD rules for math.abs() and FP negation.
...
Broken since SIMD constants were switched to IR_FLOAD REF_NIL.
2017-02-20 02:51:31 +01:00
Mike Pall
71ff7ef8a7
Merge branch 'master' into v2.1
2017-01-17 12:41:05 +01:00
Mike Pall
b93a1dd0c8
Bump copyright date to 2017.
2017-01-17 12:35:03 +01:00
Mike Pall
ec2756ba78
Add missing FOLD rule for 64 bit shift+BAND simplification.
2016-12-08 22:38:35 +01:00
Mike Pall
c98660c8c3
Must preserve J->fold.ins (fins) around call to lj_ir_ksimd().
2016-07-22 16:35:46 +02:00
Mike Pall
7fb75ccc4c
Embed 64 bit constants directly in the IR, using two slots.
...
Contributed by Peter Cawley.
2016-05-23 00:25:29 +02:00
Mike Pall
ccae333844
Load SIMD constants with IR_FLOAD from GG_State.
...
Contributed by Peter Cawley.
2016-05-21 01:04:17 +02:00
Mike Pall
1931b38da5
LJ_GC64: Introduce IRT_PGC.
...
Contributed by Peter Cawley.
2016-05-20 22:41:42 +02:00
Mike Pall
f4231949b5
Merge branch 'master' into v2.1
2016-03-03 12:11:37 +01:00
Mike Pall
db1b399af1
Bump copyright date to 2016.
2016-03-03 12:02:22 +01:00
Mike Pall
2c0748f691
Merge branch 'master' into v2.1
2015-03-02 17:34:33 +01:00
Mike Pall
1f578bd424
FFI: Fix FOLD rule for TOBIT + CONV num.u32.
...
Thanks to Jiale Zhi.
2015-03-02 17:34:06 +01:00
Mike Pall
0a5045c34e
Merge branch 'master' into v2.1
2015-01-06 00:12:45 +01:00
Mike Pall
86913b9bbf
Bump copyright date to 2015.
2015-01-05 23:59:31 +01:00
Mike Pall
945af491b6
Merge branch 'master' into v2.1
2014-05-20 11:56:20 +02:00
Mike Pall
e15765186c
Fix FOLD rule for string.sub(s, ...) == k.
2014-05-20 11:41:32 +02:00
Mike Pall
52b081528a
Merge branch 'master' into v2.1
2014-05-15 17:37:38 +02:00
Mike Pall
8a38af2f99
Fix FOLD rule for STRREF of SNEW.
2014-05-15 17:03:28 +02:00
Mike Pall
43dc06bac1
Fix FOLD of string concatenations.
2014-04-15 19:56:23 +02:00
Mike Pall
a9d4543601
Merge branch 'master' into v2.1
2014-01-16 23:18:34 +01:00
Mike Pall
ef59e54820
Bump copyright date to 2014.
2014-01-16 23:10:16 +01:00
Mike Pall
ba9dde2ce6
Merge branch 'master' into v2.1
2014-01-05 16:58:30 +01:00
Mike Pall
6964a7752a
Fix ABC elimination.
2014-01-05 16:57:51 +01:00
Mike Pall
e6e760ca9f
Compile getfenv(0).
2013-10-09 20:34:40 +02:00
Mike Pall
c8cfca0557
Add table.new().
2013-10-09 17:02:01 +02:00
Mike Pall
8201fda2fc
Merge branch 'master' into v2.1
2013-09-14 12:56:37 +02:00
Mike Pall
474bb21af1
Fix ABC elimination.
2013-09-14 12:52:51 +02:00
Mike Pall
d1194a82eb
Low-overhead profiler, part 4: JIT compiler support.
2013-09-08 02:53:23 +02:00
Mike Pall
4c1f9dd0f7
Merge branch 'master' into v2.1
2013-05-24 01:32:10 +02:00
Mike Pall
d686217926
Add missing PHI barrier to string.sub(str, a, b) == kstr FOLD rule.
2013-05-24 01:28:40 +02:00
Mike Pall
4c39e9ffc8
Compile string.format().
2013-05-13 21:18:22 +02:00
Mike Pall
8f90a1279e
Big renaming of string buffer/formatting/conversion functions.
2013-05-13 10:15:07 +02:00
Mike Pall
87993a601d
Inhibit CSE for table.concat().
2013-04-28 11:31:41 +02:00
Mike Pall
068783bf23
Compile string.rep().
2013-04-26 22:55:24 +02:00
Mike Pall
a98e6a70c1
Abstract out some common buffer operations.
2013-04-26 19:20:21 +02:00
Mike Pall
47fa9a8d8f
Change semantics of buffer ops to simplify CSE and DCE.
2013-04-26 13:47:41 +02:00
Mike Pall
5fd659f859
Fix MSVC build.
2013-04-26 10:38:24 +02:00
Mike Pall
bdaf14b2c1
Merge branch 'master' into v2.1
2013-04-26 00:59:35 +02:00
Mike Pall
895a8bc91f
Tighten requirements for non-default optimization flags.
...
FOLD is required for FWD/DSE optimizations.
2013-04-26 00:54:53 +02:00
Mike Pall
b6adfff8f4
Compile string.reverse(), string.lower(), string.upper().
2013-04-26 00:32:08 +02:00
Mike Pall
eeb204cd87
Fix FOLD rules for appending to string buffers.
2013-04-26 00:26:44 +02:00
Mike Pall
39e53e8c4c
Compile string.char().
2013-04-23 12:40:07 +02:00
Mike Pall
255326afb6
Use explicit conversion type for IR_TOSTR. Add char conversion.
2013-04-23 02:20:03 +02:00
Mike Pall
2cdf90f068
Always emit TOSTR for non-string CAT operands. Fuse in backend.
2013-04-23 00:10:01 +02:00
Mike Pall
1ae3e5204b
Fix PHI barrier in BUFPUT FOLD rule.
2013-04-22 22:37:22 +02:00
Mike Pall
5f1781a127
Compile string concatenations (BC_CAT).
2013-04-21 01:01:33 +02:00
Mike Pall
a98aede377
FFI: Add 64 bit bitwise operations.
2013-03-14 06:03:18 +01:00
Mike Pall
b359ce804b
Remove obsolete non-truncating number to integer conversions.
2013-02-23 01:19:00 +01:00
Mike Pall
4a44c4ff69
Bump copyright date to 2013.
2013-02-11 12:54:48 +01:00
Mike Pall
1651684417
Add missing FOLD rules for U32 conversions.
2013-01-21 16:49:03 +01:00
Mike Pall
fd292c9f26
Fix assertion.
2012-10-11 21:40:46 +02:00
Mike Pall
5ebe4990ba
Add LJ_TARGET_UNALIGNED.
2012-10-09 21:42:42 +02:00
Mike Pall
0452e97ba0
Add FOLD rules for CONV.int.i8/u8/i16/u16 of KINT.
2012-10-09 21:36:56 +02:00
Mike Pall
e013206dd8
FFI: ctypeid of ctype object is immutable.
2012-09-27 14:48:13 +02:00
Mike Pall
4c882fe714
Replace strtod() with builtin string to number conversion.
2012-08-25 23:02:29 +02:00
Mike Pall
f2479a9654
Minor fixes to FOLD rules.
2012-08-20 18:45:50 +02:00
Mike Pall
0dd175d9e7
Fix last commit.
2012-08-15 21:08:00 +02:00
Mike Pall
ff0a1f3f4e
FOLD x / 2^k ==> x * 2^-k.
2012-08-15 16:17:34 +02:00
Mike Pall
e8af6e9da4
Don't treat all constified cdata content as constant.
2012-07-24 14:56:29 +02:00
Mike Pall
4d9c29a78c
FFI: Box all accessed or returned enums.
2012-07-17 22:22:07 +02:00
Mike Pall
2139c6791f
Fix FOLD rule (i-j)-i => 0-j.
...
Thanks to Thomas Schilling.
2012-07-17 21:47:45 +02:00
Mike Pall
c172e7aa30
Workaround for MSVC conversion bug (double -> uint32_t -> int32_t).
2012-07-17 21:45:49 +02:00
Mike Pall
17d3fc47f3
Avoid pesky compiler warnings about C++ keywords (eh?).
2012-07-03 13:19:32 +02:00
Mike Pall
a9bf455b96
Add HREFK forwarding. Eliminate HREFK guard for TDUP refs.
2012-06-28 15:10:52 +02:00
Mike Pall
5032e6d87f
FFI: Use CNEWI/FLOAD to box/access ffi.new("int", x) (for varargs).
2012-06-04 15:39:16 +02:00
Mike Pall
10ef109eef
Bump copyright date to 2012.
2012-01-23 22:42:42 +01:00
Mike Pall
455917fa0a
Add more FOLD rules for shift + BAND simplifications.
2011-10-25 21:16:27 +02:00
Mike Pall
aa502203a6
Add missing FOLD rule for CONV.u64.int + sign-extension.
2011-10-22 02:03:07 +02:00
Mike Pall
a39aac0445
Fix FOLD rule for CONV.flt.num(CONV.num.flt(x)) => x.
2011-10-19 01:52:50 +02:00
Mike Pall
270de2d6cc
Add missing FOLD rule for integer NEG of constants.
2011-10-17 17:21:09 +02:00
Mike Pall
f34ac81e3a
Remove unneeded PHI barrier for reassociation of duplicate ops.
2011-10-10 20:35:42 +02:00
Mike Pall
8c5935000d
Add narrowing of modulo operator.
2011-06-03 18:48:02 +02:00
Mike Pall
fff2fb31f9
ARM: Don't generate unaligned XLOADs.
2011-06-02 01:46:23 +02:00
Mike Pall
7683f39786
ARM: Fix math.ldexp() recording and folding.
2011-05-27 02:03:02 +02:00
Mike Pall
185554b682
ARM: Unify rotates to simplify assembler backend.
2011-05-23 20:20:34 +02:00
Mike Pall
28e87d33e9
Use common helper functions for unaligned loads.
2011-05-09 18:09:29 +02:00
Mike Pall
89022b4c3e
Use lj_vm_tobit() on targets without FPU.
2011-04-10 16:58:22 +02:00
Mike Pall
3acd4892e9
Add FOLD rule for FLOAT->NUM->FLOAT conversions.
2011-04-05 16:31:48 +02:00
Mike Pall
dcbae09b1d
DUALNUM: Narrow unary minus.
2011-03-15 18:14:18 +01:00
Mike Pall
7fb1075903
DUALNUM: Add integer variant of MIN/MAX.
2011-03-11 23:28:46 +01:00
Mike Pall
889368e921
Get rid of the remaining silly cast macros from Lua.
2011-03-10 02:13:43 +01:00
Mike Pall
bfce3c1127
DUALNUM: Handle integer type in JIT compiler.
2011-03-10 01:57:24 +01:00
Mike Pall
3f26e3a89d
FFI: Fix and optimize recording of cdata[cdata].
2011-03-10 01:41:58 +01:00
Mike Pall
54978e481b
DUALNUM: Make overflow guards weak. Add IR_USE and IR_MULOV.
2011-03-07 20:21:38 +01:00
Mike Pall
e1aa8d0d97
FFI: Fix compiled ffi.string() semantics.
2011-02-28 19:47:51 +01:00
Mike Pall
97d0874ff5
Add IR_XBAR, a barrier against XLOAD/XSTORE optimizations.
2011-02-07 21:59:25 +01:00
Mike Pall
4c74f70464
Strength-reduce 32 to 64 bit widening for XLOAD U8/U16 inputs.
2011-02-06 00:45:39 +01:00
Mike Pall
26fadcd25b
FFI: Record simple C function calls.
...
Only handles cdecl and fixarg C functions.
Doesn't handle pass-by-value aggregates.
Doesn't handle 64 bit args/returns on 32 bit CPUs.
2011-02-05 21:50:15 +01:00
Mike Pall
14f5103764
FFI: Record C library namespace lookups.
2011-02-05 14:16:16 +01:00
Mike Pall
1abf5d4d26
FFI: Disable MUL => BSHL FOLD rule on 32 bit.
2011-02-03 20:10:13 +01:00
Mike Pall
df65b8b419
FFI: Rename IR_CNEWP to IR_CNEWI and use it to box 64 bit integers.
...
Generates smaller IR and DCE eliminates many intermediate boxes.
Needs allocation sinking to eliminate the boxes kept alive by PHIs.
2011-02-03 04:22:27 +01:00
Mike Pall
1027018b21
Rename IR_POWI to IR_POW.
2011-02-02 21:33:11 +01:00
Mike Pall
433fd18f6d
FFI: Add basic FOLD rules for 64 bit integer DIV, MOD and POWI.
2011-02-02 21:25:43 +01:00
Mike Pall
b613216efc
Add SPLIT pass to split 64 bit IR instructions for 32 bit CPUs.
...
Add generic HIOP instruction for extra backend functionality.
Add support for HIOP to x86 backend.
Use POWI for 64 bit integer x^k, too.
POWI is lowered to a call by SPLIT or the x64 backend.
2011-02-02 02:29:37 +01:00
Mike Pall
6fee0002b9
Fix 64 bit case of (SUB x x) and (BXOR x x) FOLD rules.
2011-01-28 02:17:35 +01:00
Mike Pall
925050fe3f
Differentiate between IR_KPTR and IR_KKPTR.
...
IR_KPTR holds a const pointer to possibly non-const content.
IR_KKPTR holds a const pointer to definitely const content.
Note that only content known by the VM to be const qualifies.
Content tagged as const by users (e.g. const char *) doesn't.
2011-01-19 00:40:03 +01:00
Mike Pall
59643c86fb
Add FOLD rule for CONV.num.u32 KINT.
2011-01-13 17:18:08 +01:00
Mike Pall
06f99fc3df
Bump copyright date to 2011.
2011-01-09 17:12:53 +01:00
Mike Pall
b2c74c52cc
FFI: Add support for cdata constants to IR.
2011-01-02 22:21:10 +01:00