about summary refs log tree commit diff
path: root/src/boot/be
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2010-10-05 18:44:39 -0700
committerGraydon Hoare <graydon@mozilla.com>2010-10-05 18:44:39 -0700
commit8ecbe49a8fa8b4bb17c2d798d5de6fc0303c5bc6 (patch)
tree11c52a82f424b8782e7dd13e7965e580dbf01c5d /src/boot/be
parentd1e59d691039731b8ae05aadf8358c499dfa5b89 (diff)
downloadrust-8ecbe49a8fa8b4bb17c2d798d5de6fc0303c5bc6.tar.gz
rust-8ecbe49a8fa8b4bb17c2d798d5de6fc0303c5bc6.zip
Add -minimal mode to rustboot that skips emitting code that's broken or unneeded for rustc. Shrink rustc by 300kb. Back under 1mb.
Diffstat (limited to 'src/boot/be')
-rw-r--r--src/boot/be/abi.ml3
-rw-r--r--src/boot/be/x86.ml8
2 files changed, 8 insertions, 3 deletions
diff --git a/src/boot/be/abi.ml b/src/boot/be/abi.ml
index c16fec3608c..a7b98c2cd6a 100644
--- a/src/boot/be/abi.ml
+++ b/src/boot/be/abi.ml
@@ -126,7 +126,8 @@ type abi =
                                -> Common.nabi
                                  -> Common.fixup (* grow_task *)
                                    -> bool       (* is_obj_fn *)
-                                     -> unit);
+                                     -> bool     (* minimal *)
+                                       -> unit);
 
     abi_emit_fn_epilogue: (Il.emitter -> unit);
 
diff --git a/src/boot/be/x86.ml b/src/boot/be/x86.ml
index 468d1ab1b5b..dd21c329195 100644
--- a/src/boot/be/x86.ml
+++ b/src/boot/be/x86.ml
@@ -1236,6 +1236,7 @@ let fn_prologue
     (nabi:nabi)
     (grow_task_fixup:fixup)
     (is_obj_fn:bool)
+    (minimal:bool)
     : unit =
 
   let esi_n = word_n (h esi) in
@@ -1372,8 +1373,11 @@ let fn_prologue
       in
 
         (* "Full" frame size-check. *)
-        stack_growth_check e nabi grow_task_fixup
-          dynamic_frame_sz dynamic_grow_jmp restart_pc (h esi) (h edi);
+        match dynamic_grow_jmp with
+            None when minimal -> ()
+          | _ ->
+              stack_growth_check e nabi grow_task_fixup
+                dynamic_frame_sz dynamic_grow_jmp restart_pc (h esi) (h edi);
 
 
         (* Establish a frame, wherever we landed. *)