From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by sourceware.org (Postfix) with ESMTPS id A6BDD3858D28 for ; Tue, 14 Dec 2021 22:15:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A6BDD3858D28 Received: by mail-qv1-xf29.google.com with SMTP id a24so18643095qvb.5 for ; Tue, 14 Dec 2021 14:15:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=USs5oiwF5mrcUv9FFWB/POaF/B5QSWT7HvGTH7yeG+c=; b=zLT53tlPpp9t2ChaAfq2ed4AgZ40cxdBaYzrC0EEPgj5rmwZEeFa+Z3I5Mf9hJRBEE cnhGR11Y8jv1aV87w4lyTrFGVDv78dHsyrMh0B13+MFs+Drrat0BFHTqkS3vtz0DQhaz qZyeaeNQTOOKUdDDCAarpoHXTOruSSHHRtU82AWqMPomc8KrkUbJMiM43iQROo/pse3Y ZT8qh9IaSgIzmClEW/nITlA9XRRPduOEg0+NCIDxRgzHaxlNKW0PbPi2DXq+bHgDy9YU VeTzySrKl94tEru8+ZXX6MipIpgzYZ7Nak8dhVummRbjEanofW2lJSDqjMvE5MN6Jppe L/cw== X-Gm-Message-State: AOAM5319QJGNk5ppbn7YLjO1DL2GVsM7TTFRBMlmMiiWImBLR+05q9dk Eq+WogCMoBSMxLgUdDq1x8FuS88rcPi41w== X-Google-Smtp-Source: ABdhPJxbPs8b3idNUSByl+JAGUisSvYDKUYYbwHdpC45HUCih7NTR/XMnUWAPcQmqqNmZmZnQ/fJhg== X-Received: by 2002:ad4:5cef:: with SMTP id iv15mr8420298qvb.86.1639520106988; Tue, 14 Dec 2021 14:15:06 -0800 (PST) Received: from ?IPV6:2804:431:c7ca:103f:1000:c46d:a2d6:9bed? ([2804:431:c7ca:103f:1000:c46d:a2d6:9bed]) by smtp.gmail.com with ESMTPSA id 9sm54190qkm.5.2021.12.14.14.15.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Dec 2021 14:15:06 -0800 (PST) Message-ID: Date: Tue, 14 Dec 2021 19:15:04 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH v3] Support target specific ALIGN for variable alignment test [BZ #28676] Content-Language: en-US To: "H.J. Lu" , libc-alpha@sourceware.org References: <20211210235317.3465758-1-hjl.tools@gmail.com> From: Adhemerval Zanella In-Reply-To: <20211210235317.3465758-1-hjl.tools@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2021 22:15:09 -0000 On 10/12/2021 20:53, H.J. Lu wrote: > Add to support target specific ALIGN for variable > alignment test: > > 1. Alpha: Use 0x10000. > 2. MicroBlaze and Nios II: Use 0x8000. > 3. All others: Use 0x200000. LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > elf/tst-align3.c | 4 +--- > elf/tst-alignmod3.c | 4 +--- > sysdeps/alpha/tst-file-align.h | 20 ++++++++++++++++++++ > sysdeps/generic/tst-file-align.h | 20 ++++++++++++++++++++ > sysdeps/microblaze/tst-file-align.h | 20 ++++++++++++++++++++ > sysdeps/nios2/tst-file-align.h | 20 ++++++++++++++++++++ > 6 files changed, 82 insertions(+), 6 deletions(-) > create mode 100644 sysdeps/alpha/tst-file-align.h > create mode 100644 sysdeps/generic/tst-file-align.h > create mode 100644 sysdeps/microblaze/tst-file-align.h > create mode 100644 sysdeps/nios2/tst-file-align.h > > diff --git a/elf/tst-align3.c b/elf/tst-align3.c > index ac86d623a6..87a8ff81a0 100644 > --- a/elf/tst-align3.c > +++ b/elf/tst-align3.c > @@ -17,11 +17,9 @@ > . */ > > #include > +#include > #include > > -/* This should cover all possible page sizes we currently support. */ > -#define ALIGN 0x200000 > - > int bar __attribute__ ((aligned (ALIGN))) = 1; > > extern int do_load_test (void); > diff --git a/elf/tst-alignmod3.c b/elf/tst-alignmod3.c > index 0d33f2379d..9520c35220 100644 > --- a/elf/tst-alignmod3.c > +++ b/elf/tst-alignmod3.c > @@ -17,11 +17,9 @@ > . */ > > #include > +#include > #include > > -/* This should cover all possible page sizes we currently support. */ > -#define ALIGN 0x200000 > - > int foo __attribute__ ((aligned (ALIGN))) = 1; > > void > diff --git a/sysdeps/alpha/tst-file-align.h b/sysdeps/alpha/tst-file-align.h > new file mode 100644 > index 0000000000..8fc3c9405d > --- /dev/null > +++ b/sysdeps/alpha/tst-file-align.h > @@ -0,0 +1,20 @@ > +/* Check file alignment. Alpha version. > + Copyright (C) 2021 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + . */ > + > +/* This should cover all possible alignments we currently support. */ > +#define ALIGN 0x10000 > diff --git a/sysdeps/generic/tst-file-align.h b/sysdeps/generic/tst-file-align.h > new file mode 100644 > index 0000000000..6ee6783a2a > --- /dev/null > +++ b/sysdeps/generic/tst-file-align.h > @@ -0,0 +1,20 @@ > +/* Check file alignment. Generic version. > + Copyright (C) 2021 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + . */ > + > +/* This should cover all possible page sizes we currently support. */ > +#define ALIGN 0x200000 > diff --git a/sysdeps/microblaze/tst-file-align.h b/sysdeps/microblaze/tst-file-align.h > new file mode 100644 > index 0000000000..43c58b29d7 > --- /dev/null > +++ b/sysdeps/microblaze/tst-file-align.h > @@ -0,0 +1,20 @@ > +/* Check file alignment. MicroBlaze version. > + Copyright (C) 2021 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + . */ > + > +/* This should cover all possible alignments we currently support. */ > +#define ALIGN 0x8000 > diff --git a/sysdeps/nios2/tst-file-align.h b/sysdeps/nios2/tst-file-align.h > new file mode 100644 > index 0000000000..589a2d5ad8 > --- /dev/null > +++ b/sysdeps/nios2/tst-file-align.h > @@ -0,0 +1,20 @@ > +/* Check file alignment. Nios II version. > + Copyright (C) 2021 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + . */ > + > +/* This should cover all possible alignments we currently support. */ > +#define ALIGN 0x8000