From patchwork Thu Oct 5 13:29:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 148693 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2016:b0:403:3b70:6f57 with SMTP id fe22csp298119vqb; Thu, 5 Oct 2023 06:30:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE038GUitIwO/M/8ysbAJm8dMVz97tbDDPQIrLDiClRMrxX+VF+tZSDaFDm7U8A3nnJhV58 X-Received: by 2002:aa7:d846:0:b0:533:12b1:ebe7 with SMTP id f6-20020aa7d846000000b0053312b1ebe7mr4964604eds.15.1696512623730; Thu, 05 Oct 2023 06:30:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696512623; cv=pass; d=google.com; s=arc-20160816; b=LAJT1p8oEGWRNEERTn8QCYdhRqBkycEXEm6hhw9cXmmt6dXq9WU+FyNKFRFSXe8oqI LbIFQKyliIGzFv2lF6VD3S34rdciAyFEJp4tXcqjuiMBg7ZpgwYR4n2PkzEPYrLE0qdv 4vO0dvTnSsHiWN44+T8K6p0qi1vr5FCTPcBA6o9HLQahY+eqaJRmxIDgtWEZuA7pvgeK mhxoqvWYGV1XsTRQuOYrYOqPNFAb3gl2ceQGBovxbFWWlsP/YFtSEV4q8rg6kVdNS1BO +TLPIjAT9m+04NsLGMsle+yZBlaifqwT2OiGjh/YQoddaEjy4zgTVOSJ7mZUp4l91Bzm mVYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :subject:from:to:content-language:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature:dmarc-filter:delivered-to; bh=9yy+t6OKRaPPBN2V0+pnMauZwWil8oK19OBqQIbNiT4=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=nYtuI2GED9f9toEt3JIt9hShjTfXO8i0S3PbPwES8H1tttvZI5+xLFGRcyVCCpS//K zNtSv95npCFWuL7Qo8Od1g1GbGZR/qcOB2tk3mMfOnEnufbHcdfN7c6lqQ+1VyyJBxcL QBLYnswyN7FGmZg8I8YyS4yaOAoDQP5KJ39XoIgyiiU0tpOtDTbwqnqT59IVExrZtB3K 7bacOcj0asg1Xh5SNALkOH8s7OV5kwaw2XUn9gR6zSeGmylxtvSENTFrvZRJPcuZRpzt L/QhRLwX52qoOel8Ja5NXMEzwZf4USjz73j9a5ZTCPPGIB77+x4tzdmizkztFDrp96aH 7yBw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gjlay.de header.s=strato-dkim-0002 header.b=prq6vxAk; dkim=neutral (no key) header.i=@gjlay.de; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id n17-20020aa7c451000000b005348e830e8esi771113edr.435.2023.10.05.06.30.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 06:30:23 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gjlay.de header.s=strato-dkim-0002 header.b=prq6vxAk; dkim=neutral (no key) header.i=@gjlay.de; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F09AA3830B49 for ; Thu, 5 Oct 2023 13:30:14 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.162]) by sourceware.org (Postfix) with ESMTPS id 5434C386190D for ; Thu, 5 Oct 2023 13:29:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5434C386190D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gjlay.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=gjlay.de ARC-Seal: i=1; a=rsa-sha256; t=1696512589; cv=none; d=strato.com; s=strato-dkim-0002; b=dnxGYUiCvCF5axFzKMurqLD3ahzijnLZb58jac38SkAyveYQI8zcZp0Q9jheI9G4DE wpFQgj3ml1sl1SjS2d8fWj4pb8I0C1frMLfAZu+4pjMT9CF45GTP08eRCuk1omDaE9pE ljJZfupWngEIH6A2Odyi9H5Uv6rmgY8s+SM3p8JNEfk3Fig/H4XzcTOzqNRvAIz14f5X ht9VCGtkIldAocSnnLpJ3XqU2ZM6/AaB4fdrUn1jpabAa95tuoA+m7TgKYsunubX9u1o phFMF7YNydOmjglMqJcOyoe424kKco5n+AEU+7UNWJFdM2a2+v9g7G1omo2HNGclznR0 INDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696512589; s=strato-dkim-0002; d=strato.com; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=9yy+t6OKRaPPBN2V0+pnMauZwWil8oK19OBqQIbNiT4=; b=p93U60zljy9iDerEpg94+a3SRO1yBBfGfgEpxerMxeUrXlURVKaxe1vmChoucN6dSt Imam7tmnH4Jne5wo/r0mykPN4G/VQX7mKcU3szDo1byRb3FzN5u1B1qNcVVoJ6pRvjis fNm+KYenK0sroiT+wWGv+ks5/q0Y1HhF8eKWMocDpAs7QgtYPyv4gVFuqss0LjPzdntk 1GZkqhgrCjfHIlEgOIdorQQe2NETAqG6gFsV5r8Zx0zfiBxeVbAuMQlZ/zIV7B9YOrTm 5YH/cL1ZkEByEL/iiB5hxGfbWG196XLsMF+LNXQEQ6McfrJtf5YnMDERLMSjoMHEFfWO kOJA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696512589; s=strato-dkim-0002; d=gjlay.de; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=9yy+t6OKRaPPBN2V0+pnMauZwWil8oK19OBqQIbNiT4=; b=prq6vxAkQ/ldez+Of832DZcD/prGv9iML9EYs+TCFtIP75a50t7ddqaMrmtoPEUyBW V2aWyUeosTFO9FIX2TDtld197wzWtbUCLmoVXHTo7xd3X0AJFPrltEGzU2oIWqRyZQG3 jkcuBtmBJ3M8nticSwNpgsRLyfa/4x1GS8uuhZJ4YaK0HFGFhCfyELbasbQXP5bTjfQA DHS1Z/FDEb/xjsXMbs5fX5mJrEgj03IZNTDUWWsDwRupXXh1eGV0efb+RNSMC0+ZT4Nq jLJZTkM0tdCwIgY/ppW8jIk91THNHjpfwBxSYdexmv8wlnQHrkND/8JZHxX458EzcUXQ X+AQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696512589; s=strato-dkim-0003; d=gjlay.de; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=9yy+t6OKRaPPBN2V0+pnMauZwWil8oK19OBqQIbNiT4=; b=LmRBDjP/H1HY9dTsUW37j8Wi3GK0+U29d+IIQ/kD4t+57OwuupkIDwMSbaxCdTB2SQ cLz6P5eVy1ZAo7JX5nAQ== X-RZG-AUTH: ":LXoWVUeid/7A29J/hMvvT3koxZnKT7Qq0xotTetVnKkRmM69o2y+Liq3MepKTA==" Received: from [192.168.2.102] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id a0474az95DTnigL (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Thu, 5 Oct 2023 15:29:49 +0200 (CEST) Message-ID: <8cf641ba-1d7d-7daa-3da2-4a9bf5b8a909@gjlay.de> Date: Thu, 5 Oct 2023 15:29:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Content-Language: en-US To: gcc-patches@gcc.gnu.org From: Georg-Johann Lay Subject: [avr,committed] Remove all uses of attribute pure from LibF7. X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778922420987082076 X-GMAIL-MSGID: 1778922420987082076 Applied the following patch. Johann LibF7: Remove uses of attribute pure. libgcc/config/avr/libf7/ * libf7.h (F7_PURE): Remove all occurrences. * libf7.c: Same. extern void f7_addsub (f7_t*, const f7_t*, const f7_t*, bool neg_b); extern void f7_madd_msub (f7_t*, const f7_t*, const f7_t*, const f7_t*, bool); extern void f7_madd (f7_t*, const f7_t*, const f7_t*, const f7_t*); diff --git a/libgcc/config/avr/libf7/libf7.c b/libgcc/config/avr/libf7/libf7.c index 373a8a55d90..0d9e4c325b2 100644 --- a/libgcc/config/avr/libf7/libf7.c +++ b/libgcc/config/avr/libf7/libf7.c @@ -352,7 +352,7 @@ float f7_get_float (const f7_t *aa) return make_float (mant); } -F7_PURE ALIAS (f7_get_float, f7_truncdfsf2) +ALIAS (f7_get_float, f7_truncdfsf2) #endif // F7MOD_get_float_ #define DBL_DIG_EXP 11 @@ -572,7 +572,7 @@ int32_t f7_get_s32 (const f7_t *aa) extern int32_t to_s32 (const f7_t*, uint8_t) F7ASM(f7_to_integer_asm); return to_s32 (aa, 0x1f); } -F7_PURE ALIAS (f7_get_s32, f7_fixdfsi) +ALIAS (f7_get_s32, f7_fixdfsi) #endif // F7MOD_get_s32_ @@ -583,7 +583,7 @@ F7_PURE ALIAS (f7_get_s32, f7_fixdfsi) extern int64_t to_s64 (const f7_t*, uint8_t) F7ASM(f7_to_integer_asm); return to_s64 (aa, 0x3f); } -F7_PURE ALIAS (f7_get_s64, f7_fixdfdi) +ALIAS (f7_get_s64, f7_fixdfdi) #endif // F7MOD_get_s64_ #ifdef F7MOD_get_u16_ @@ -603,7 +603,7 @@ uint32_t f7_get_u32 (const f7_t *aa) extern uint32_t to_u32 (const f7_t*, uint8_t) F7ASM(f7_to_unsigned_asm); return to_u32 (aa, 0x1f); } -F7_PURE ALIAS (f7_get_u32, f7_fixunsdfsi) +ALIAS (f7_get_u32, f7_fixunsdfsi) #endif // F7MOD_get_u32_ @@ -614,7 +614,7 @@ uint64_t f7_get_u64 (const f7_t *aa) extern int64_t to_u64 (const f7_t*, uint8_t) F7ASM(f7_to_unsigned_asm); return to_u64 (aa, 0x3f); } -F7_PURE ALIAS (f7_get_u64, f7_fixunsdfdi) +ALIAS (f7_get_u64, f7_fixunsdfdi) #endif // F7MOD_get_u64_ diff --git a/libgcc/config/avr/libf7/libf7.h b/libgcc/config/avr/libf7/libf7.h index 3f81b5f1f88..f692854dced 100644 --- a/libgcc/config/avr/libf7/libf7.h +++ b/libgcc/config/avr/libf7/libf7.h @@ -36,7 +36,7 @@ -- Inline asm -- Setting assembler names by means of __asm (GNU-C). -- Attributes: alias, always_inline, const, noinline, unused, - progmem, pure, weak, warning + progmem, weak, warning -- GCC built-ins: __builtin_abort, __builtin_constant_p -- AVR built-ins: __builtin_avr_bitsr, __builtin_avr_rbits */ @@ -112,7 +112,6 @@ extern "C" { #define F7_INLINE inline __attribute__((__always_inline__)) #define F7_NOINLINE __attribute__((__noinline__)) #define F7_WEAK __attribute__((__weak__)) -#define F7_PURE __attribute__((__pure__)) #define F7_UNUSED __attribute__((__unused__)) #define F7_CONST __attribute__((__const__)) @@ -150,7 +149,7 @@ typedef uint64_t f7_double_t; #define F7_MANT_HI2(X) \ (*(uint16_t*) & (X)->mant[F7_MANT_BYTES - 2]) -static F7_INLINE F7_PURE +static F7_INLINE uint8_t f7_classify (const f7_t *aa) { extern void f7_classify_asm (void); @@ -361,14 +360,14 @@ f7_t* f7_abs (f7_t *cc, const f7_t *aa) } -F7_PURE extern int8_t f7_cmp (const f7_t*, const f7_t*); -F7_PURE extern bool f7_lt_impl (const f7_t*, const f7_t*); -F7_PURE extern bool f7_le_impl (const f7_t*, const f7_t*); -F7_PURE extern bool f7_gt_impl (const f7_t*, const f7_t*); -F7_PURE extern bool f7_ge_impl (const f7_t*, const f7_t*); -F7_PURE extern bool f7_ne_impl (const f7_t*, const f7_t*); -F7_PURE extern bool f7_eq_impl (const f7_t*, const f7_t*); -F7_PURE extern bool f7_unord_impl (const f7_t*, const f7_t*); +extern int8_t f7_cmp (const f7_t*, const f7_t*); +extern bool f7_lt_impl (const f7_t*, const f7_t*); +extern bool f7_le_impl (const f7_t*, const f7_t*); +extern bool f7_gt_impl (const f7_t*, const f7_t*); +extern bool f7_ge_impl (const f7_t*, const f7_t*); +extern bool f7_ne_impl (const f7_t*, const f7_t*); +extern bool f7_eq_impl (const f7_t*, const f7_t*); +extern bool f7_unord_impl (const f7_t*, const f7_t*); static F7_INLINE bool f7_lt (const f7_t *aa, const f7_t *bb) @@ -541,14 +540,14 @@ extern f7_t* f7_set_u32 (f7_t*, uint32_t); extern void f7_set_float (f7_t*, float); extern void f7_set_pdouble (f7_t*, const f7_double_t*); -F7_PURE extern int16_t f7_get_s16 (const f7_t*); -F7_PURE extern int32_t f7_get_s32 (const f7_t*); -F7_PURE extern int64_t f7_get_s64 (const f7_t*); -F7_PURE extern uint16_t f7_get_u16 (const f7_t*); -F7_PURE extern uint32_t f7_get_u32 (const f7_t*); -F7_PURE extern uint64_t f7_get_u64 (const f7_t*); -F7_PURE extern float f7_get_float (const f7_t*); -F7_PURE extern f7_double_t f7_get_double (const f7_t*); +extern int16_t f7_get_s16 (const f7_t*); +extern int32_t f7_get_s32 (const f7_t*); +extern int64_t f7_get_s64 (const f7_t*); +extern uint16_t f7_get_u16 (const f7_t*); +extern uint32_t f7_get_u32 (const f7_t*); +extern uint64_t f7_get_u64 (const f7_t*); +extern float f7_get_float (const f7_t*); +extern f7_double_t f7_get_double (const f7_t*); #if USE_LPM == 1 #define F7_PGMSPACE __attribute__((__progmem__)) @@ -639,10 +638,10 @@ extern void f7_horner (f7_t*, const f7_t*, uint8_t, const f7_t *coeff, f7_t*); extern void f7_mul_noround (f7_t*, const f7_t*, const f7_t*); extern void f7_clr_mant_lsbs (f7_t*, const f7_t*, uint8_t) F7ASM(f7_clr_mant_lsbs_asm); -F7_PURE extern int8_t f7_cmp_unordered (const f7_t*, const f7_t*, bool); -F7_PURE extern int8_t f7_cmp_abs (const f7_t*, const f7_t*); +extern int8_t f7_cmp_unordered (const f7_t*, const f7_t*, bool); +extern int8_t f7_cmp_abs (const f7_t*, const f7_t*); -F7_PURE extern bool f7_abscmp_msb_ge (const f7_t*, uint8_t msb, int16_t expo); +extern bool f7_abscmp_msb_ge (const f7_t*, uint8_t msb, int16_t expo);