2.5.4 Signedness and integer representation

JSON can unambiguously represent positive and negative integers of arbitrary size. U64JSON can represent all integers in the range -263 to 264-1 unambiguously.

Almost all Iris interfaces specify the signedness of each integer value, so it is clear whether it is a signed or unsigned integer. This means that programming languages can use any 64-bit data type to represent the 64-bit patterns transported through JSON or U64JSON. Applications must make sure that these 64-bit patterns are then suitably interpreted when processed further. There are very few interfaces in which integer values are allowed to cover the whole signed and unsigned range, for example in parameters. It is only necessary in these few cases to support signed and unsigned 64-bit integers at the same time. This can be achieved by storing an explicit type flag, for example bool isSigned in addition to the 64-bit pattern.

Non-ConfidentialPDF file icon PDF version101196_0100_00_en
Copyright © 2018 Arm Limited or its affiliates. All rights reserved.