ebpf: fix big endian issue for s390x

Load the full 32 bits word and take the lower 16 bits, instead of
reading just 16 bits.

Same fix as https://github.com/containers/crun/commit/07bae05e613df2086966a3f1d763729a8677f6a9

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
This commit is contained in:
Alice Frosi
2020-04-24 11:25:19 +02:00
parent 2b31437caa
commit 128cb60f58
@@ -49,7 +49,8 @@ func (p *program) init() {
*/
// R2 <- type (lower 16 bit of u32 access_type at R1[0])
p.insts = append(p.insts,
asm.LoadMem(asm.R2, asm.R1, 0, asm.Half))
asm.LoadMem(asm.R2, asm.R1, 0, asm.Word),
asm.And.Imm32(asm.R2, 0xFFFF))
// R3 <- access (upper 16 bit of u32 access_type at R1[0])
p.insts = append(p.insts,