From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 9891C3858D35 for ; Tue, 16 Apr 2024 14:53:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9891C3858D35 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 9891C3858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713279229; cv=none; b=QU1Te44w6/wOv7zVa/WvRnkE+5Slye5+Cg7Vr+LADSEwTJyJq4ZbhyqfooOkmNn8sWVA4aqE+QY2FoqzxVBmq7VuIQnab3/FgRFz4nkbnduCEG5zCwTggAS3UuUSmfPCYbv6jnVuPI23FINb2K2pMa4YtepisK0rI1mkmHmLseI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713279229; c=relaxed/simple; bh=j5yc0s4TcUNxffKlr7NEk66wuBol0ugKtNM9kjFM2DE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=WElQMtFm0aI9uz2dNFlIiYTPRF6t5tJPT05wC+rUVaDuPH//3gQbV7OckiTbAbwXXmOZeSk8jc3OgrlzUmZnjscWJAuBx/tsLsiw3yoJdCs270Q4b/bK9xY26s+TI50+zhQsyQc9E3Q0R+tQZ6UJWkudr7B89xdiFM2G+ZznL+8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-6ed0e9ccca1so4105003b3a.0 for ; Tue, 16 Apr 2024 07:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713279226; x=1713884026; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=IG9e5iG55e33wZLtcPelhxBmX5wUCwm90Rmb0DsqatQ=; b=omAUpouNMHnLOr3UPCaS87GDMUV8Hy2zxcp4zUsWMUmdePU/lWFB47XkLWi+YErl4X 8MJSUHQzK036xBOG0DSzcsdFZ+D/5lLxwoPIdeGzGEkQJG6O2RhZxtLdLbVYA1uvqnRv tCNU2lcd0tNnV6skWnyza4SrzbJBodqRh/OYQaIPaHtH3O6eHSxAO5NWPF8MPIc+GacL AcLxYNsjoSr0eeR3aoaCFxrZ3LADPQPz+HctS5Bf13HhBXAzQyBHuvQ+EgWJXI7fgZ03 CQVKTHOesnGtNpC11RtTnAGrEx5kO7l2yJWIIRSL5JHmpE4im2b/YBBj8ud1FzapAA9L 0vTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713279226; x=1713884026; h=content-transfer-encoding:in-reply-to: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=IG9e5iG55e33wZLtcPelhxBmX5wUCwm90Rmb0DsqatQ=; b=s0sE5mIDUxlIeA+/TtwOkhTLl5zPSFyiIK1sVv+ICfwsqFOKMITwbkyZ0+/h1kr2YQ 8c3dJ8kLbb+SPrHISeeB2vk+6V7AOyvy9UhYaNmx8ncvsXrYAvcRxvDRsUKQ0cSOdTL9 7hnPPKYLB7DKIRlyGYusX5LyNbPCElCbsrF5Az496dQyPDwwfCiKxJSxV0OXiPvODq46 9ZYF0PpKDg9PcYj59+iKpCliYERMStXWZL+4/XQPKpVL+/Xypl5z+Xw0yQxQuOpWvfaF 5Ua4F7QKm5d+iQg8WKQKVyWb9RFJO2HcEcyjSOR+r34336dzoabhIGGiMOSQO9aWMt93 QAfQ== X-Forwarded-Encrypted: i=1; AJvYcCXSh555+9ONh+vJLULyXlXBF0od3wPQOwN13RtodyNMs9/Lmr6McYrNPy7XYKcOssSh0WmATurG4MKtkrWpsanGFR/RqiugUfHX X-Gm-Message-State: AOJu0YyLGQrZUjGD4/OVdysgcfA/xeMc2+N+a7s1H+n09IRr1Z5jCmNY HShBOsCkPELY01b6XmllN4+mIU4lnUb2j+dW3fqdANyoUH2vhno4KR/WMDEXMU8= X-Google-Smtp-Source: AGHT+IHddjYaOvb0TfIg3FdVtrI7tO6xvQ6RsY5w+54srdfYVVNOtls24UmT0YY0fd/7/w7a94+/ZA== X-Received: by 2002:a05:6a20:5609:b0:1a5:bc18:97d8 with SMTP id ir9-20020a056a20560900b001a5bc1897d8mr10750055pzc.3.1713279226565; Tue, 16 Apr 2024 07:53:46 -0700 (PDT) Received: from [192.168.0.4] (174-21-72-5.tukw.qwest.net. [174.21.72.5]) by smtp.gmail.com with ESMTPSA id u16-20020a17090341d000b001e51b690b7dsm9821723ple.295.2024.04.16.07.53.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Apr 2024 07:53:46 -0700 (PDT) Message-ID: Date: Tue, 16 Apr 2024 07:53:44 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] or1k: Add hard float support To: Adhemerval Zanella Netto , 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: Richard Henderson In-Reply-To: <4fca2ce2-2a45-4021-b91c-3e0c9dd8f6e2@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,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 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. r~