From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 13D973858407 for ; Tue, 29 Aug 2023 15:53:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 13D973858407 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dabbelt.com Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1bc63ef9959so35156285ad.2 for ; Tue, 29 Aug 2023 08:53:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20221208.gappssmtp.com; s=20221208; t=1693324424; x=1693929224; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=mJcVZ54YC3Hw9TRHa60CTamhx0sOxO337tsAOzn3otU=; b=x6VK6NZe6EfRnmTrZ38ntQLsmWHzEqGif01HbJHQrQcvvTiU0TdSYkouDjFPCo7TjA +LMmUpyx/jqguZn43GuaoJh3ruFCLwnLVqcmwDDyhEUd9YiZYvzJW1FuOzFNSAqCos2T 8OTP6BPKzbP1lePmAsKNkCEd1WLyxB18CLLm/dmA5fy8PJR6Iwj1rZy8vKP/7/Ncqhfw zzn10tvkWDZAVO3SbeGtzlBYYi0dVbgtAY5FEjh6HLpx7Qjw6Cg7lhT4kbAjzeuZNRzh rcBEWOM8HLBFT1987Pe689/gnNYkq9n3t2NQ0Kd+u63x1+tzg+GpjhtAg4jbqOvO5zY6 blMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693324424; x=1693929224; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mJcVZ54YC3Hw9TRHa60CTamhx0sOxO337tsAOzn3otU=; b=KQkW2PzKyDNyR98qP3TL7eWqcF30cgU/HNkQ/lvb6nMTHOgxPcuKRBxpNodxgEX22y NtURBQYxFM5e9NAvcezrMVz0/hdZyCyGO0JXNrIvfs3QU6YL7CnYkZQiMp378SVGqYB9 86LPLNLCH+CFn53DvjiFWgN7EUFrHUuyaaqf0/uzGLRO462IyPefUZmhl8kjygqcmWXD TZVCIEZ6s2W1wZRvwYWx7yZln7cqo3+4q+Lj3TOq0Y/Y7qxunmKfbmI5vT7eylq/1WE/ F7OJjw97+151jcJAeQ419qhFeKxONAxLhzTf7DpslNRCJucMV3c2yqficZgXB33y5mah CT8Q== X-Gm-Message-State: AOJu0YwIYl6YeQStbCxdmViy4BzHOO3V+Q2KFhOTUY8JNcWWh50/nHBD hQq79n6rLtkrixQcQ5dPXW6Uxw== X-Google-Smtp-Source: AGHT+IGqqJXkZzOMnzem4MS9P52BiHMh0lUkJHiDk48I17B2t1vDO8wSBdUayHvG2r5vbRkSUg+Afw== X-Received: by 2002:a17:903:4296:b0:1bc:422a:b9fd with SMTP id ju22-20020a170903429600b001bc422ab9fdmr25316565plb.13.1693324424009; Tue, 29 Aug 2023 08:53:44 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id b1-20020a170902d50100b001adf6b21c77sm9529053plg.107.2023.08.29.08.53.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Aug 2023 08:53:40 -0700 (PDT) Date: Tue, 29 Aug 2023 08:53:40 -0700 (PDT) X-Google-Original-Date: Tue, 29 Aug 2023 08:53:39 PDT (-0700) Subject: Re: [Committed] riscv: generate builtin macro for compilation with strict alignment: In-Reply-To: CC: jeffreyalaw@gmail.com, gcc-patches@gcc.gnu.org, gnu-toolchain@rivosinc.com, Vineet Gupta From: Palmer Dabbelt To: ewlu@rivosinc.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, 29 Aug 2023 08:48:56 PDT (-0700), ewlu@rivosinc.com wrote: > > On 8/28/2023 3:40 PM, Jeff Law wrote: >> >> >> On 8/15/23 12:29, Edwin Lu wrote: >>> This patch is a modification of >>> https://gcc.gnu.org/pipermail/gcc-patches/2023-January/610115.html >>> following the discussion on >>> https://github.com/riscv-non-isa/riscv-c-api-doc/issues/32 >>> >>> Distinguish between explicit -mstrict-align and cpu tune param >>> for slow_unaligned_access=true/false. >>> >>> Tested for regressions using rv32/64 multilib with newlib/linux >>> >>> gcc/ChangeLog: >>> >>>     * config/riscv/riscv-c.cc (riscv_cpu_cpp_builtins): >>>       Generate __riscv_unaligned_avoid with value 1 or >>>               __riscv_unaligned_slow with value 1 or >>>               __riscv_unaligned_fast with value 1 >>>     * config/riscv/riscv.cc (riscv_option_override): >>>      Define riscv_user_wants_strict_align. Set >>>      riscv_user_wants_strict_align to TARGET_STRICT_ALIGN >>>     * config/riscv/riscv.h: Declare riscv_user_wants_strict_align >>> >>> gcc/testsuite/ChangeLog: >>> >>>     * gcc.target/riscv/attribute-1.c: Check for >>>      __riscv_unaligned_slow or __riscv_unaligned_fast >>>     * gcc.target/riscv/attribute-4.c: Check for >>>      __riscv_unaligned_avoid >>>     * gcc.target/riscv/attribute-5.c: Check for >>>      __riscv_unaligned_slow or __riscv_unaligned_fast >>>     * gcc.target/riscv/predef-align-1.c: New test. >>>     * gcc.target/riscv/predef-align-2.c: New test. >>>     * gcc.target/riscv/predef-align-3.c: New test. >>>     * gcc.target/riscv/predef-align-4.c: New test. >>>     * gcc.target/riscv/predef-align-5.c: New test. >>>     * gcc.target/riscv/predef-align-6.c: New test. >> OK.  Though I'm pretty sure the commit hooks are going to complain >> about your ChangeLog :-) >> >> jeff > > I did need to do some ChangeLog formatting but was able to commit it in > the end :) There's a gcc-commit-mklog git hook script in contrib/ that should do most of the formatting for you. > > Edwin > > -- > You received this message because you are subscribed to the Google Groups "gnu-toolchain" group. > To unsubscribe from this group and stop receiving emails from it, send an email to gnu-toolchain+unsubscribe@rivosinc.com. > To view this discussion on the web visit https://groups.google.com/a/rivosinc.com/d/msgid/gnu-toolchain/eb8d898a-3558-4289-8c7d-37575d812ad2%40rivosinc.com. > For more options, visit https://groups.google.com/a/rivosinc.com/d/optout.