Michael Munday
a3bb1cee5d
Add and use branch on count instructions where possible.
2017-01-11 16:38:35 -05:00
Michael Munday
c8db1b960c
Clean up register allocations and comments slightly.
...
Move RB from r12 to r13 so that it no longer overlaps with the
GOT pointer (to avoid potential problems with PIC compilation).
2017-01-11 16:16:51 -05:00
Michael Munday
084ab26280
Delete LREG and replace it's uses with RB.
...
This frees up a register and fixes a bug where RB was not loaded
correctly into LREG.
2017-01-11 14:42:24 -05:00
Michael Munday
65906fbc49
Fix typo in lj_ccallback.h
...
For future reference only, we aren't using this bit of code yet.
2017-01-11 12:46:30 -05:00
Michael Munday
5c697cc772
Fix ffi calls returning structs.
2017-01-11 12:13:59 -05:00
Michael Munday
f660d36138
Fix ffi calls with complex parameters.
2017-01-11 12:13:52 -05:00
ketank-new
db99c31890
Added example for 'TM' instruction
2017-01-11 17:04:09 +05:30
Michael Munday
938f964b6a
Fix single-precision floating point parameters passed on stack.
...
The opposite way round to the registers for some reason.
2017-01-10 16:56:43 -05:00
Michael Munday
86a24eac4a
Various fixes for FFI calls.
...
Fixes the following scenarios:
* Returning floating point value.
* More than 4 GPR arguments.
2017-01-10 16:11:30 -05:00
Michael Munday
e933353feb
Use execute rather than loop for mvc and avoid jumps in fast path.
...
Not sure if this works, the tests don't exercise the stack code.
2017-01-10 14:12:06 -05:00
Michael Munday
660ddd1db2
Replace some instruction sequences with their SI equivalents.
2017-01-10 12:52:45 -05:00
Michael Munday
21655cf90b
Add remaining (useful) SI instructions to DynASM.
2017-01-10 12:52:02 -05:00
Michael Munday
55af819e97
Remove TODO.
2017-01-10 12:04:17 -05:00
Michael Munday
102d848577
Minor instruction changes.
2017-01-10 11:58:24 -05:00
Michael Munday
d44390a2d3
Use tm{,y} instructions where possible.
2017-01-10 11:44:27 -05:00
Michael Munday
a038a08189
Fix SI (tm) action parsing.
2017-01-10 11:37:25 -05:00
Michael Munday
a8562b7f34
Allow displacements to be used directly without register values.
...
Allows sllg r1, r1, 3(r0,r0) to be written as sllg r1, r1, 3.
2017-01-10 10:50:41 -05:00
Michael Munday
dae61f59d6
Delete some unused function stubs.
2017-01-09 15:57:37 -05:00
Michael Munday
4c738134df
Improve ins_NEXT performance.
...
Prioritise critical path and reduce number of instructions. About
10% improvement on md5 benchmark.
2017-01-09 14:16:44 -05:00
Michael Munday
99b3668995
Add stub dis_s390x.lua file to allow make install to work.
2017-01-09 11:20:13 -05:00
Michael Munday
bb98985db3
Add partial FFI support.
...
Interestingly, enough to pass all the FFI tests. So s390x now
passes all the tests in LuaJIT-test-cleanup.
2017-01-06 16:19:56 -05:00
Michael Munday
5dec8c2211
Fix vm_tsetr (needed by table.remove).
...
The A argument was being loaded as 2-bytes instead of 1.
2017-01-06 13:54:28 -05:00
Michael Munday
ed2d43d73c
Fix VARG.
2017-01-06 11:47:56 -05:00
Michael Munday
2e05e7ca67
Implement math.floor/math.ceil.
2017-01-06 11:16:33 -05:00
Michael Munday
443814b6b3
Add more convert to/from fixed instructions to DynASM.
2017-01-06 11:16:04 -05:00
Michael Munday
a3501b062d
Various fixes for coroutines.
...
Now passing the tests.
2017-01-05 23:39:25 -05:00
Michael Munday
d90293f55e
Implement coroutines.
...
TODO: delete LREG, caused problems while implementing this (x64
doesn't have LREG).
2017-01-05 23:39:25 -05:00
Michael Munday
60fb35cb68
Implement rawget.
2017-01-05 23:39:25 -05:00
ketank-new
c08fa1c119
Enabled math.pow ,math.min and math.max
2017-01-06 10:01:36 +05:30
Michael Munday
1b16e7ce3c
Fix math.pow.
...
The second floating point argument is placed into f2, not f1.
Use the macros FARG{1,2} instead of using the registers directly.
2017-01-05 10:52:27 -05:00
ketank-new
3da26860b7
Updated file to display table contents
2017-01-05 14:50:23 +05:30
niravthakkar
206c650689
Updated the memory parsing
...
The order matters here, so just moved displacement check to end
2017-01-05 14:48:09 +05:30
ketank-new
dcb1dd74ed
Added table Manipulation Functions
2017-01-05 14:40:19 +05:30
ketank-new
fe42519c16
Added String processing Functions
2017-01-05 13:53:18 +05:30
Michael Munday
dfb95646f8
Implement call_tail.
2017-01-04 16:05:55 -05:00
Michael Munday
faef0fb092
Fix for __newindex metamethod.
2017-01-04 15:54:21 -05:00
Michael Munday
80191dcab7
Implement cont_cat.
...
Required to pass cat tests.
2017-01-04 15:34:30 -05:00
Michael Munday
e598c067c3
Fixes for negative string.sub arguments and __index metamethod calls.
2017-01-04 14:50:19 -05:00
Michael Munday
705784a4f9
Implement math.min and math.max.
...
Replicates the standard Lua behaviour in the presence of NaNs.
2017-01-04 11:48:07 -05:00
niravthakkar
7aae451d93
Reverting the changes, as its breaking the build
...
The above expression works on CLI, but its failing here, not sure whats going wrong , Please let me know your comments on it
2017-01-04 18:15:57 +05:30
ketank-new
b92584b497
Added test for OS based functions
2017-01-04 17:45:19 +05:30
niravthakkar
1fe2176241
Updated memory parsing
...
The values of base and index registers have been passed as 0, if only displacement is passed
the displacement is assumed to be alphanumeric (since label might be used)
2017-01-04 17:43:53 +05:30
ketank-new
8b20a0eae2
Added some math function tests
2017-01-04 17:25:13 +05:30
niravthakkar
6bbfa48b93
Updated the memory parsing
...
It accepts 2 registers, without the displacement
2017-01-04 16:20:56 +05:30
Michael Munday
86e5e57f4c
Add emptystr implementation and stub out co-routine functions.
2017-01-03 16:44:36 -05:00
Michael Munday
e739ffedce
Implement string.byte and string.char.
2017-01-03 16:36:34 -05:00
Michael Munday
65af21e2ed
Implement more math functions.
...
Everything apart from min/max should now be working.
2017-01-03 16:12:22 -05:00
Michael Munday
8e747c5406
Implement metamethod support.
...
Allows metamethod tables to be get and set.
2017-01-03 12:17:34 -05:00
ketank-new
47012cea2f
Added example for RX-f based instruction mode
2017-01-03 17:08:30 +05:30
niravthakkar
b84dd8e65d
Added couple of instructions required by test-case
...
maeb(RXF) and cegbra(RRF-e) have been added
2017-01-03 16:16:29 +05:30