这是indexloc提供的服务,不要输入任何密码
Skip to content

s390x support for Luajit #395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 261 commits into
base: v2.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
261 commits
Select commit Hold shift + click to select a range
71d40ba
Add some s390x C calling convention constants.
mundaym Nov 15, 2016
820fa8a
Delete gcc version check for now.
mundaym Nov 15, 2016
3e472eb
Update lj_arch.h
ketank-new Nov 16, 2016
31fb648
Update lj_arch.h
ketank-new Nov 16, 2016
498f028
Update lj_target_s390x.h
ketank-new Nov 16, 2016
dcb977d
Changed the encoding for add,and,branch instructions
niravthakkar Nov 16, 2016
777b067
Update lj_target_s390x.h
ketank-new Nov 16, 2016
547b158
Update vm_s390x.dasc
ketank-new Nov 16, 2016
c36895a
Update lj_frame.h
ketank-new Nov 16, 2016
4aa1099
Update vm_s390x.dasc
ketank-new Nov 17, 2016
3ac644e
Update vm_s390x.dasc
ketank-new Nov 18, 2016
e90d985
Look for s390x file rather than S390x file.
mundaym Nov 18, 2016
31c0e60
Update vm_s390x.dasc
ketank-new Nov 22, 2016
d50f8aa
Add preliminary frame offsets.
mundaym Nov 22, 2016
d505a0e
Cleanup.
mundaym Nov 22, 2016
5a69b46
Fixup the save/restore register macros.
mundaym Nov 22, 2016
dbf7895
Fix stack frame layout.
mundaym Nov 23, 2016
5887962
Add assembly for decoding instructions.
mundaym Nov 23, 2016
372f721
Update vm_s390x.dasc
ketank-new Nov 24, 2016
4ea7607
Update vm_s390x.dasc
ketank-new Nov 24, 2016
3288e54
Update vm_s390x.dasc
ketank-new Nov 24, 2016
9b01b4d
Added s390x instructions with their encoding
niravthakkar Nov 25, 2016
cac5d4f
Add extended mnemonics for branches.
mundaym Nov 25, 2016
2030065
Removed the extra check in parse_reg
niravthakkar Nov 28, 2016
538a4af
Updated size of the instruction word
niravthakkar Nov 28, 2016
7a49be0
Added the required character for encoding
niravthakkar Nov 29, 2016
0e32411
Various cleanup of dasm_s390x.lua
mundaym Nov 29, 2016
89ca41c
Add sp -> r15 mapping and don't special case or_2
mundaym Nov 29, 2016
36479af
Add stubs for parsing memory operands and delete unwanted code.
mundaym Nov 29, 2016
d97dea2
Add a description of how immediate actions should be encoded.
mundaym Nov 29, 2016
000b1a8
Breakup instructions and action list into halfword chunks.
mundaym Nov 29, 2016
cf225d2
Fix C code in header file and handle br template.
mundaym Nov 30, 2016
a34bcf9
Add initial support for D(B,X) memory operands (12-bit only).
mundaym Nov 30, 2016
575c907
Minor cleanup of regular expressions.
mundaym Nov 30, 2016
dd6448f
Changed the templates based on no of arguments
niravthakkar Dec 1, 2016
c71a618
Fix indentation.
mundaym Dec 1, 2016
77f283c
Allow symbols to be used for 12-bit displacements.
mundaym Dec 1, 2016
6ae327d
Add support for RXY instructions (20-bit displacements).
mundaym Dec 2, 2016
1b7ded5
Add support for RS-a and RSY-a instructions like stm and stmg.
mundaym Dec 2, 2016
4c7e494
Added support for Immediate addressing mode
niravthakkar Dec 2, 2016
4555389
Minor change , missed out brace
niravthakkar Dec 2, 2016
1d960f2
Create test_z_inst.c
ketank-new Dec 2, 2016
f0cc294
Update test_z_inst.c
ketank-new Dec 2, 2016
b97a7f7
Minor cleanup and modified 32 bit signed check
niravthakkar Dec 2, 2016
f0dd40d
Adding support for Immediate add mode
niravthakkar Dec 2, 2016
3d5c692
Minor change: Cleanup
niravthakkar Dec 2, 2016
621ae87
Cleanup and fix compilation.
mundaym Dec 2, 2016
fc2b633
Auto-format dasm_s390x.h.
mundaym Dec 2, 2016
2324be8
Reduce indentation level of big switch statement.
mundaym Dec 2, 2016
7181c39
Add C code to handle IMM16.
mundaym Dec 2, 2016
3ec573e
Add support for .align directive.
mundaym Dec 2, 2016
1dd736f
Auto-format dasm_s390x.h (again).
mundaym Dec 2, 2016
17d91e2
Update test_z_inst.c
ketank-new Dec 5, 2016
9745e9d
Get DASM_SECTION argument from the correct place.
mundaym Dec 2, 2016
d7f7509
Minor indentation fixes.
mundaym Dec 2, 2016
54199bd
Clean up test file and add script to run tests.
mundaym Dec 5, 2016
d9e61fe
Shorten templates by four characters.
mundaym Dec 5, 2016
be3efbc
Add simple tests for RX and RXY style instructions.
mundaym Dec 5, 2016
410bdb8
Minor cleanup of dasm_s390x.lua.
mundaym Dec 5, 2016
73ad6dc
Add support for jumps to local labels.
mundaym Dec 5, 2016
2156278
Updated the addressing mode working
niravthakkar Dec 6, 2016
7c79bbc
Update test_z_inst.c
ketank-new Dec 6, 2016
ba4343d
Added support for Immediate mode 16 bit
niravthakkar Dec 6, 2016
1362e9a
Minor Cleanup
niravthakkar Dec 6, 2016
b24d490
Fix test table (needed comma at end of line to compile).
mundaym Dec 6, 2016
e3ab67a
Support forward local branches.
mundaym Dec 6, 2016
53b627b
s/SP/sp/ in vm_s390x.dasc.
mundaym Dec 6, 2016
3ae1c4f
Support floating point register arguments.
mundaym Dec 6, 2016
c688a0a
Add support for brasl instruction.
mundaym Dec 6, 2016
cdfb632
Add ADD HALFWORD IMMEDIATE (64-bit) instruction (aghi).
mundaym Dec 6, 2016
1555770
Add test for PC-style labels.
mundaym Dec 6, 2016
a036388
Re-order test function.
mundaym Dec 6, 2016
22f4e6a
Update test_z_inst.c
ketank-new Dec 7, 2016
79cc499
Update test_z_inst.c
ketank-new Dec 7, 2016
127f0fd
Adding RRD support
niravthakkar Dec 7, 2016
8281c33
Comment out failing tests for now.
mundaym Dec 7, 2016
1067182
Add support for SS-a instructions.
mundaym Dec 7, 2016
1f03481
Updated comment for test jmp_fwd()
ketank-new Dec 8, 2016
b98c92e
Delete unused branch_type function.
mundaym Dec 8, 2016
d472a3c
Add support for .type directives.
mundaym Dec 8, 2016
1a06b65
Fix a couple of templates that were too short.
mundaym Dec 8, 2016
9b9e1ea
Added SS-b mode
niravthakkar Dec 9, 2016
cf4813f
Added SS-b support in C
niravthakkar Dec 9, 2016
aa096ed
Minor fix
niravthakkar Dec 9, 2016
052eb69
Make host/buildvm_asm.c compile.
mundaym Dec 9, 2016
308fa09
Fix warning in dasm_s390x.h.
mundaym Dec 9, 2016
111b622
Define DASM_CHECKS when running tests.
mundaym Dec 9, 2016
625aad5
Make LuaJIT compile on s390x.
mundaym Dec 9, 2016
1c7a727
Correct the range of parameter, and merge the two case
niravthakkar Dec 12, 2016
361a298
Add lhi instruction and fix immediate parsing.
mundaym Dec 12, 2016
0b120ac
Add partial implementation of vm_cpcall.
mundaym Dec 12, 2016
3ef1f21
Add support for SIL instructions in DynASM.
mundaym Dec 13, 2016
c83f4af
Add more RI-a (register-immediate) instructions.
mundaym Dec 13, 2016
7644f40
Add more interpreter code.
mundaym Dec 13, 2016
fc5874c
Added RRF-e support
niravthakkar Dec 14, 2016
2f96ca3
Adding support for RXE mode instructions
niravthakkar Dec 14, 2016
45669fe
Added RRF-b mode support
niravthakkar Dec 14, 2016
bc49001
Adding S mode instructions support
niravthakkar Dec 14, 2016
52ab059
Added support for I mode instructions
niravthakkar Dec 14, 2016
cdb3106
Added the action part for I mode
niravthakkar Dec 14, 2016
4641b9a
Added C support for I mode instructions
niravthakkar Dec 14, 2016
a8244c0
Added support for RI-b and RI-c mode instructions
niravthakkar Dec 14, 2016
f01f459
Added support for RIL-c and RX-b instructions
niravthakkar Dec 14, 2016
ccd2614
Added support for RIE-e, RSI, RXF, SI instructions
niravthakkar Dec 14, 2016
52368ac
Minor cleanup
niravthakkar Dec 14, 2016
df7c324
Minor Fix, correct the parameter used
niravthakkar Dec 14, 2016
d63ff89
Added support for RRD addressing mode
niravthakkar Dec 14, 2016
49182c4
Added test for RRD and RRF-e
niravthakkar Dec 14, 2016
ef3ff10
Fix decoding of REL_EXT.
mundaym Dec 14, 2016
00d00e9
Fix extern handling in host vm builder.
mundaym Dec 14, 2016
24f2ab4
Various fixes for vm_s390x.dasc.
mundaym Dec 14, 2016
f79a6f3
Add support for clm instruction.
mundaym Dec 15, 2016
ee4b942
Add vm_call handling code.
mundaym Dec 15, 2016
b7c4e4b
Added rre instruction format example
ketank-new Dec 15, 2016
2dcbf5b
Implement more functions in the VM.
mundaym Dec 15, 2016
24bdb75
Add debug options to Makefile.
mundaym Dec 15, 2016
bee112d
Add support for global short assignments.
mundaym Dec 16, 2016
6a9855d
Add support for print function call.
mundaym Dec 18, 2016
3330f6a
Fix KSHORT destination slot address.
mundaym Dec 19, 2016
0d442ec
Add some more instructions to DynASM.
mundaym Dec 19, 2016
299dc34
Add basic integer for loop support.
mundaym Dec 19, 2016
e467d78
Fix floating point fallback code for for loops.
mundaym Dec 19, 2016
28b6fe8
Updated encoding for instructions
niravthakkar Dec 20, 2016
5076a3e
Fix some DynASM instructions.
mundaym Dec 20, 2016
5df5e1f
Add support for integer add/subtract.
mundaym Dec 20, 2016
d256d99
Add support for floating point add/sub.
mundaym Dec 20, 2016
d94f4ac
Add support for multiplication.
mundaym Dec 20, 2016
d006b07
Add support for division.
mundaym Dec 20, 2016
419869b
Fixes for DynASM.
mundaym Dec 20, 2016
e0e98f9
Add support for modulo (%) operations.
mundaym Dec 20, 2016
90334d3
Add support for function definitions.
mundaym Dec 20, 2016
eda56c9
Add support for if statements.
mundaym Dec 20, 2016
b5aa0d0
Fix bug in division.
mundaym Dec 20, 2016
4853da8
Added test example for RXE mode
ketank-new Dec 21, 2016
ae38a69
Add support for numeric equality checks.
mundaym Dec 21, 2016
8518df8
Implement some boolean operations.
mundaym Dec 21, 2016
9da6ff7
Implement more equality checks.
mundaym Dec 21, 2016
e19544a
Implement unary minus.
mundaym Dec 21, 2016
1825037
Implement table creation and printing.
mundaym Dec 21, 2016
6fc4c0c
Fix BC_MCALL
mundaym Dec 22, 2016
01dbd6d
Implement TDUP, TGETB and TSETB.
mundaym Dec 22, 2016
20f05a4
Implement more tset and tget metamethods.
mundaym Dec 22, 2016
cab0337
Implement TGETV and TSETV.
mundaym Dec 22, 2016
c0c155e
Implement/fix TGETS and TSETS.
mundaym Dec 22, 2016
077ccc8
Implement LEN.
mundaym Dec 22, 2016
354b5c7
Implement a UCLO, ff_assert and a couple of other bits.
mundaym Dec 22, 2016
aba9cfb
Implement UGET.
mundaym Dec 28, 2016
6673652
Implement TSETM and VARG.
mundaym Dec 28, 2016
5dc644a
Implement LOOP.
mundaym Dec 28, 2016
2584c6d
Implement ISNUM, ISTYPE, TGETR and TSETR.
mundaym Dec 28, 2016
230a4aa
Implement KNIL and CALLMT.
mundaym Dec 28, 2016
29223bb
Implement POW.
mundaym Dec 29, 2016
e8ca7b8
Implement CAT.
mundaym Dec 29, 2016
e6eb12b
Implement bit operations.
mundaym Dec 29, 2016
12602d2
Fix for DynASM buffer overflow.
mundaym Dec 29, 2016
21f2fdf
Partially implement ipairs.
mundaym Dec 29, 2016
5e7121c
Implement ipairs.
mundaym Dec 30, 2016
21073df
Add FORL implementation (just fallthrough).
mundaym Dec 30, 2016
a5d9604
Implement USETV.
mundaym Dec 30, 2016
6fbe356
Implement USETN, USETP and USETS.
mundaym Dec 30, 2016
4f1c4dc
Implement pairs (including ISNEXT and ITERN).
mundaym Dec 30, 2016
39c37a1
Remove debug code from tostring.
mundaym Dec 30, 2016
7033988
Added test.lua file
ketank-new Jan 2, 2017
700f0e7
Updated test.lua withe more tests
ketank-new Jan 2, 2017
5dd0c24
Updated with ipairs & table based example
ketank-new Jan 2, 2017
bc065ce
Added switch case and while loop test
ketank-new Jan 2, 2017
a13e120
Added definition to function 'twice()'
ketank-new Jan 2, 2017
dd6ecfa
Added SIY addressing mode support
niravthakkar Jan 3, 2017
d02e076
Minor fix, for arguments in shift operations
niravthakkar Jan 3, 2017
b84dd8e
Added couple of instructions required by test-case
niravthakkar Jan 3, 2017
47012ce
Added example for RX-f based instruction mode
ketank-new Jan 3, 2017
8e747c5
Implement metamethod support.
mundaym Jan 3, 2017
65af21e
Implement more math functions.
mundaym Jan 3, 2017
e739ffe
Implement string.byte and string.char.
mundaym Jan 3, 2017
86e5e57
Add emptystr implementation and stub out co-routine functions.
mundaym Jan 3, 2017
6bbfa48
Updated the memory parsing
niravthakkar Jan 4, 2017
8b20a0e
Added some math function tests
ketank-new Jan 4, 2017
1fe2176
Updated memory parsing
niravthakkar Jan 4, 2017
b92584b
Added test for OS based functions
ketank-new Jan 4, 2017
7aae451
Reverting the changes, as its breaking the build
niravthakkar Jan 4, 2017
705784a
Implement math.min and math.max.
mundaym Jan 4, 2017
e598c06
Fixes for negative string.sub arguments and __index metamethod calls.
mundaym Jan 4, 2017
80191dc
Implement cont_cat.
mundaym Jan 4, 2017
faef0fb
Fix for __newindex metamethod.
mundaym Jan 4, 2017
dfb9564
Implement call_tail.
mundaym Jan 4, 2017
fe42519
Added String processing Functions
ketank-new Jan 5, 2017
dcb1dd7
Added table Manipulation Functions
ketank-new Jan 5, 2017
206c650
Updated the memory parsing
niravthakkar Jan 5, 2017
3da2686
Updated file to display table contents
ketank-new Jan 5, 2017
1b16e7c
Fix math.pow.
mundaym Jan 5, 2017
c08fa1c
Enabled math.pow ,math.min and math.max
ketank-new Jan 6, 2017
60fb35c
Implement rawget.
mundaym Jan 5, 2017
d90293f
Implement coroutines.
mundaym Jan 5, 2017
a3501b0
Various fixes for coroutines.
mundaym Jan 6, 2017
443814b
Add more convert to/from fixed instructions to DynASM.
mundaym Jan 6, 2017
2e05e7c
Implement math.floor/math.ceil.
mundaym Jan 6, 2017
ed2d43d
Fix VARG.
mundaym Jan 6, 2017
5dec8c2
Fix vm_tsetr (needed by table.remove).
mundaym Jan 6, 2017
bb98985
Add partial FFI support.
mundaym Jan 6, 2017
99b3668
Add stub dis_s390x.lua file to allow make install to work.
mundaym Jan 9, 2017
4c73813
Improve ins_NEXT performance.
mundaym Jan 9, 2017
dae61f5
Delete some unused function stubs.
mundaym Jan 9, 2017
a8562b7
Allow displacements to be used directly without register values.
mundaym Jan 10, 2017
a038a08
Fix SI (tm) action parsing.
mundaym Jan 10, 2017
d44390a
Use tm{,y} instructions where possible.
mundaym Jan 10, 2017
102d848
Minor instruction changes.
mundaym Jan 10, 2017
55af819
Remove TODO.
mundaym Jan 10, 2017
21655cf
Add remaining (useful) SI instructions to DynASM.
mundaym Jan 10, 2017
660ddd1
Replace some instruction sequences with their SI equivalents.
mundaym Jan 10, 2017
e933353
Use execute rather than loop for mvc and avoid jumps in fast path.
mundaym Jan 10, 2017
86a24ea
Various fixes for FFI calls.
mundaym Jan 10, 2017
938f964
Fix single-precision floating point parameters passed on stack.
mundaym Jan 10, 2017
db99c31
Added example for 'TM' instruction
ketank-new Jan 11, 2017
f660d36
Fix ffi calls with complex parameters.
mundaym Jan 10, 2017
5c697cc
Fix ffi calls returning structs.
mundaym Jan 11, 2017
65906fb
Fix typo in lj_ccallback.h
mundaym Jan 11, 2017
084ab26
Delete LREG and replace it's uses with RB.
mundaym Jan 11, 2017
c8db1b9
Clean up register allocations and comments slightly.
mundaym Jan 11, 2017
a3bb1ce
Add and use branch on count instructions where possible.
mundaym Jan 11, 2017
9e9a1cf
Replace lay with la where possible.
mundaym Jan 11, 2017
a9d61d0
Implement debug.sethook().
mundaym Jan 12, 2017
70b5f6b
Make TMPR1 r1 and RA r4.
mundaym Jan 16, 2017
828bf84
Rename TMPR2 as TMPR0.
mundaym Jan 16, 2017
a40e905
Implement return hooks.
mundaym Jan 16, 2017
695c597
Swap register assignments for BASE and RB.
mundaym Jan 17, 2017
e151ede
Avoid saving/restoring floating point registers when entering the int…
mundaym Jan 17, 2017
77852cb
Don't bother saving BASE before a call unless it will be modified.
mundaym Jan 17, 2017
9d0846e
Add debug frame information to the interpreter.
mundaym Jan 17, 2017
0a18b89
Implement the LUAJIT_UNWIND_EXTERNAL option.
mundaym Jan 18, 2017
34394c4
Add file change missing from previous commit (needed for EXT unwinding).
mundaym Jan 18, 2017
e7e346f
Implement support for unwinding through FFI stack frames.
mundaym Jan 18, 2017
908528d
Revert "Avoid saving/restoring floating point registers when entering…
mundaym Jan 18, 2017
d475b5b
Add some TODOs to the saveregs and restoreregs macros.
mundaym Jan 18, 2017
5f72b23
Remove unnecessary register moves.
mundaym Jan 18, 2017
7b6aa86
Remove TODOs for branch on index.
mundaym Jan 18, 2017
f13d231
Use z10 instructions more frequently.
mundaym Jan 30, 2017
a06bfc9
Remove various TODOs.
mundaym Jan 30, 2017
8141ca5
Simplify right rotations.
mundaym Jan 30, 2017
58460de
Hoist some loop invariants.
mundaym Jan 30, 2017
22a9549
Delete old BUG comment.
mundaym Jan 30, 2017
e1e3483
s/TMP_STACK/SAVE_TMP/
mundaym Jan 31, 2017
08e97d4
Remove out of date comments.
mundaym Jan 31, 2017
60bc2fa
Sort instructions in alphabetical order.
mundaym Jan 31, 2017
7352e70
Use real encoding names for extended mnemonics.
mundaym Jan 31, 2017
0901773
Re-arrange instruction encodings so they are in alphabetical order.
mundaym Jan 31, 2017
72ba386
Various minor style changes.
mundaym Jan 31, 2017
0437513
Merge branch 'v2.1' of https://github.com/LuaJIT/LuaJIT into v2.1
preetikhorjuvenkar Feb 14, 2018
00c4e1c
Changed the year from 2016 to 2017
preetikhorjuvenkar Feb 14, 2018
d8f783f
Deleting an empty file. Also minor changes to the test.lua file
preetikhorjuvenkar Feb 14, 2018
9eaff28
Removing reference to dis_s390x.lua
preetikhorjuvenkar Feb 14, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ FILES_INC= lua.h lualib.h lauxlib.h luaconf.h lua.hpp luajit.h
FILES_JITLIB= bc.lua bcsave.lua dump.lua p.lua v.lua zone.lua \
dis_x86.lua dis_x64.lua dis_arm.lua dis_arm64.lua \
dis_arm64be.lua dis_ppc.lua dis_mips.lua dis_mipsel.lua \
dis_mips64.lua dis_mips64el.lua vmdef.lua
dis_mips64.lua dis_mips64el.lua vmdef.lua

ifeq (,$(findstring Windows,$(OS)))
HOST_SYS:= $(shell uname -s)
Expand Down
13 changes: 13 additions & 0 deletions dynasm/Examples/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
# set -x

# run test
lua ../dynasm.lua test_z_inst.c | gcc -DDASM_CHECKS -std=gnu99 -Wall -Werror -g -x c -o test_z_inst -
./test_z_inst
ec=$?

# cleanup
rm -f ./test_z_inst

# exit
exit $ec
Loading