@@ -1488,6 +1488,7 @@ let trans_visitor
1488
1488
let frame_fns =
1489
1489
match fnid with
1490
1490
None -> zero
1491
+ | Some _ when cx.ctxt_sess.Session. sess_minimal -> zero
1491
1492
| Some fnid -> get_frame_glue_fns fnid
1492
1493
in
1493
1494
let crate_ptr_reg = next_vreg () in
@@ -1499,14 +1500,19 @@ let trans_visitor
1499
1500
mov (word_at (fp_imm frame_fns_disp)) frame_fns
1500
1501
1501
1502
and check_interrupt_flag _ =
1502
- let dom = next_vreg_cell wordptr_ty in
1503
- let flag = next_vreg_cell word_sty in
1504
- mov dom (Il. Cell (tp_imm (word_n Abi. task_field_dom)));
1505
- mov flag (Il. Cell (deref_imm dom
1506
- (word_n Abi. dom_field_interrupt_flag)));
1507
- let null_jmp = null_check flag in
1508
- trans_yield () ;
1509
- patch null_jmp
1503
+ if cx.ctxt_sess.Session. sess_minimal
1504
+ then ()
1505
+ else
1506
+ begin
1507
+ let dom = next_vreg_cell wordptr_ty in
1508
+ let flag = next_vreg_cell word_sty in
1509
+ mov dom (Il. Cell (tp_imm (word_n Abi. task_field_dom)));
1510
+ mov flag (Il. Cell (deref_imm dom
1511
+ (word_n Abi. dom_field_interrupt_flag)));
1512
+ let null_jmp = null_check flag in
1513
+ trans_yield () ;
1514
+ patch null_jmp
1515
+ end
1510
1516
1511
1517
and trans_glue_frame_entry
1512
1518
(callsz :size )
@@ -1534,7 +1540,8 @@ let trans_visitor
1534
1540
push_new_emitter_with_vregs None ;
1535
1541
iflog (fun _ -> annotate " prologue" );
1536
1542
abi.Abi. abi_emit_fn_prologue (emitter() )
1537
- framesz callsz nabi_rust (upcall_fixup " upcall_grow_task" ) false ;
1543
+ framesz callsz nabi_rust (upcall_fixup " upcall_grow_task" )
1544
+ false cx.ctxt_sess.Session. sess_minimal;
1538
1545
write_frame_info_ptrs None ;
1539
1546
(* FIXME: not clear why, but checking interrupt in glue context
1540
1547
* causes many.rs to crash when run on a sufficiently large number
@@ -4766,7 +4773,8 @@ let trans_visitor
4766
4773
push_new_emitter_with_vregs (Some id);
4767
4774
iflog (fun _ -> annotate " prologue" );
4768
4775
abi.Abi. abi_emit_fn_prologue (emitter() )
4769
- framesz callsz nabi_rust (upcall_fixup " upcall_grow_task" ) false ;
4776
+ framesz callsz nabi_rust (upcall_fixup " upcall_grow_task" )
4777
+ false cx.ctxt_sess.Session. sess_minimal;
4770
4778
write_frame_info_ptrs None ;
4771
4779
iflog (fun _ -> annotate " finished prologue" );
4772
4780
trans_block fe.Ast. for_each_body;
@@ -5371,7 +5379,8 @@ let trans_visitor
5371
5379
(string_of_size callsz)));
5372
5380
abi.Abi. abi_emit_fn_prologue
5373
5381
(emitter() ) framesz callsz nabi_rust
5374
- (upcall_fixup " upcall_grow_task" ) obj_fn;
5382
+ (upcall_fixup " upcall_grow_task" ) obj_fn
5383
+ cx.ctxt_sess.Session. sess_minimal;
5375
5384
5376
5385
write_frame_info_ptrs (Some fnid);
5377
5386
if yield_check
@@ -5765,7 +5774,8 @@ let trans_visitor
5765
5774
push_new_emitter_with_vregs (Some b.id);
5766
5775
iflog (fun _ -> annotate " prologue" );
5767
5776
abi.Abi. abi_emit_fn_prologue (emitter() )
5768
- framesz callsz nabi_rust (upcall_fixup " upcall_grow_task" ) true ;
5777
+ framesz callsz nabi_rust (upcall_fixup " upcall_grow_task" )
5778
+ true cx.ctxt_sess.Session. sess_minimal;
5769
5779
write_frame_info_ptrs None ;
5770
5780
iflog (fun _ -> annotate " finished prologue" );
5771
5781
trans_block b;
0 commit comments