From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) by sourceware.org (Postfix) with ESMTPS id 73D553858D35 for ; Mon, 28 Aug 2023 12:22:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 73D553858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-59209b12c50so39233857b3.0 for ; Mon, 28 Aug 2023 05:22:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693225353; x=1693830153; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YYZ0yybWegwUkIUetA2Q6pf5TGRSh+lMt+CtOQ+0ORo=; b=LTeG+mVksEI6CcfFyMurYzQgIlJFet8DhjlEYEvhtJkKe90/Ck0KuC1YOu1U4h7oMv bou+l2ACfurVx+ZBJC7zUUQ1oJZmJ2rQ3JJ3m31p2PGW3xWnJ3KN9sZIcWpLl0fmEy0/ CdB7t91ghqfFZQrEkw8mvKmsKZGO/AsvMCD57mE0qVzhwJb9MSpiaiMhnGTzz7szlb4O fQKz8WwAP8H3KgrEeG4kLyVM6clm14g8T54k93FlVVneTvy5hL9FpFD3tdjbc6xQS2wi 6VbVwo4GH5W0ROROOqlm6HDlBjtXFC4W8YPlalFyeHY+ED826Cs8gDUHavFYJaL+MCsk yeEQ== X-Gm-Message-State: AOJu0YwHbICYwEUiCa2FIHtVJeaipMtODzIc3vLFgLKwrS4oKrHOb0E7 9BXs1uDy5owNT9ZP+vZlrwL0gCoMnshSzQ== X-Google-Smtp-Source: AGHT+IHzyIiD8uH+u/xxP08lrkQKQtwvFb9g8YN+LupsFGFrRGgcjoQ9DoaoZVMepRVZiWHxN4ZCgw== X-Received: by 2002:a0d:f446:0:b0:56d:9e2:7d9e with SMTP id d67-20020a0df446000000b0056d09e27d9emr27716093ywf.21.1693225352855; Mon, 28 Aug 2023 05:22:32 -0700 (PDT) Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com. [209.85.219.180]) by smtp.gmail.com with ESMTPSA id eb6-20020a05690c26c600b00594fb0e2db3sm1183559ywb.138.2023.08.28.05.22.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Aug 2023 05:22:32 -0700 (PDT) Received: by mail-yb1-f180.google.com with SMTP id 3f1490d57ef6-d6b1025fc7aso2812112276.3 for ; Mon, 28 Aug 2023 05:22:32 -0700 (PDT) X-Received: by 2002:a5b:24f:0:b0:cae:d40f:5934 with SMTP id g15-20020a5b024f000000b00caed40f5934mr23366927ybp.27.1693225352261; Mon, 28 Aug 2023 05:22:32 -0700 (PDT) MIME-Version: 1.0 References: <10cbcb8a65639f88e7eeb503fd02df172bc46a07.camel@physik.fu-berlin.de> <5F114C03-5320-485F-86E3-946A334F16D1@arcor.de> <99aacdf62e82c8c4244e47052d5661df7417a47a.camel@physik.fu-berlin.de> In-Reply-To: From: Geert Uytterhoeven Date: Mon, 28 Aug 2023 14:22:20 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Tuple and changes for m68k with -malign-int To: Richard Cc: debian-68k@lists.debian.org, John Paul Adrian Glaubitz , James Le Cuirot , libc-help@sourceware.org, linux-m68k Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Richard, On Mon, Aug 28, 2023 at 2:12=E2=80=AFPM Richard wrote: > On August 28, 2023 10:57:25 AM UTC, John Paul Adrian Glaubitz wrote: > >On Sat, 2023-08-26 at 19:24 +0000, Richard wrote: > >> > Not only mold but also most notably the following projects: > >> > >> a linker that is broken by a slightly unusual alignment isn't exactly = a > >> prime example.. if any project I would expect linkers and binary tools > >> to pay attention to portability. > > > >Portable shouldn't mean having to accommodate for unreasonable design de= cisions > >of other developers. It's perfectly fine to assume 32-bit natural alignm= ent on > >a 32-bit platform and I don't think it's fair to put the burden of adopt= ing for > >unusual design decisions on to upstream projects. > > Assuming anything that is not declared by the c standard is not good imho= . The C lang is well known for its pitfalls and the basic binary tools ough= t not to set bad precedents ignoring those. > > It is also reasonable to assume that on modern hw cache is filled in blo= cks of perhaps 1k or more and thus "unnatural" alignment might actually hel= p performance because more fits into that one data burst. "1k" (I assume you mean 1 KiB?) is a bit much... Note that on several architectures you cannot do unaligned accesses, so you have to declare such a structure with __attribute__((__packed__)), and thus not only live with the overhead of doing unaligned accesses from the D-cache, but also in emulating them in software... Gr{oetje,eeting}s, Geert --=20 Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k= .org In personal conversations with technical people, I call myself a hacker. Bu= t when I'm talking to journalists I just say "programmer" or something like t= hat. -- Linus Torvalds