From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id 234B23858D35 for ; Tue, 16 Apr 2024 16:20:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 234B23858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 234B23858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::634 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713284409; cv=none; b=xhvJF9lY0hk4pw5nyoNkjTOcHPMmy6ExpICLk/nETplCDpcpqbgo3bUHhH4dq/nGP+bVBSewmmvQnQG77iJmmxzJkKu06xy8dHcdjmFJsxuSF70fRp7cwDbbgKtYZWNjXQ7mpMuvZaiOCDoQyyIGpWPsgYjnYFR4ZEPWZlNFoYc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713284409; c=relaxed/simple; bh=CdDioauzPsVdmvEvwfrE3wSe9nwoLNd0NWasPaII7Cg=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=OhnohTt7db4njppYSpoq8U2J/L+mQR70CusnW2fxbFw+EheTrYGFCG3/agKHmPBkhMf9/iY9klLdP6mfzIP7AuGOeX1Ti3lCLCmU3xz5CXK/PelnvY+XWeq5BpDlBgakNqcIviGASFauNrOAM2HK3uhZITKRzU+sPtDdwUcr72I= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1e411e339b8so36222345ad.3 for ; Tue, 16 Apr 2024 09:20:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713284406; x=1713889206; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=b0Ukbqz0oqZ6Qoqe3OK61DIx2Mm6BdJJcP/3/5uImOw=; b=SkI2F4t51qZgrQFomg5X09Ju/8BcPvEXMQVMMg931obFwKXjIHGPdDogByLR++gAuf JNleKJAK4hQ/Mq+jcZ7fl4b9bU63x8nMkcs6KVX79taS5HgLnuCoLAhvqB+2xSQIlHs1 46oQ5zROf2MNBFzJw5mRrEj4at8eqXTh403MyvFOySAKnhjrgB7OdzJkNvqgOgVSZ0dh FwNw3T7CcLJNh3yfQbFf3krpnjYYRbCn96qqh9I0TEisVfMKSjZJHrQ83SGLt35bASTa D4eMLqexiy+3Jzrzc4JlcGTxXEDU+vSUQf4envMJSNAoZHGrKsUsoPgDq4Yob2BG+DWb lbXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713284406; x=1713889206; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=b0Ukbqz0oqZ6Qoqe3OK61DIx2Mm6BdJJcP/3/5uImOw=; b=qEgKyf8voDH3jh0ERbnQel58A+stP8Ndxzxy3M79yyMv4eyo5ZWIVMbL7YWHyH8JNV DLyHuUj9c+AYmtXY169/+WG2mJsm6ur8PINBnL7oJTbPVJ2iU1b3VAQWbGU1iG0rY94p O3PllPEwABWLuxg+oee1IrpCAQMVFvgdN0XWuwq64XovIvGy2LJnDfUXrxhsdMGuRMnA bdCw2BqmYTsFoX1tazWeBu+a2ZhJWcG4ak088tpZ2JUCHx4lCE+1osOFVklgZTFaLkbO d6ro3C+kSFEIuBROv31EzhA4xPVuDbkQdMlfL4m/yaD1JR7yaOYGuBnHmt+s2+in038a 3XGQ== X-Forwarded-Encrypted: i=1; AJvYcCXtreCIXA8GCrZPUkRGN+suLy7IC7ctlJFt2HxhDfu0BwEEYwnFCa1EY6kJucprWLUm81TY7BfXYnBDOzKN54fwZyGE/rIM8oZ0 X-Gm-Message-State: AOJu0YwlyaC1SfOJFCLVx2SWTP9ja92XooSaoRbvmJjB4D4c3StVKKtX mRlORxIRwh3YwT9checw/598ZuQt0b162wHr9s18QZzFALknvP94bPLtlOqXt6nbB8vcZq/FOhG U X-Google-Smtp-Source: AGHT+IEql5Vhb3nkOLg4mg7UOMUdt1YqcDhWjffCcralyCfgRKgphiAJBjfXHvspBPAT+sNjdXGG3w== X-Received: by 2002:a17:902:a601:b0:1e7:b7a7:9f20 with SMTP id u1-20020a170902a60100b001e7b7a79f20mr3793335plq.59.1713284406094; Tue, 16 Apr 2024 09:20:06 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c0:d8e5:34bc:e1c9:2b45:c06a? ([2804:1b3:a7c0:d8e5:34bc:e1c9:2b45:c06a]) by smtp.gmail.com with ESMTPSA id v20-20020a170902d09400b001e435350a7bsm9934330plv.259.2024.04.16.09.20.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Apr 2024 09:20:05 -0700 (PDT) Message-ID: <9870848e-0b2e-423f-8dd1-4bed6968aeda@linaro.org> Date: Tue, 16 Apr 2024 13:20:01 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] or1k: Add hard float support To: Richard Henderson , Stafford Horne , GLIBC patches Cc: Linux OpenRISC References: <20240329074044.1961252-1-shorne@gmail.com> <20240329074044.1961252-2-shorne@gmail.com> <4fca2ce2-2a45-4021-b91c-3e0c9dd8f6e2@linaro.org> Content-Language: en-US From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 16/04/24 11:53, Richard Henderson wrote: > On 4/16/24 07:04, Adhemerval Zanella Netto wrote: >> If I understond correctly the OpenRISC hard-float ABIs uses the same >> parameter passing ABI from soft-fp, similar of what ARM does with >> -mfloat-abi=softfp.  So the the shared objects built with/without >> -mhard-float should be interoperable, assuming hardware has hard-fp >> support. >> >> However it does solve the potential problem a binary built with softfp >> loading a hardfp built shared object, or even trying to link with a >> static object with different ABI (and assuming a hardware without >> hard-fp support)..  It means that loader and ldconfig won't recognize >> shared objects with different floating-point objects if they are installed >> on the same system. >> >> I don't think we have a strong policy regarding this, and historical >> there were ABI variants that followed this (like powerpc soft and hard), >> but most ABIs that support soft/hard floating-point usually advertise it >> through ElfXX_Ehdr::e_flags. >> >> For instance, with arm: >> >> $ cat << EOF > lib.c >> float foo_float (float x, float y) >> { >>    return x + y; >> } >> >> double foo_double (double x, double y) >> { >>    return x + y; >> } >> EOF >> $ arm-glibc-linux-gnueabi-gcc -shared -o lib.so lib.c >> $ readelf -h lib.so | grep Flags >>    Flags:                             0x5000200, Version5 EABI, soft-float ABI >> $ arm-glibc-linux-gnueabihf-gcc -shared -o lib.so lib.c >> $ readelf -h lib.so | grep Flags >>    Flags:                             0x5000400, Version5 EABI, hard-float ABI > > The typical reason for wanting an e_flags bit is because those architectures want the parameter passing to change when floating-point registers are available. > > But for OpenRISC there is no separate floating-point register set.  All floating-point operations use the same general-purpose registers as for all integer operations.  So there is no point in a new parameter passing ABI. Right, it was not clear from patch without dig into the ABI documen itself. So the only thing I am not sure is the mcontext_t change. Other ABIs added a symbol version to proper handle it, so maybe OpenRISC would need something similar.