.clif Test Case
test optimize
set opt_level=none
set preserve_frame_pointers=true
set enable_multi_ret_implicit_sret=true
target s390x
function %main() -> i64, i64 , i16x8 fast {
ss0 = explicit_slot 32
block0:
v1 = iconst.i64 0x0011_0022_0033_0044
stack_store v1, ss0
stack_store v1, ss0+8
stack_store v1, ss0+16
stack_store v1, ss0+24
v80 = stack_addr.i64 ss0
v81 = load.i64 big v80
v82 = sload8x8 big v80
return v80, v81, v82
}
; print: %main()
Description
When I specify the load and sload8x8 instructions as big-endian
v81 = load.i64 big v80
v82 = sload8x8 big v80
the execution results are as follows.
%main() -> [274928428480, 4785220636311620, 0x00440000003300000022000000110000]
Then I changed them to little-endian, and the results are as follows.
v81 = load.i64 little v80
v82 = sload8x8 little v80
%main() -> [274928428480, 4899972470242545920, 0x00440000003300000022000000110000]
The value of v81 changed, which is expected. But the value of v82 stayed the same, indicating that little/big-endian has no effect on sload8x8.
Environment
qemu-s390x to emulate execution on an x86 machine.
.clifTest CaseDescription
When I specify the
loadandsload8x8instructions as big-endianthe execution results are as follows.
Then I changed them to little-endian, and the results are as follows.
The value of
v81changed, which is expected. But the value ofv82stayed the same, indicating that little/big-endian has no effect onsload8x8.Environment
qemu-s390xto emulate execution on an x86 machine.