File tree Expand file tree Collapse file tree 4 files changed +323
-216
lines changed Expand file tree Collapse file tree 4 files changed +323
-216
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ let to_x86_directive (dir : ND.Directive.t) : X86_ast.asm_line list =
113
113
comment_lines comment @ [X86_ast. Sleb128 (to_x86_constant constant)]
114
114
| Space { bytes } -> [Space bytes]
115
115
| Type (n , st ) ->
116
- let typ = match st with Function -> " STT_FUNC " | Object -> " STT_OBJECT " in
116
+ let typ = ND. symbol_type_to_string st in
117
117
[Type (n, typ)]
118
118
| Uleb128 { constant; comment } ->
119
119
comment_lines comment @ [X86_ast. Uleb128 (to_x86_constant constant)]
@@ -1495,7 +1495,10 @@ let emit_instr ~first ~fallthrough i =
1495
1495
(* +0.0 *)
1496
1496
I. xorpd (res i 0 ) (res i 0 )
1497
1497
| _ ->
1498
- (* float32 constants still take up 8 bytes; we load the lower half. *)
1498
+ (* float32 constants take up 8 bytes when we emit them with
1499
+ [float_literal] (see the conversion from int32 to int64 below). Thus,
1500
+ we load the lower half. Note that this is different from Cmm 32-bit
1501
+ floats ([Csingle]), which are emitted as 4-byte constants. *)
1499
1502
let lbl = add_float_constant (Int64. of_int32 f) in
1500
1503
I. movss (mem64_rip REAL4 (emit_label lbl)) (res i 0 ))
1501
1504
| Lop (Const_float f ) -> (
You can’t perform that action at this time.
0 commit comments