You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5769 Reporter:@chambart Assigned to:@chambart Status: closed (set by @xavierleroy on 2015-07-24T08:38:57Z) Resolution: fixed Priority: normal Severity: feature Version: 4.00.0 Fixed in version: 4.01.0 Category: back end (clambda to assembly) Tags: patch Monitored by:@chambart@hcarty
Bug description
When writing machine specific code like
let read_int32_little_endian v n =
let v = raw_read_int32 v n in
if Sys.big_endian
then swap_bytes v
else v
It would be prettier to know that the compiler cleans the test rather than having to use a preprocessor for that.
The patch provided add a primitive %big_endian of type unit -> bool that calls a C stub in byte code and is simplified in native code
Original bug ID: 5769
Reporter: @chambart
Assigned to: @chambart
Status: closed (set by @xavierleroy on 2015-07-24T08:38:57Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 4.00.0
Fixed in version: 4.01.0
Category: back end (clambda to assembly)
Tags: patch
Monitored by: @chambart @hcarty
Bug description
When writing machine specific code like
let read_int32_little_endian v n =
let v = raw_read_int32 v n in
if Sys.big_endian
then swap_bytes v
else v
It would be prettier to know that the compiler cleans the test rather than having to use a preprocessor for that.
The patch provided add a primitive %big_endian of type unit -> bool that calls a C stub in byte code and is simplified in native code
File attachments
The text was updated successfully, but these errors were encountered: