]> gitweb.factorcode.org Git - factor.git/commitdiff
VM: LEAF_FRAME_SIZE is 16 bytes on all platforms so we can simplify it
authorBjörn Lindqvist <bjourne@gmail.com>
Mon, 24 Aug 2015 20:44:30 +0000 (22:44 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Wed, 26 Aug 2015 18:23:15 +0000 (20:23 +0200)
basis/bootstrap/assembler/x86.32.factor
basis/bootstrap/assembler/x86.64.unix.factor
basis/bootstrap/assembler/x86.64.windows.factor
core/layouts/layouts.factor
vm/cpu-x86.32.hpp
vm/layouts.hpp
vm/os-linux-x86.64.hpp
vm/os-macosx-x86.64.hpp
vm/os-windows.64.hpp

index 5f24bb5efc8e79abf050ff6e56c1354b6a40b1bc..9a08731cb0d8bee5c13d3f839b97b6bc0a8bd398 100644 (file)
@@ -8,7 +8,6 @@ IN: bootstrap.x86
 
 4 \ cell set
 
-: leaf-stack-frame-size ( -- n ) 4 bootstrap-cells ;
 : signal-handler-stack-frame-size ( -- n ) 12 bootstrap-cells ;
 : stack-frame-size ( -- n ) 8 bootstrap-cells ;
 : shift-arg ( -- reg ) ECX ;
index 2ae65d20299fbe4644c45528d4408084fe361a14..dcf05b1f4cf32e2975317d3fff2e3e22cfb0cc2b 100644 (file)
@@ -4,7 +4,6 @@ USING: cpu.x86.assembler.operands kernel layouts parser
 sequences ;
 IN: bootstrap.x86
 
-: leaf-stack-frame-size ( -- n ) 2 bootstrap-cells ;
 : signal-handler-stack-frame-size ( -- n ) 20 bootstrap-cells ;
 : stack-frame-size ( -- n ) 4 bootstrap-cells ;
 : nv-regs ( -- seq ) { RBX R12 R13 R14 R15 } ;
index c353109211c38e8b0020a6e68a8d22f30da22d38..960a7724a145df9032fc5282f9d2ebb4043b889d 100644 (file)
@@ -6,7 +6,6 @@ IN: bootstrap.x86
 
 DEFER: stack-reg
 
-: leaf-stack-frame-size ( -- n ) 2 bootstrap-cells ;
 : signal-handler-stack-frame-size ( -- n ) 24 bootstrap-cells ;
 : stack-frame-size ( -- n ) 8 bootstrap-cells ;
 : nv-regs ( -- seq ) { RBX RSI RDI R12 R13 R14 R15 } ;
index 2e2b1fe6809a505d01356f30e80bed79a973ae11..2c5c91f6ef3cd34272dd3599d7755c5985f6b791 100644 (file)
@@ -32,6 +32,8 @@ SYMBOL: header-bits
 : hashcode-shift ( -- n )
     tag-bits get header-bits get + ;
 
+: leaf-stack-frame-size ( -- n ) 16 ;
+
 ! We do this in its own compilation unit so that they can be
 ! folded below
 <<
index 38dcb7700a51e0936368b0838670fd405be586a8..0feaa1b03e909d643385020495f4e70e35d3c241 100644 (file)
@@ -2,9 +2,8 @@ namespace factor {
 
 #define FACTOR_CPU_STRING "x86.32"
 
-/* Must match the leaf-stack-frame-size, signal-handler-stack-frame-size,
-and stack-frame-size constants in bootstrap/assembler/x86.32.factor */
-static const unsigned LEAF_FRAME_SIZE = 16;
+/* Must match the signal-handler-stack-frame-size and stack-frame-size
+   constants in bootstrap/assembler/x86.32.factor */
 static const unsigned SIGNAL_HANDLER_STACK_FRAME_SIZE = 48;
 static const unsigned JIT_FRAME_SIZE = 32;
 
index eb9218ab46bd281bb8ed9773ed4128aaa2181922..e295e2a00014e8442d1359f8fd6ea824151d245f 100644 (file)
@@ -9,6 +9,9 @@ inline static cell alignment_for(cell a, cell b) { return align(a, b) - a; }
 
 static const cell data_alignment = 16;
 
+/* Must match leaf-stack-frame-size in core/layouts/layouts.factor */
+#define LEAF_FRAME_SIZE 16
+
 #define WORD_SIZE (signed)(sizeof(cell) * 8)
 
 #define TAG_MASK 15
index 6ec15e7ed9708ed11b4d9956ce1367a9accd1ec0..6f87837b4cc1a8a3bd50d9deafdfe39281b3d566 100644 (file)
@@ -25,9 +25,8 @@ inline static void uap_clear_fpu_status(void* uap) {
 #define FUNCTION_CODE_POINTER(ptr) ptr
 #define FUNCTION_TOC_POINTER(ptr) ptr
 
-/* Must match the leaf-stack-frame-size, signal-handler-stack-frame-size,
-and stack-frame-size constants in bootstrap/assembler/x86.64.unix.factor */
-static const unsigned LEAF_FRAME_SIZE = 16;
+/* Must match the signal-handler-stack-frame-size and stack-frame-size
+   constants in bootstrap/assembler/x86.64.unix.factor */
 static const unsigned SIGNAL_HANDLER_STACK_FRAME_SIZE = 160;
 static const unsigned JIT_FRAME_SIZE = 32;
 
index d1787bf6b937f64474ee2302047c796759fb4d81..c80dc70e4bda41c6e70ba2b5a4fd7c3134f65d53 100644 (file)
@@ -67,9 +67,8 @@ inline static void uap_clear_fpu_status(void* uap) {
   mach_clear_fpu_status(UAP_FS(uap));
 }
 
-/* Must match the leaf-stack-frame-size, signal-handler-stack-frame-size,
-and stack-frame-size constants in basis/bootstrap/assembler/x86.64.unix.factor */
-static const unsigned LEAF_FRAME_SIZE = 16;
+/* Must match the signal-handler-stack-frame-size and stack-frame-size
+   constants in basis/bootstrap/assembler/x86.64.unix.factor */
 static const unsigned SIGNAL_HANDLER_STACK_FRAME_SIZE = 160;
 static const unsigned JIT_FRAME_SIZE = 32;
 
index 06a0d33bb58785566773a7e57a2cc6bb9b9e576a..f3fc8dead8198b97d11f1289d86d54a574767eb9 100644 (file)
@@ -7,9 +7,8 @@ namespace factor {
 
 #define MXCSR(ctx) (ctx)->MxCsr
 
-/* Must match the leaf-stack-frame-size, signal-handler-stack-frame-size,
-and stack-frame-size constants in basis/bootstap/assembler/x86.64.windows.factor */
-static const unsigned LEAF_FRAME_SIZE = 16;
+/* Must match the signal-handler-stack-frame-size and stack-frame-size
+   constants in basis/bootstap/assembler/x86.64.windows.factor */
 static const unsigned SIGNAL_HANDLER_STACK_FRAME_SIZE = 192;
 static const unsigned JIT_FRAME_SIZE = 64;
 }