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 C6E0B3858C74 for ; Tue, 29 Aug 2023 16:12:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C6E0B3858C74 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1bdf4752c3cso27858795ad.2 for ; Tue, 29 Aug 2023 09:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1693325531; x=1693930331; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=miEC4ormJr9STb9wOmGBOylywdett+JF4LrW6gGqul4=; b=rROEr39fuwCucgXt6z8XK8kleJGUcTvoFgOZ8BXdKJIIfKuyvy+aTDeXo/Vfo2xuTy b5swULG+4l3uiMmMgeBXR0oNYd421h7Ak8e78DXwU+SxD8oLtoJsgNvQHA+uuj613fBl Sq0uKIjApcHv4HY8S6ehf0S/GdAsNj/byTy1p34pJqiUIyFc+WkiOicjoH0bcmdxBeTm 7c3az/zst99i+52kcj9NC7SaSYGlTJuUjADndiKEOoZ41ezbq3qbZ/eTQkg5HldpGzAl Vv0w8717ivBdaK0QkAJ+8kGS7tg2AYqEjESJ/25VXlrtga7dn9V5eMvwLFu48iCvajUc w4UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693325531; x=1693930331; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=miEC4ormJr9STb9wOmGBOylywdett+JF4LrW6gGqul4=; b=ZpWLAMrC8gZE086KIppq/vUpUVblLAIBXj76ppMMK5MJ+M0hO/bBC9ZN1RI+e4iv8z fDNz4jB5qKIyXAy2mwRb/M9Pu/1rWY1lmaOzvEbK3s62obJ+aqmWk6ViIoneqMy9RGgn UKHdx0IIS3SnRsxDgLN2h7dzBJYJF31PoxE5Mfmu02H/vt6wRc8S1GXwDetNl6tWxkiE KvW0jYo3Oj4urIWDu8CkoMWgx5G3CfCywiwJnQmKoujFLhCOG9nuNb8XBPv6uBDSe4zW UavWtpoaB7hjmji6KF8CO8mcbKcIMwxnfhVB8MZ5Xw0v+mzHKqSKSgQe2LoOZN1e/deo LaDA== X-Gm-Message-State: AOJu0YwY/jpEn1oPBss2xpUWHe+F6bEHEziOSzysGGwPUInNgnQpcpWg OgI0nsPTIBFKbNgME8SZ98Hqig== X-Google-Smtp-Source: AGHT+IF28ztHkZmE/nXnpBcwG+bR+Mubl8FXxl8ACUIABQ46IZjES77tKplm/mq5puk3ZD5NS6T9GA== X-Received: by 2002:a17:902:db0e:b0:1bc:224a:45c1 with SMTP id m14-20020a170902db0e00b001bc224a45c1mr29838876plx.55.1693325530897; Tue, 29 Aug 2023 09:12:10 -0700 (PDT) Received: from [10.0.17.144] ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id ix5-20020a170902f80500b001bde65894d5sm9501972plb.109.2023.08.29.09.12.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Aug 2023 09:12:10 -0700 (PDT) Message-ID: <6c6dc5df-7bf3-476d-9c1a-6d6de01e91fa@rivosinc.com> Date: Tue, 29 Aug 2023 09:12:08 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Committed] riscv: generate builtin macro for compilation with strict alignment: Content-Language: en-US To: Palmer Dabbelt Cc: jeffreyalaw@gmail.com, gcc-patches@gcc.gnu.org, gnu-toolchain@rivosinc.com, Vineet Gupta References: From: Edwin Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.3 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 8/29/2023 8:53 AM, Palmer Dabbelt wrote: > 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. I did use it but the long broken up descriptions were the main issue since it changed the tabs to spaces on the newlines. Will need to make sure to not expand tabs for future commits Edwin