From patchwork Wed Dec 7 08:52:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Noah Goldstein X-Patchwork-Id: 61625 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CDC4539577BC for ; Wed, 7 Dec 2022 08:53:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CDC4539577BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670403206; bh=pG1jVKGCx7bEOu2QIEanr6msyBJGkMDVP79yAJy9sRs=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=ennZBHYTfUhrgR6iCzg+WAUg0gt64K/D56iNGds+lttr8qwaNnXk2nhJF+9OVMhNR YgOslERiAGxXjeytKvLVby7PiJZ8POLGqACnSL3SnFrGPGmXt/awLmczkttJFm4ZP/ h8nQMjuMPtiQZEvtWAuOkEGMgdBOOywTWWj9doR8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by sourceware.org (Postfix) with ESMTPS id B3B4B392B13A for ; Wed, 7 Dec 2022 08:52:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B3B4B392B13A Received: by mail-ed1-x52c.google.com with SMTP id i15so15737396edf.2 for ; Wed, 07 Dec 2022 00:52:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pG1jVKGCx7bEOu2QIEanr6msyBJGkMDVP79yAJy9sRs=; b=oo1nbuNaa6T6tBOgjQRPW1KhZB1zkkGXUFBHWjCSQ5agXWKoC0x4GisPm1DNxoezAo 0mvI5rFN4RfUXdVbuIL5k2twWM/017eNN38q3V4+Zna34EUWM7PnD7ljGaTL7BhSx5j8 n+Hnml3SzCVg8NmSUP85X9V63WriA8nBMVWxVbn9zUW8ZGznr7JJG1MMVHS5Zrv/o3b/ cdad2BsJuvPdqHrvpsAowW6nzRCHfcTPwCkZ75XX16Q4+CSNTlC7XHNv+WcwHcCrRdwR qcNFtWZJ0aNPbZ0FyUoLAYPFmYbaccHWSLtTJ7DMzyJQuKFrKHY4KCcFKNIX3wO8TOlo ZQIg== X-Gm-Message-State: ANoB5pnqe4aQcTTuQq0wqabbtNn90uqiIZKe/PS+fJwOtIwJw2oh+o7Z eOTrMzd6atkzKKIBNZVwRgEFIKwHsc4= X-Google-Smtp-Source: AA0mqf7dquh1PVoJCZ+d/osUPc+2F3+am3j8uZKk2sUxAtVI5/MEzUSAPZ2l5y1pyh8AY0R6lTyztQ== X-Received: by 2002:a05:6402:6c6:b0:46c:1326:e186 with SMTP id n6-20020a05640206c600b0046c1326e186mr20782205edy.228.1670403167210; Wed, 07 Dec 2022 00:52:47 -0800 (PST) Received: from noahgold-desk.lan (2603-8080-1301-76c6-feb7-1b9b-f2dd-08f7.res6.spectrum.com. [2603:8080:1301:76c6:feb7:1b9b:f2dd:8f7]) by smtp.gmail.com with ESMTPSA id k17-20020aa7c051000000b0046bd3b366f9sm1931767edo.32.2022.12.07.00.52.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 00:52:46 -0800 (PST) To: libc-alpha@sourceware.org Cc: goldstein.w.n@gmail.com, hjl.tools@gmail.com, andrey.kolesov@intel.com, carlos@systemhalted.org Subject: [PATCH v1 04/27] x86/fpu: Add file for common data used across svml_s_*_sse4.S files Date: Wed, 7 Dec 2022 00:52:13 -0800 Message-Id: <20221207085236.1424424-4-goldstein.w.n@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221207085236.1424424-1-goldstein.w.n@gmail.com> References: <20221207085236.1424424-1-goldstein.w.n@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Noah Goldstein via Libc-alpha From: Noah Goldstein Reply-To: Noah Goldstein Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" All rodata that is used by more than one implementation can be defined here to save .rodata size. At the moment definitions are only for the following implementations: atanf atanhf log log10f log2 tanf have been added. --- .../x86_64/fpu/svml_s_common_sse4_rodata.S | 27 +++++++++++++++++++ .../fpu/svml_s_common_sse4_rodata_offsets.h | 25 +++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 sysdeps/x86_64/fpu/svml_s_common_sse4_rodata.S create mode 100644 sysdeps/x86_64/fpu/svml_s_common_sse4_rodata_offsets.h diff --git a/sysdeps/x86_64/fpu/svml_s_common_sse4_rodata.S b/sysdeps/x86_64/fpu/svml_s_common_sse4_rodata.S new file mode 100644 index 0000000000..58337635fd --- /dev/null +++ b/sysdeps/x86_64/fpu/svml_s_common_sse4_rodata.S @@ -0,0 +1,27 @@ +#include "svml_s_common_sse4_rodata_offsets.h" + + .section .rodata.sse4, "a" + .align 16 + .globl COMMON_DATA_NAME + +COMMON_DATA_NAME: + /* Used By: atanf, atanhf, log10f, log2f, logf, tanf. */ + DATA_VEC(COMMON_DATA_NAME, _OneF, 0x3f800000) + /* Used By: atanhf, log10f, log2f, logf, tanf. */ + DATA_VEC(COMMON_DATA_NAME, _NotiOffExpoMask, 0xff800000) + /* Used By: atanhf, log10f, log2f, logf. */ + DATA_VEC(COMMON_DATA_NAME, _IBrkValue, 0x3f2aaaab) + /* Used By: log10f, log2f, logf. */ + DATA_VEC(COMMON_DATA_NAME, _ILoRange, 0x01000000) + /* Used By: atanhf, logf. */ + DATA_VEC(COMMON_DATA_NAME, _Neg5F, 0xbf000000) + /* Used By: atanhf, logf. */ + DATA_VEC(COMMON_DATA_NAME, _Ln2, 0x3f317218) + /* Used By: atanhf, tanf. */ + DATA_VEC(COMMON_DATA_NAME, _AbsMask, 0x7fffffff) + /* Used By: atanhf, tanf. */ + DATA_VEC(COMMON_DATA_NAME, _Neg4096, 0xfffff000) + + + .type COMMON_DATA_NAME, @object + .size COMMON_DATA_NAME, .-COMMON_DATA_NAME diff --git a/sysdeps/x86_64/fpu/svml_s_common_sse4_rodata_offsets.h b/sysdeps/x86_64/fpu/svml_s_common_sse4_rodata_offsets.h new file mode 100644 index 0000000000..8f985565d1 --- /dev/null +++ b/sysdeps/x86_64/fpu/svml_s_common_sse4_rodata_offsets.h @@ -0,0 +1,25 @@ +#ifndef _SVML_S_COMMON_SSE4_RODATA_OFFSETS_H +#define _SVML_S_COMMON_SSE4_RODATA_OFFSETS_H 1 + +#include "svml_common_data_macros.h.S" + +#define COMMON_DATA_NAME __svml_s_common_sse4_data + +#define _OneF 0 +#define _NotiOffExpoMask 16 +#define _IBrkValue 32 +#define _ILoRange 48 +#define _Neg5F 64 +#define _Ln2 80 +#define _AbsMask 96 +#define _Neg4096 112 + +#define COMMON_DATA(offset) ((offset) + (COMMON_DATA_NAME)) +#define DATA_VEC(data_name, offset, value) \ + float_vector16(data_name, offset, value) + +#ifdef LOCAL_DATA_NAME +# define LOCAL_DATA(offset) ((offset) + (LOCAL_DATA_NAME)) +#endif + +#endif