Skip to content

Commit c73e03b

Browse files
committed
update binary emitter filling code
1 parent 7281f3d commit c73e03b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

backend/x86_binary_emitter.ml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1705,17 +1705,18 @@ let assemble_line b loc ins =
17051705
match eval_const b (Buffer.length b.buf) cst with
17061706
| Rint n -> (get_symbol b lbl).sy_size <- Some (Int64.to_int n)
17071707
| _ -> assert false)
1708-
| Directive (D.Align { data_section=data; bytes = n}) -> (
1708+
| Directive (D.Align { fill_x86_bin_emitter=data; bytes = n}) -> (
17091709
(* TODO: Buffer.length = 0 => set section align *)
17101710
let pos = Buffer.length b.buf in
17111711
let current = pos mod n in
17121712
if current > 0 then
17131713
let n = n - current in
1714-
if data then
1714+
match data with
1715+
| Asm_targets.Asm_directives_new.Zero ->
17151716
for _ = 1 to n do
17161717
buf_int8 b 0x00
17171718
done
1718-
else
1719+
| Asm_targets.Asm_directives_new.Nop ->
17191720
match n with
17201721
| 0 -> ()
17211722
| 1 -> buf_int8 b 0x90

0 commit comments

Comments
 (0)