Andy Wingo
926275e123
Add support for aarch64 in CI
2019-05-16 12:03:38 +02:00
Andy Wingo
9d4185af2b
Remove jit_nop
...
Instead, jit_align will call nop() internally. You can't nop 3 bytes on
most architectures.
2019-05-16 11:40:24 +02:00
Andy Wingo
5b8262e804
Rework register saving to avoid push/pop
...
Push and pop are not well supported on AArch64, so we might as well just
bump the stack pointer once and fill in by offset.
2019-05-15 15:41:02 +02:00
Andy Wingo
04cd8874de
Stack alignment takes saved return address into account
2019-04-28 12:37:19 +02:00
Andy Wingo
59ead16eab
Mark test files as precious to prevent them from being deleted by make
2019-04-28 10:47:52 +02:00
Andy Wingo
d8bdefbd2f
Add test for JIT callee with many args
2019-04-27 23:11:13 +02:00
Andy Wingo
d11864f098
Add {enter,leave}_jit_abi calls in tests
...
This saves and restores RBP on x86-32.
2019-04-27 22:54:38 +02:00
Andy Wingo
81ba8830a2
Fix ABI of arg to extr_d_f test
2019-04-27 22:36:06 +02:00
Andy Wingo
e0cf51e482
Small bug fixes for ia32
2019-04-26 17:41:43 +02:00
Andy Wingo
42bc762d26
Add facility to enter and leave JIT ABI
...
This allows us to save and restore callee-save temporaries, i.e. RBP on
32-bit x86. Otherwise it's a disaster shuffling stack arguments using
temporaries.
2019-04-26 17:28:29 +02:00
Andy Wingo
b116314591
Fix compile warnings for 32-bit tests
2019-04-26 15:56:08 +02:00
Andy Wingo
e9d1567f7f
Use jit_word_t for register-sized values instead of intmax_t
2019-04-26 15:00:29 +02:00
Andy Wingo
2602f17fb4
Simplify register representation again
...
There's only one flag, "callee-save". Also the regno range is limited
to 0-63 inclusive, to allow for cheap register sets as uint64_t values.
2019-04-25 19:12:55 +02:00
Andy Wingo
99e5672726
Renumber x86 registers
...
Now that there's no hazard to using a register used for passing
arguments, renumber to give JIT_R/JIT_F/JIT_V names to all registers.
Choose a temp register that's not used for passing arguments. Our
previous choice was an argument register (doh!) which made function
calls with many arguments fail.
2019-04-25 17:14:28 +02:00
Andy Wingo
0be4f7a2a1
Simplify API for loading call arguments
2019-04-22 09:15:03 +02:00
Andy Wingo
668196aa27
Fix lightening name
2019-04-05 16:25:22 +02:00
Andy Wingo
a45d651755
Add support for "make test-ia32" in tests/
2019-04-05 16:24:21 +02:00
Andy Wingo
e6ac66a348
Allow test suite to test multiple targets.
...
* tests/Makefile: Allow for testing multiple targets.
2019-04-05 16:07:01 +02:00
Andy Wingo
bbfb03ac30
Fix implementation of jit_{gpr,fpr}_is_callee_save
2019-04-04 11:08:54 +02:00
Andy Wingo
22d06620ee
Allow users to pass custom allocators
2019-04-03 15:25:21 +02:00
Andy Wingo
f348b8ed6d
Change headers and files to be named "lightening" instead of "jit"
...
This improves integration with other projects. Like for example Guile
already has files named jit.c and jit.h; it's easier to manage if
lightening uses its own file names.
2019-04-03 13:57:48 +02:00
Andy Wingo
99b4fd2d79
Provide some type safety for jit_gpr_t and jit_fpr_t
2019-04-03 11:50:32 +02:00
Andy Wingo
40ebd5de44
Add movi_[df] tests
2019-03-26 22:34:04 +01:00
Andy Wingo
bbb8bd94f2
Add int->float tests
2019-03-26 22:32:40 +01:00
Andy Wingo
ece71ef64c
Add float/double cast inst tests
2019-03-26 22:29:48 +01:00
Andy Wingo
44fc164098
Add truncr_[df]_[li] tests
2019-03-26 22:26:05 +01:00
Andy Wingo
69665c7f80
Add abs/sqrt tests
2019-03-26 22:01:52 +01:00
Andy Wingo
bf4d8b4a24
Add push/pop test
2019-03-26 21:50:17 +01:00
Andy Wingo
281cca514f
Add some nop and jmp tests, and fix a hazard with jmpi/calli
2019-03-26 16:28:38 +01:00
Andy Wingo
8a8273c45c
Add sub-and-branch-on-overflow tests
2019-03-26 16:09:07 +01:00
Andy Wingo
6dbad81afd
Add add-and-branch-on-overflow tests
2019-03-26 15:53:48 +01:00
Andy Wingo
0d0c6b1a4b
Add flag-checking test-and-branch tests
2019-03-26 15:25:57 +01:00
Andy Wingo
a021c73438
Add unordered float compare-and-branch tests
2019-03-26 15:22:14 +01:00
Andy Wingo
3d4c22ad33
Add anti-float comparison tests
2019-03-26 15:04:50 +01:00
Andy Wingo
329fc7936c
Add int/int reg/imm compare-and-branch tests
2019-03-26 14:53:25 +01:00
Andy Wingo
ab0d17286a
Add floating-point reg/reg compare-and-branch tests
2019-03-26 14:43:53 +01:00
Andy Wingo
5a740b9add
Add more integer reg/reg branch-and-compare tests
2019-03-26 14:36:33 +01:00
Andy Wingo
52a9ab856d
Add bltr test
...
Also rework how relocs are represented.
2019-03-26 14:21:00 +01:00
Andy Wingo
787305eae5
Tweak test build to run faster, and adapt CI
2019-03-26 12:32:08 +01:00
Andy Wingo
c5c2b6f518
Add stxi tests
2019-03-26 12:18:46 +01:00
Andy Wingo
552e51ace7
Add stxr tests
2019-03-26 12:18:42 +01:00
Andy Wingo
ee2c6ab806
Add sti tests
2019-03-26 12:03:24 +01:00
Andy Wingo
4fe296b1df
Add str tests
2019-03-26 12:00:10 +01:00
Andy Wingo
6f9bbe72c7
Add ldxi tests
2019-03-26 11:34:35 +01:00
Andy Wingo
d917dc2147
Add ldxr tests
2019-03-26 11:24:31 +01:00
Andy Wingo
c6067dd8cb
Add ldi tests
2019-03-26 11:16:17 +01:00
Andy Wingo
afd32134f0
Add ldr tests
2019-03-26 11:07:44 +01:00
Andy Wingo
1808239ec8
Add bswap tests, and fix missing breaks in jit_load_args
2019-03-26 10:47:22 +01:00
Andy Wingo
082a629f62
Add extr tests
2019-03-26 10:29:31 +01:00
Andy Wingo
3acf10280b
Add mov_addr test
2019-03-26 10:11:12 +01:00