From 11f2afa5a3c8cc88e10b001d6eb8790c8a3b91a7 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 2 Jun 2024 12:17:03 +0200 Subject: sys/targets: mark big-endian targets Litte-endian is kind of default (except for s390). So instead of saying that each arch is litte-endian, mark only s390 as big-endian. --- pkg/csource/csource.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/csource/csource.go') diff --git a/pkg/csource/csource.go b/pkg/csource/csource.go index 1f338b893..198ddf7df 100644 --- a/pkg/csource/csource.go +++ b/pkg/csource/csource.go @@ -409,11 +409,11 @@ func (ctx *context) copyin(w *bytes.Buffer, csumSeq *int, copyin prog.ExecCopyin panic("bitfield+string format") } htobe := "" - if ctx.target.LittleEndian && arg.Format == prog.FormatBigEndian { + if !ctx.target.BigEndian && arg.Format == prog.FormatBigEndian { htobe = fmt.Sprintf("htobe%v", arg.Size*8) } bitfieldOffset := arg.BitfieldOffset - if !ctx.target.LittleEndian { + if ctx.target.BigEndian { bitfieldOffset = arg.Size*8 - arg.BitfieldOffset - arg.BitfieldLength } fmt.Fprintf(w, "\tNONFAILING(STORE_BY_BITMASK(uint%v, %v, 0x%x, %v, %v, %v));\n", -- cgit mrf-deployment