Slava Pestov
7f0469efef
compiler: new "binary literal area" at the end of a word's machine code stores constant floats and SIMD vectors; this allows ##load-reference/##load-memory fusion to be performed on x86-64, with a RIP-relative address reaching the data; also simplifies VM since custom relocation types used by the previous 32-bit-only optimization are no longer needed
2010-05-03 17:34:35 -04:00
Slava Pestov
73c83333f2
compiler: remove flat machine representation and generate code directly from the CFG
2010-05-03 17:34:32 -04:00
Slava Pestov
c724550291
compiler.cfg: fuse ##load-integer/##load-reference into ##replace to form ##replace-imm
2010-05-03 17:34:28 -04:00
Slava Pestov
90b945eaa0
compiler: add ##load-vector instruction to avoid wasting a temporary register on x86-32
2010-05-03 17:34:28 -04:00
Slava Pestov
d38dbdabce
compiler.cfg.linear-scan: cleanups
2010-05-03 17:34:18 -04:00
Slava Pestov
fc7a1ad8b3
New GC checks work in progress
2010-05-03 17:34:16 -04:00
Slava Pestov
6f28468e6d
compiler.codegen: cleanup
2010-05-03 17:34:14 -04:00
Slava Pestov
fd84bb98bc
strings: move string-nth primitive out of the VM and into the library
2010-05-03 17:34:12 -04:00
Slava Pestov
80c8a7154d
compiler.cfg: add ##load-memory and ##store-memory instructions implementing complex addressing modes, and associated value numbering optimizations
2010-05-03 17:34:07 -04:00
Slava Pestov
becd957d29
compiler.cfg: merge all alien accessors into ##load-memory-imm and ##store-memory-imm
2010-05-03 17:34:06 -04:00
Slava Pestov
3c965afd10
compiler.cfg: remove ##set-string-nth-fast instruction since it can be expressed just as efficiently using other instructions
2010-05-03 17:34:04 -04:00
Slava Pestov
80558a93fa
Debugging untagged fixnums
2010-05-03 17:34:02 -04:00
Slava Pestov
6fdcd9fb02
Untagged fixnums work in progress
2010-05-03 17:34:02 -04:00
Slava Pestov
1d7089dc04
compiler: combine ##load-constant followed by ##alien-double into a ##load-double on x86-32, saving an integer register
2010-04-18 21:42:45 -05:00
Slava Pestov
df0f21c48d
compiler.codegen: need to do name decoration with fastcall as well
2010-04-12 18:10:25 -05:00
Joe Groff
3b4f8758b5
Merge branch 'master' of git://factorcode.org/git/factor into abi-symbols
...
Conflicts:
basis/compiler/tests/alien.factor
2010-04-06 12:30:15 -07:00
Joe Groff
e23e035b66
flatten non-integral types to (stack-value) on x86.32
2010-04-01 20:56:43 -07:00
Slava Pestov
4f585f991d
compiler: new set-special-object intrinsic; more efficient special-object intrinsic
2010-04-01 20:09:14 -04:00
Joe Groff
ba062c1e5f
cpu.architecture: alter param-regs to take abi as an (ignored for now) argument
2010-04-01 02:53:40 -07:00
Joe Groff
1d06be5021
"stdcall" -> stdcall
2010-03-31 19:29:04 -07:00
Slava Pestov
b84b1423d9
compiler: add intrinsic for context-object primitive
2010-03-27 02:56:11 -04:00
Slava Pestov
adeb6fb68f
vm: actually use context callstacks when running code
2010-03-26 22:44:43 -04:00
Slava Pestov
af573bd022
Add context-specific special object table, generalizing catchstack_save and current_callback_save fields of context struct
2010-03-18 22:06:00 +13:00
Daniel Ehrenberg
0f0571e48a
Moving new-sets to sets
2010-02-26 16:01:01 -05:00
Slava Pestov
80f604ac73
compiler: remove some unnecessary complexity
2010-02-04 01:36:52 +13:00
Slava Pestov
83a2de6565
Fix ffi-test library to work with Windows SDK. Turns out MINGW has a different ABI for struct returns than MS's compiler; make the MS ABI the default for cdecl on Windows, and add mingw ABI for libraries that use the MINGW ABI
2010-02-02 04:01:12 -06:00
Slava Pestov
88004434ec
vm: remove primitive table, non-optimizing compiler now looks up primitives with dlsym()
2010-01-19 20:00:33 +13:00
Slava Pestov
0165daf56c
Stop wearing monocle and use the term "entry point" instead of "XT" throughout VM and compiler; also remove two unused relocation types
2010-01-18 20:54:00 +13:00
Slava Pestov
880fb747fc
Removing integers-as-sequences
2010-01-15 07:15:33 +13:00
Slava Pestov
1c9afb4ccf
compiler.codegen.fixup: cache symbol names, reducing image size by ~200Kb
2010-01-13 23:18:43 +13:00
Slava Pestov
790674cf89
Rename kernel.private:getenv/setenv to special-object/set-special-object to mirror recent renaming on the VM side
2010-01-13 18:08:18 +13:00
Slava Pestov
1e2c0327ee
Add alien-assembly form for inline assembler, works like alien-invoke except calls a user-supplied quotation instead of generating a subroutine call. Replaces FPU status control, SSE detection and read timestamp routines in vm/cpu-x86.*S
2010-01-07 17:39:22 +13:00
Slava Pestov
9399a68786
Change how non-volatile register preservation is done in alien callbacks, with the aim of fixing callbacks on PowerPC, and to eventually eliminate assembly code from VM
...
- Simplify calculation of offset in relocation table
- Open-code %alien-callback
- Remove magic_frame hack from context objects
- Move magical return instruction from optimizing compiler backend into callback entry stub
2010-01-03 01:11:51 +13:00
Slava Pestov
8f449f1a82
Get optimizing compiler working without global register variables in VM
2009-12-22 15:42:49 +13:00
Slava Pestov
31a260b74c
vm: big overhaul of non-optimizing compiler
...
- change some primitives into sub-primitives: fixnum+ fixnum- fixnum* inline-cache-miss inline-cache-miss-tail
- rename some relocation types for clarity
- some other minor re-organizations and cleanups
2009-12-15 07:20:09 -05:00
Joe Groff
d674ff8191
simd intrinsic implementation for v*high, v*hs+, vavg, and vsad
2009-12-05 14:52:18 -08:00
Slava Pestov
daf47a539c
RT_HERE now takes its argument from the literal table rather than the parameter table, reducing image size further
2009-12-02 04:55:48 -06:00
Slava Pestov
912b1265fc
Split literal table into literal and parameter tables, literal table is discarded after code block initialization
2009-12-02 04:28:15 -06:00
Slava Pestov
a684164783
Fix non-tail recursive inline recursive compilation
2009-11-25 19:12:09 -06:00
Slava Pestov
08b6ebc7fa
Factor source files should not be executable
2009-11-21 17:50:43 -06:00
Joe Groff
ca8d4c15f4
add ##shl-vector-imm and ##shr-vector-imm insn variants. use merge/shr instead of compare/merge to do signed unpacks
2009-10-30 00:41:19 -05:00
Slava Pestov
9599d86ec5
compiler: FFI is now slightly more efficient when unboxing parameters, only changes data stack height once
2009-10-20 04:31:48 -05:00
Slava Pestov
16db1a394b
compiler, cpu.x86.32: clean up FFI implementation, in particular 32-bit x86-specific backend
2009-10-20 04:15:10 -05:00
Slava Pestov
bfd1f0d6d2
vm: rt-vm relocation now supports accessing a field directly
2009-10-14 19:24:23 -05:00
Slava Pestov
10ad5cad53
Working on adding support for the new write barrier to optimized code
2009-10-14 02:06:01 -05:00
Joe Groff
5158a12d32
rename ##shuffle-vector to ##shuffle-vector-imm, and add a new ##shuffle-vector for dynamic shuffles. have vshuffle use ##shuffle-vector to do word and byte shuffles on x86
2009-10-09 21:26:27 -05:00
Slava Pestov
84306a0786
compiler.codegen: fix failing tests
2009-10-09 09:44:09 -05:00
Slava Pestov
ae707c6976
Merge branch 'master' into new_gc
2009-10-08 02:29:24 -05:00
Joe Groff
43b51ef2eb
decompose %unpack-vector-head/tail into %compare-vector/%merge-vector-head/tail or %tail>head-vector/%unpack-vector-head insns when there isn't an actual unpack insn; get rid of fake x86 implementations
2009-10-07 14:09:46 -05:00
Joe Groff
a13e75f4f4
don't generate a ##not-vector instruction if the cpu doesn't have one; instead, fall back to a ##fill-vector/##xor-vector combo. get rid of pretend %not-vector in cpu.x86
2009-10-07 11:59:36 -05:00