diff options
| author | Graydon Hoare <[email protected]> | 2010-10-05 18:44:39 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-10-05 18:44:39 -0700 |
| commit | 8ecbe49a8fa8b4bb17c2d798d5de6fc0303c5bc6 (patch) | |
| tree | 11c52a82f424b8782e7dd13e7965e580dbf01c5d /src/boot/be | |
| parent | Add input coordinate tracking to all major rustc ast nodes. (diff) | |
| download | rust-8ecbe49a8fa8b4bb17c2d798d5de6fc0303c5bc6.tar.xz 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.ml | 3 | ||||
| -rw-r--r-- | src/boot/be/x86.ml | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/boot/be/abi.ml b/src/boot/be/abi.ml index c16fec36..a7b98c2c 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 468d1ab1..dd21c329 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. *) |