1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-13 17:20:21 +02:00
Commit graph

527 commits

Author SHA1 Message Date
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
bab1f40b5e Fix lightening to compile on 32-bit x86 2019-04-26 14:44:09 +02:00
Andy Wingo
89fd69fc00 Account for saved return address when locating args
Also, fix alignment to be in bytes rather than bits.  Oops!
2019-04-26 14:38:29 +02:00
Andy Wingo
ac972e1dba Inline some internal definitions into backend-specific files 2019-04-26 14:37:35 +02:00
Andy Wingo
04d89a7ce2 Implement reloc shortening, and remove unused functionality 2019-04-26 12:40:44 +02:00
Andy Wingo
796f263ed8 Remove unused jit_epilog definition 2019-04-26 11:40:06 +02:00
Andy Wingo
dc28ac03c1 Make jit_align_stack and jit_shrink_stack public 2019-04-26 10:04:04 +02:00
Andy Wingo
c54c248bc9 Track frame size to more reliably align stack before calls 2019-04-26 09:56:46 +02:00
Andy Wingo
a3e044c808 Move jit_move_operands etc to common lightening.c file 2019-04-26 09:09:50 +02:00
Andy Wingo
e29977a82b Simplify register representation even more
The register structures just contain the regno.  Since the only flag is
the callee-save flag, we can punt that to a separate per-backend,
per-target predicate.
2019-04-25 23:22:44 +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
af4e0422ae Align stack on 64-bit targets for calls 2019-04-25 18:12:23 +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
ddd66a2f34 Simplify register representation
Instead of JIT_R0 being a wrapped index into a table which then gives
the regno and class, just have JIT_R0 be the wrapped regno and class.
2019-04-25 17:03:46 +02:00
Andy Wingo
b34e230413 Fix apply_addend bug
* lightening/x86.c (jit_move_operands): Fix bug when calling
  apply_addend.
2019-04-24 22:56:48 +02:00
Andy Wingo
4db777e12e Add support for operand addends
This can allow for better register allocation around calls for field
locations.
2019-04-24 15:52:07 +02:00
Andy Wingo
d07dac40ad Add proper parallel-moves solver
Add parallel assignment serializer from Guile, originating in the Caml
paper by Rideau et al.
2019-04-24 15:08:35 +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
4e1876f294 Support spilling args to stack 2019-04-04 17:06:57 +02:00
Andy Wingo
ede10b101b Support immediate arguments 2019-04-04 12:09:41 +02:00
Andy Wingo
1d6feefa9d Add assert for jit_address 2019-04-04 11:41:51 +02:00
Andy Wingo
e95fb91b96 Fix reloc for jmpi and calli 2019-04-04 11:17:46 +02:00
Andy Wingo
bbfb03ac30 Fix implementation of jit_{gpr,fpr}_is_callee_save 2019-04-04 11:08:54 +02:00
Andy Wingo
0903a01812 Add jit_same_{gprs,fprs} helpers 2019-04-03 19:23:36 +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
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
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
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