From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by sourceware.org (Postfix) with ESMTPS id 640B03858C5F for ; Fri, 3 Feb 2023 00:13:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 640B03858C5F 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-pj1-x102a.google.com with SMTP id rm7-20020a17090b3ec700b0022c05558d22so3411460pjb.5 for ; Thu, 02 Feb 2023 16:13:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; 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=ANzy9ca/UUrI06c3Au/jrPC7BWVHySohlj8vh0AyXSU=; b=J045ohd6oeDVVBt1Hi+IVpD6CM7mqknRzyljTaSW1zw5DsMUgYdXSfJMVr8nDTH1yX gJHsLjdU136ihSkdG0xPq07fkiGNBzuPhokKix4Z4q3hTSk30gp61L4TRdV0DElK6li7 dHf3ohKPm9/I0KG77X4Of0/JmFHZHTsGxQnPUkFWFOP9nnbw7/RsFB3dltV//gin6mTm rP+DJ0qZR6HJJUgWukNhaTiXBXv2oS/24RTwrT+2NOlf618rj6joT9PK5PtjrNad+eKD ElW0OsdgYf399hsTy188uRheKLcfJzbMcG0w32jiYhV1dRbq0iB1NmZmggGg3ZVLXC0J Tgxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=ANzy9ca/UUrI06c3Au/jrPC7BWVHySohlj8vh0AyXSU=; b=yBNksznkb1g+qmahEm5feovt7kS9BZqAJIcBHN1CjmNupYg5ZU9dCBmuczycolyG6p mIwQzgLJuZ3BZYNR+fjZrU9ccfln44Dt6d+kzPWTsbLO2y287Rzi+xpMJotYck6wdBLK naYAR9WeuXdEoiO8IolEHf03AS7ikrIDW14uiVaNp8TWI3nRzNQKB5vV+PbHmN31uaen sCuQfp8uwxFHszwLlJAjs5XAcqv8vPvMfsRCsHUKBYJ6CJngN2ImNmP+GBS2iXTbmjid F/A19DmABFFTU7YL1Bjlfa9Iw/gFE1V8Xf4yf3LfRKFgmu29Ef7Cnl6u23BfXW+KavZX SRrA== X-Gm-Message-State: AO0yUKWd7maFsxtl3G1y19f0qQC7pf6hic1DvAz2ZWrW7kImiHlwblBb Z8s9v8+ssEx2xezpf9UhFcz7IQ== X-Google-Smtp-Source: AK7set9hAJrenfwLEQog8vY6mSVNQZY6aspiNCRdlC4qcnogkXc3XYJVfc+j9o/s9C1CEeU+x4KSqQ== X-Received: by 2002:a17:90b:17c2:b0:22c:9a54:fea with SMTP id me2-20020a17090b17c200b0022c9a540feamr8488156pjb.48.1675383196519; Thu, 02 Feb 2023 16:13:16 -0800 (PST) Received: from [10.0.17.151] ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id mg8-20020a17090b370800b00229ff1fd7e0sm3843227pjb.14.2023.02.02.16.13.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Feb 2023 16:13:16 -0800 (PST) Message-ID: Date: Thu, 2 Feb 2023 16:13:15 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH 2/2] riscv: vectorised mem* and str* functions Content-Language: en-US To: Andrew Waterman , Sergei Lewis Cc: libc-alpha@sourceware.org References: <20230201095232.15942-1-slewis@rivosinc.com> <20230201095232.15942-2-slewis@rivosinc.com> From: Vineet Gupta In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,NICE_REPLY_A,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 2/1/23 11:03, Andrew Waterman wrote: >> +#ifndef __riscv_strict_align > strict-align is not the right thing to check here. As the RVA profile > document explains, all RVA-compliant implementations must support > misaligned loads and stores (so strict-align will be false), but they > might execute extremely slowly (e.g., via trap and emulate), and so > this approach will unduly penalize some implementations. FWIW, the proposed __riscv_strict_align if generated can have 2 possible values:  - 1 (explicit -mstrict-align used in build)  - 2 cpu tune param indicated unaligned access is slow (like with trap-n-emulate) So if theory code can still be written to cater to that. -Vineet