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
8849e370ca
Register allocation now uses SSA properties to coalesce values with different representations
2010-05-03 17:34:20 -04:00
Slava Pestov
fc7a1ad8b3
New GC checks work in progress
2010-05-03 17:34:16 -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
c4cf2a4085
compiler: change how 'f' is represented in low level IR to simplify some code, and fuse a ##load-constant of a word with a ##compare into a ##compare-imm on x86-32. This eliminates a spill from binary-search
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
Slava Pestov
61e300f87e
cpu.x86.32: fastcall struct returns are different on Linux than everywhere else for some unknown reason
2010-04-12 18:44:02 -04:00
Slava Pestov
d7ff3faa0f
alien: now that fastcall works better it doesn't need to be private
2010-04-10 16:57:07 -07:00
Slava Pestov
4edf4f1519
cpu.x86.32: cleanups and fixes to make fastcall and thiscall callbacks work
2010-04-10 16:54:17 -07:00
Slava Pestov
0dc43a94bd
Merge remote branch 'origin/abi-symbols' into fastcall-madness
2010-04-10 00:10:33 -07:00
Slava Pestov
89f912fe74
Fiddle with register assignments in non-optimizing x86-32 backend
2010-04-10 00:10:05 -07: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
2d96bff203
cpu.x86.32: add load-return-regs methods for stack-params so callbacks can box the struct return pointer
2010-04-01 22:01:10 -07:00
Slava Pestov
47f86898d7
vm: pre-allocate context alien
2010-04-02 00:02:21 -04:00
Joe Groff
e23e035b66
flatten non-integral types to (stack-value) on x86.32
2010-04-01 20:56:43 -07:00
Joe Groff
d6ad21bcc6
make "fastcall" symbol private since it doesn't really work in all cases
2010-04-01 18:34:15 -07:00
Joe Groff
c3b7a04b50
update %load-param-reg, %save-param-reg, and %cleanup to take register args into account
2010-04-01 17:36:09 -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
fbb555b3d3
update M\ int-regs param-regs for x86-32 to give input regs for thiscall/fastcall
2010-04-01 03:35:37 -07: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
a0b4e09f60
remove redundant «stdcall?» word from cpu.x86.32
2010-03-31 19:57:29 -07:00
Joe Groff
1d06be5021
"stdcall" -> stdcall
2010-03-31 19:29:04 -07:00
Joe Groff
8655654395
"mingw" -> mingw
2010-03-31 19:28:11 -07:00
Slava Pestov
adeb6fb68f
vm: actually use context callstacks when running code
2010-03-26 22:44:43 -04:00
Slava Pestov
af47e5e8d8
Compiled code size optimizations for x86-64 resulting in development image size reduction of about 350kb
...
- RIP-relative LEA is now used to load program counter in prolog and tail calls; saves 3 bytes of code and 4 bytes of relocation information over an immediate MOV
- VM field accesses no longer involve a redundant addition
2010-02-03 23:11:35 +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
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
80e64b8379
Store VM object in a register on x86-64
2010-01-11 01:20:32 +13:00
Slava Pestov
927953dad0
cpu.x86: don't have to pass VM pointer to quotations anymore
2010-01-06 23:42:00 +13:00
Slava Pestov
d2baa6dde5
vm: move c_to_factor, lazy_jit_compile_impl, throw_impl, set_callstack assembly routines into non-optimizing compiler for x86-64
2010-01-06 15:47:36 +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
8b913f5fc6
Fix bug in c_to_factor
2009-12-26 15:24:46 +13:00
Slava Pestov
1453154376
vm: remove VM_ASM_API
2009-12-24 01:37:24 +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
08b6ebc7fa
Factor source files should not be executable
2009-11-21 17:50:43 -06:00
Slava Pestov
7714be60a9
Move platform-specific c-type initialization out of cpu.* vocabularies and into alien.c-types so that the vm vocabulary, which is loaded before cpu.*, will have correct struct offsets
2009-11-05 01:36:14 -06:00
Slava Pestov
39c192c829
Align stack pointer on non-Mac OS X x86-32 platforms, and use aligned loads/stores for SIMD values
2009-11-03 23:51:44 -06:00
Slava Pestov
a71212f9c4
cpu.x86.32: only create 16-byte parameter area if the word calls into the VM
2009-10-20 05:02:42 -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
ef6868c712
cpu.x86.32: fix callbacks on platforms where stack is not aligned
2009-10-17 21:20:08 -05:00
Slava Pestov
4c279d7493
cpu.x86.32: fix magic stack frame handling
2009-10-16 21:07:09 -05:00
Slava Pestov
030d035e94
vm: code heap compaction at runtime using compact-gc primitive
2009-10-16 11:39:35 -05:00
Slava Pestov
0726ec30f0
cpu.x86: eliminate 2 instructions form write barrier on x86-32
2009-10-15 22:07:03 -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
Slava Pestov
542dd577d9
cpu.x86.32: fix %unary/binary-float-function on Windows; need to look up symbols in libm and not VM binary
2009-09-28 04:51:53 -05:00