Andy Wingo
62df897929
Merge from upstream Lightening
2019-04-04 11:43:36 +02:00
Andy Wingo
f8fa1156a9
Fix some aspects of instruction mcode addresses
...
* libguile/jit.c (struct scm_jit_state): Remove entry_mcode member.
(add_inter_instruction_patch): Fix off-by-one.
(compile): Reset reloc_idx when restarting a compile. All instructions
record their addresses.
2019-04-04 11:42:33 +02:00
Andy Wingo
1d6feefa9d
Add assert for jit_address
2019-04-04 11:41:51 +02:00
Andy Wingo
c0369df5e7
Fix JIT bugs
...
* libguile/jit.c (compile): Fix reloc fixup.
(compute_mcode): Correctly compute entry mcode.
2019-04-04 11:33:16 +02:00
Andy Wingo
c63764f439
Merge from upstream Lightening
2019-04-04 11:18:30 +02:00
Andy Wingo
fb9003c137
Fix jit_gpr_is_callee_save usage
...
* libguile/jit.c (emit_entry_trampoline): Fix invocations for
jit_gpr_is_callee_save.
2019-04-04 11:18:08 +02:00
Andy Wingo
e95fb91b96
Fix reloc for jmpi and calli
2019-04-04 11:17:46 +02:00
Andy Wingo
11fa54646f
Merge from upstream Lightening
2019-04-04 11:09:24 +02:00
Andy Wingo
bbfb03ac30
Fix implementation of jit_{gpr,fpr}_is_callee_save
2019-04-04 11:08:54 +02:00
Andy Wingo
93f430d282
jit: Fix inter-instruction relocs.
...
* libguile/jit.c (struct pending_reloc, emit_entry_trampoline)
(add_inter_instruction_patch, compile, compute_mcode): Fix
inter-instruction relocs.
2019-04-04 10:59:37 +02:00
Andy Wingo
2db4ccd68c
Fix jit.c compilation
...
* libguile/jit.c: Finish adaptation for lightening. Still crashes
though.
2019-04-03 21:08:30 +02:00
Andy Wingo
83b086e40e
Remove -Wdeclaration-after-statement
...
* configure.ac (HOST_CC): Now that we have C99, there's no need to warn
on mixed statements and declarations.
2019-04-03 19:37:31 +02:00
Andy Wingo
1308404b5b
Merge from upstream lightening
2019-04-03 19:24:47 +02:00
Andy Wingo
0903a01812
Add jit_same_{gprs,fprs} helpers
2019-04-03 19:23:36 +02:00
Andy Wingo
061c967bfe
Checkpoint for lightning to lightening conversion
2019-04-03 17:42:27 +02:00
Andy Wingo
9f22ec9e2d
Merge from upstream Lightening
2019-04-03 17:38:00 +02:00
Andy Wingo
f9da599ef5
Fix jit_reset to be useful
2019-04-03 17:37:18 +02:00
Andy Wingo
22d06620ee
Allow users to pass custom allocators
2019-04-03 15:25:21 +02:00
Andy Wingo
e9be4ea73d
Adapt to lightning -> lightening name change
...
* libguile/jit.c: Include lightening.h.
* libguile/Makefile.am: Adapt.
2019-04-03 14:08:06 +02:00
Andy Wingo
2e4fb1e665
Merge in changes from upstream lightening
2019-04-03 13:59:33 +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
d351f13bc2
Add subdir-objects option to libguile makefile.
...
* libguile/Makefile.am (AUTOMAKE_OPTIONS): Add subdir-objects, to allow
for having two files named "jit.c".
2019-04-03 13:37:35 +02:00
Andy Wingo
985faf35c1
Replace GNU Lightning with Lightening
2019-04-03 13:28:13 +02:00
Andy Wingo
573af9c19b
Clean up stack after calls
2019-04-03 12:09:38 +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
cacdeeee4b
Implement arg shuffling for jit_call{i,r}
2019-04-03 11:04:39 +02:00
Andy Wingo
b4169e25ba
get_temp_{gpr,xpr} returns a jit_{gpr,fpr}_t
2019-04-03 11:04:19 +02:00
Mark H Weaver
94230d27e0
Fix typo in comment.
...
* module/ice-9/boot-9.scm: Fix typo.
2019-04-01 21:42:06 -04:00
Andy Wingo
998006b304
Remove old tests
2019-03-26 22:36:08 +01: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
9adbed9e7a
Fix stxi_d bug
...
Also present in upstream; reported.
2019-03-26 13:44:37 +01:00
Andy Wingo
787305eae5
Tweak test build to run faster, and adapt CI
2019-03-26 12:32:08 +01:00
Andy Wingo
e289f88187
Add .gitlab-ci.yml
2019-03-26 11:25:49 +00: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