Ignore:
Timestamp:
May 19, 2011, 4:03:04 PM (8 years ago)
Author:
ayache
Message:

32 and 16 bits operations support in D2.2/8051

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.2/8051/src/common/intValue.ml

    r740 r818  
    1111
    1212type int_repr = Big_int.big_int
     13
     14let print_int_repr = Big_int.string_of_big_int
    1315
    1416(* The parameter module. Bounded integers are characterized by the number of
     
    3032  val zero      : t
    3133  val one       : t
     34
     35  val to_signed_int_repr   : t -> int_repr
     36  val to_unsigned_int_repr : t -> int_repr
    3237
    3338  val succ    : t -> t
     
    8287      representation). *)
    8388  val break : t -> int -> t list
    84   (** [merge l] creates the integer where the first element of [l] is its
    85       low bits, etc, and the last element of [l] is its high bits (little endian
     89  (** [merge l] creates the integer where the first element of [l] is its low
     90      bits, etc, and the last element of [l] is its high bits (little endian
    8691      representation). *)
    8792  val merge : t list -> t
     
    123128    if lt_big_int a half_bound then a
    124129    else sub_big_int a _mod
     130
     131  let to_signed_int_repr a = signed a
     132
     133  let to_unsigned_int_repr a = a
    125134
    126135  let signed_op op a b = op (signed a) (signed b)
Note: See TracChangeset for help on using the changeset viewer.