Skip to content

Commit

Permalink
fixed bbswap
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanburen committed Jan 22, 2025
1 parent 4d6c02f commit 4e97122
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions backend/cmm_helpers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3299,7 +3299,7 @@ let bbswap bi arg dbg =
if (bi = Primitive.Unboxed_int64 && size_int = 4)
|| not (Proc.operation_supported op)
then
let prim, tyarg =
let func, tyarg =
match (bi : Primitive.unboxed_integer) with
| Unboxed_int8 -> assert false
| Unboxed_int16 -> "caml_bswap16_direct", XInt16
Expand All @@ -3309,7 +3309,7 @@ let bbswap bi arg dbg =
in
Cop
( Cextcall
{ func = Printf.sprintf "caml_%s_direct_bswap" prim;
{ func;
builtin = false;
returns = true;
effects = Arbitrary_effects;
Expand All @@ -3336,6 +3336,8 @@ let bswap16 arg dbg =
coeffects = Has_coeffects;
ty = typ_int;
alloc = false;
(* CR jvanburen: why is ty_args empty here? this is the only
difference to [bbswap Unboxed_int16] *)
ty_args = []
},
[arg],
Expand Down

0 comments on commit 4e97122

Please sign in to comment.