aboutsummaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2013-09-27 17:33:12 +0200
committerDrahflow <drahflow@gmx.de>2013-09-27 17:33:12 +0200
commit41c154b75098438f6000d8028218a9e8e296bf7d (patch)
treef441f5578edcb526962b18e6e00f47e9f6f83123 /compiler
parentd83105f2103604e9530657c5996b155c8e8ddf90 (diff)
Results of some debugging
Diffstat (limited to 'compiler')
-rw-r--r--compiler/elymasAsm.ey32
-rw-r--r--compiler/elymasAsmLib.ey1
-rw-r--r--compiler/elymasGlobalSysOpt.ey2
3 files changed, 26 insertions, 9 deletions
diff --git a/compiler/elymasAsm.ey b/compiler/elymasAsm.ey
index 25a52c1..dbd993b 100644
--- a/compiler/elymasAsm.ey
+++ b/compiler/elymasAsm.ey
@@ -1151,6 +1151,14 @@
/xor %31 defAsmAddq
+ # map "anonymous" allocations away from interpreter heap
+
+ 52776558133248 ==miscAllocBase # 0x300000000000
+ { ==size
+ size miscAllocBase sys .asm .allocAt
+ size miscAllocBase add =miscAllocBase
+ } /alloc deff
+
# global alloc list layout
# %0 : next unused byte of global alloc list as an offset from beginning of list
# %8 : <unused>
@@ -1166,7 +1174,7 @@
[ value imm64 ] { addr sys .asm .poke addr 1 add =addr } each
} /pokeImm64 deff
- GLOBALALLOCSSIZE sys .asm .alloc ==allocs
+ GLOBALALLOCSSIZE alloc ==allocs
allocs .base ==i
[
%20 imm64
@@ -1195,8 +1203,8 @@
# STACKSTART - ...: real stack
[ /mainStack /mainCallStack ] {
<
- STACKSIZE sys .asm .alloc _ globalAllocations .register
- ==stack
+ STACKSIZE alloc _ globalAllocations .register
+ ==stack
stack .base ==i
[
stack .base STACKSIZE add imm64
@@ -1206,14 +1214,14 @@
> -12 ==
}' each
- STACKSIZE sys .asm .alloc _ globalAllocations .register
- .base ==:quoteEncodingBufferCode
+ STACKSIZE alloc _ globalAllocations .register
+ .base ==:quoteEncodingBufferCode
- STACKSIZE sys .asm .alloc _ globalAllocations .register
- .base ==:quoteEncodingBufferObjects
+ STACKSIZE alloc _ globalAllocations .register
+ .base ==:quoteEncodingBufferObjects
{ ==opcodes
- opcodes len 1 sub PAGESIZE div 1 add PAGESIZE mul sys .asm .alloc /codearea defv
+ opcodes len 1 sub PAGESIZE div 1 add PAGESIZE mul alloc /codearea defv
sys .asm .|poke =*poke
codearea .base opcodes { -101 poke 1 add } each --
codearea
@@ -1223,6 +1231,10 @@
{ ==callStack ==valueStack ==opcodes
[
/rbx pushqReg
+ /rbp pushqReg
+ /r12 pushqReg
+ /r13 pushqReg
+ /r14 pushqReg
/r15 pushqReg
valueStack /rbx movqImmReg
/rsp /rbx xchgqRegMem
@@ -1236,6 +1248,10 @@
valueStack /rbx movqImmReg
/rsp /rbx xchgqRegMem
/r15 popqReg
+ /r14 popqReg
+ /r13 popqReg
+ /r12 popqReg
+ /rbp popqReg
/rbx popqReg
retn
]
diff --git a/compiler/elymasAsmLib.ey b/compiler/elymasAsmLib.ey
index 5bfd938..3e8538b 100644
--- a/compiler/elymasAsmLib.ey
+++ b/compiler/elymasAsmLib.ey
@@ -77,7 +77,6 @@
{ [ } "[[" deff
{ ] :labelResolve stringResolve } "]]" deff
- { %00 %00 %00 %00 %00 %70 %00 %00 } /HEAPEND deff
{ %00 %00 %00 %00 %00 %60 %00 %00 } /HEAPBASE deff
{ %00 %00 %00 %00 %00 %50 %00 %00 } /BLOCKBASE deff
{ %00 %00 %00 %00 %00 %40 %00 %00 } /MARKBASE deff
diff --git a/compiler/elymasGlobalSysOpt.ey b/compiler/elymasGlobalSysOpt.ey
index 8275e51..8bd2f90 100644
--- a/compiler/elymasGlobalSysOpt.ey
+++ b/compiler/elymasGlobalSysOpt.ey
@@ -97,6 +97,8 @@
/rax :jmpqReg
] ::loadToRdi
+ # TODO old references still around (and possibly used by later code)
+
24 /r15 :pushqMemDisp8
32 /r15 :addqImm8Reg
:retn