parrotcode: Byteordering functions | |
Contents | C |
src/byteorder.c - Byteordering functions
These are assigned to a vtable when the PBC file is loaded.
If the vtable method for conversion from the native byteorder is called, it is a no op and will work, but the caller should know if the byteorder in the PBC file is native and skip the conversion and just map it in.
Configure will have checked for supported word sizes.
INTVAL fetch_iv_le
INTVAL
into little endian format.
If the native format is already little endian,
then no conversion is done.INTVAL fetch_iv_be
INTVAL
into big endian format.
If the native format is already big endian,
then no conversion is done.opcode_t fetch_op_be
fetch_iv_be
for opcode_topcode_t fetch_op_le
fetch_iv_le
for opcode_tvoid fetch_buf_be_4
b
into a little-endian rb
.void fetch_buf_le_4
b
into a big-endian buffer rb
.void fetch_buf_be_8
b
into a little-endian buffer rb
void fetch_buf_le_8
b
into a big-endian buffer rb
.void fetch_buf_le_12
b
into a big-endian buffer b
.void fetch_buf_be_12
b
into a little-endian buffer b
.void fetch_buf_le_16
b
into a big-endian buffer b
.void fetch_buf_be_16
b
into a little-endian buffer b
.Initial version by Melvin on 2002/05/01
|