Björn Lindqvist
274a0174fd
cpu.x86: use INC and DEC in favor of ADD reg, 1 and SUB reg, 1
...
The encoding for INC reg and DEC reg is one byte shorter so using it
shaves of a few bytes from the generated code.
2016-05-08 18:44:31 +02:00
Björn Lindqvist
00fdb837fa
cpu.x86: better code without locals
2016-04-22 12:59:21 +02:00
Björn Lindqvist
7247906bf8
vm: remove vm-field-offset and context-field-offset
...
Shorter to just write "vm offset-of" and "context offset-of"
2015-12-14 09:29:18 +01:00
Björn Lindqvist
f692200547
compiler.cfg.*: refactoring which removes spill-area-size and
...
spill-area-align from cfg
This makes the code for building the stack frame simpler.
2015-11-04 07:53:19 +01:00
John Benediktsson
e477f6996f
Fix comments to be ! not #!.
2015-09-08 16:15:10 -07:00
Doug Coleman
330c7ba156
factor: Removing SLOT: nth/at/global in favor of using change: at for tuple slots named ``at`` and change-at for hashtables.
...
Redo many FROM: and QUALIFIED: and using lists.
2015-08-12 08:49:02 -05:00
Björn Lindqvist
1b6fa50ff2
cpu.x86: define %alien-invoke and %alien-indirect using %alien-assembly
2015-07-28 17:58:28 -07:00
Björn Lindqvist
e41aef9a50
cpu.x86: use push and pop when emitting %prologue and %epilogue
...
push/pop REG has the same effect as sub/add rsp, 8 so use them instead
when applicable to generate a little shorter code
2015-07-21 16:22:33 -07:00
John Benediktsson
621b50a8e5
cpu: enable bit-test intrinsic for fixnum-bit?.
2015-06-17 19:11:10 -07:00
John Benediktsson
255b60ef8d
cpu.x86: remove use of with-scope in favor of locals.
2015-06-15 09:10:52 -07:00
Björn Lindqvist
48e6455186
cpu.x86.*: %mov-vm-ptr isn't so useful, shorter and simpler to write
...
vm-reg MOV
2015-05-22 12:22:29 -07:00
Björn Lindqvist
6c43475183
cpu.x86: fix silly bug in %clear
2015-05-18 06:52:49 +02:00
Björn Lindqvist
9ceea3c241
compiler.*: new cfg instruction ##clear, it makes it easier to see where
...
the compiler.cfg.stacks.clearing pass inserts extra instructions
2015-05-17 07:59:34 +02:00
Björn Lindqvist
655faadec9
compiler.*: now when we're tracking uninitialized locations instead of
...
initialized ones, the height slot isn't needed on ##call anymore
2015-05-17 07:59:34 +02:00
Björn Lindqvist
8df92abeb9
compiler.*,cpu.*: add a height slot to ##call nodes, then other compiler
...
passes can much easier to accurate liveness analysis on stack locations
2015-05-09 20:04:22 -07:00
Björn Lindqvist
ded3760d46
compiler.*: merge of ##inc-r and ##inc-d into one instruction ##inc with a loc slot
...
this is nice because it leads to simpler code and matches how ##peek and ##replace instructions work
2015-04-29 09:31:53 -07:00
Björn Lindqvist
52d3affeb8
compiler.cfg.*: the ##alien-assembly instruction does not use a gc-map
2014-12-08 18:13:46 -08:00
John Benediktsson
a5e7176ec7
cpu.x86: "dup pop* push" is just "set-last".
2014-11-30 08:28:19 -08:00
John Benediktsson
2f325e4fee
using if-zero in even more places.
2012-07-16 19:38:49 -07:00
Joe Groff
2eba1b5449
cpu.x86: reduce compiled frames by 2 cells too
2011-12-14 09:56:49 -08:00
Joe Groff
079025559d
simplify function prologs
2011-12-14 09:56:49 -08:00
Joe Groff
d927a070ed
cpu.x86: enable POPCNT with a flag
...
If bootstrapped with '-enable-popcnt' and the host CPU supports it, enable the POPCNT-based fixnum-bit-count intrinsic. Fixes #436 .
2011-12-12 16:43:49 -08:00
Joe Groff
943596575a
use radix literals
2011-11-23 19:03:40 -08:00
Doug Coleman
94db86a6db
Make "foo.private" require load foo instead.
...
Move require from vocabs.loader to vocabs. Update everything.
Fixes #201 .
2011-11-02 11:50:03 -07:00
Slava Pestov
b89e9a549b
Split up compiler.codegen.fixup into compiler.codegen.{gc-maps,labels,relocation}
2011-10-03 00:25:47 -07:00
Erik Charlebois
64252dbdbc
32 and 64 bit Linux PPC support
2011-05-23 23:36:14 -04:00
Slava Pestov
6b5fffc026
compiler: preliminary implementation of tracking derived pointers in GC maps
2010-09-27 20:12:44 -07:00
Slava Pestov
b5fc39c198
compiler.cfg: Reading the return value of a float-returning function on x86-32 had a side effect of popping the x87 stack, so it was not correct for DCE to just eliminate this if the return value was not used. Fix this by adding a new dead-outputs slot to alien-call-insns and having DCE move dead returns there
2010-08-13 23:19:56 -07:00
Slava Pestov
0fbe78be00
cpu.x86.64: fix calling varargs functions
2010-07-19 16:03:39 -04:00
Slava Pestov
b23aac1beb
compiler.cfg: open-code parameter boxing and unboxing for certain C types
2010-07-19 10:25:13 -04:00
Slava Pestov
867530223c
cpu.x86: fix %load/store-stack-param for 32-bit
2010-07-14 17:50:40 -04:00
Slava Pestov
e27adb2830
compiler: re-architect low-level optimizer to allow more than one output value per instruction
2010-07-13 07:40:14 -04:00
Slava Pestov
a55c8ee671
FFI rewrite part 6: deconcatenatize
2010-07-02 15:44:12 -04:00
Slava Pestov
e86f434f26
Add GC maps to ##box, ##box-long-long, ##alien-invoke, ##alien-indirect and ##call-gc; remove ##gc-map instruction
2010-06-14 19:39:46 -04:00
Slava Pestov
8ed4760b51
cpu.x86: combine 32-bit and 64-bit %dispatch template
2010-06-11 21:52:38 -04:00
Slava Pestov
806e54630a
GC maps for more compact inline GC checks
2010-06-11 20:06:00 -04:00
Slava Pestov
48f87e03e3
cpu.x86: fix callbacks receiving stack parameters on Win64
2010-05-23 23:08:07 -04:00
Slava Pestov
ba7cb61133
Stack allocation improvements
...
- New with-out-parameters combinator
- Inhibit tail call optimization in frames with local allocation, to ensure that passing a stack allocated value to the last word in the quotation works
- local allocations are now aligned properly
- spill slots are now aligned properly aligned in frames which have parameter and local allocation areas
2010-05-22 02:37:00 -04:00
Slava Pestov
77516c6932
compiler.cfg: generalize ##prepare-struct-caller instruction to alloca()-like ##local-allot
2010-05-19 00:33:15 -04:00
Slava Pestov
3104ad779a
cpu.x86.64: call check-sse to ensure that cpu.x86.sse is loaded
2010-05-17 11:43:42 -04:00
Slava Pestov
6eaf2d7534
cpu.x86: add x87 codegen for Model T enthusiasts
2010-05-17 11:35:47 -04:00
Slava Pestov
7ff309d50e
cpu.x86: get rid of this extra-stack-space nonsense
2010-05-17 02:14:44 -04:00
Slava Pestov
3f8e13bf66
compiler.cfg: refactor stack frame code and fix frame pointer usage in callbacks
2010-05-16 21:04:40 -04:00
Joe Groff
645164188d
compiler.cfg.instructions: ##select-vector instruction mapping to SSE4 PEXTR*
2010-05-16 00:50:19 -07:00
Slava Pestov
5b48cd2a63
FFI rewrite part 5: return value boxing and callback parameter boxing now uses vregs; simplify return value unboxing
2010-05-16 03:43:23 -04:00
Joe Groff
8c878ada17
compiler.cfg.instructions: ##gather-int-vector-2/4 instructions that map to SSE4 PINSR/PEXTR
2010-05-15 23:48:22 -07:00
Joe Groff
7c0cd6dc37
cpu.x86: fix bootstrap load error
2010-05-15 15:28:22 -07:00
Joe Groff
3de020c18a
cpu.x86: don't enable bit-count intrinsic by default
2010-05-15 14:52:00 -07:00
Joe Groff
009408dd11
cpu.x86: enable bit-count intrinsic if POPCNT available
2010-05-15 14:00:12 -07:00
Joe Groff
7fec53b509
compiler.cfg.instructions: ##bit-count insn
2010-05-15 13:57:35 -07:00