diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-06-02 12:17:03 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-06-04 09:50:32 +0000 |
| commit | 11f2afa5a3c8cc88e10b001d6eb8790c8a3b91a7 (patch) | |
| tree | aed911ddb145445af02d18db7c0e73699522c2ef /pkg/csource | |
| parent | 06bf8101debe879447d0ef3a7a5b84cb11fa5acf (diff) | |
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.
Diffstat (limited to 'pkg/csource')
| -rw-r--r-- | pkg/csource/csource.go | 4 |
1 files changed, 2 insertions, 2 deletions
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", |
