[sledge] Fix frontend bug in trampoline creation

Reviewed By: ngorogiannis

Differential Revision: D17844327

fbshipit-source-id: 18a1c4fbe
master
Josh Berdine 5 years ago committed by Facebook Github Bot
parent cf5097a8b4
commit 2331e8d68a

@ -1171,13 +1171,13 @@ let xlate_instr :
let mov =
Llair.Inst.move ~reg_exps:(Vector.of_array [|(reg, exp)|]) ~loc
in
let lbl = lbl ^ "." ^ Int.to_string i in
let lbl_i = lbl ^ "." ^ Int.to_string i in
let blk =
Llair.Block.mk ~lbl
Llair.Block.mk ~lbl:lbl_i
~cmnd:(Vector.of_array [|mov|])
~term:(Llair.Term.goto ~dst:(Llair.Jump.mk lbl) ~loc)
in
(Llair.Jump.mk lbl, blk :: rev_blocks)
(Llair.Jump.mk lbl_i, blk :: rev_blocks)
in
let goto_unwind i sel blocks =
let dst, blocks = jump_unwind i sel blocks in

Loading…
Cancel
Save