From owner-freebsd-hackers@freebsd.org Sat Mar 17 18:39:01 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CBB4F5F830 for ; Sat, 17 Mar 2018 18:39:01 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B87D968F16 for ; Sat, 17 Mar 2018 18:39:00 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x22c.google.com with SMTP id y203so9095482ywg.5 for ; Sat, 17 Mar 2018 11:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=R7X7stRJ0nRP7RJMh7y/TypjYiKbQG/AMS8UZznRff0=; b=fRAi2no3mRJYztAZ15JCGAf4sSr52r+Ovj4koUEfr34hRVzUKiIv6Ukpl/Mch8pbkL pNA2nGndOaEov3Zl0jWUKbpwwdaqnO9OJPx3CI1m31b7xPYX6j3R6UV0VqdUCQh6osGg CgwaZcTg4RPzP1iNJWHPBoepxmeohLj0w5D9Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=R7X7stRJ0nRP7RJMh7y/TypjYiKbQG/AMS8UZznRff0=; b=kh6hC0NCJYycdhVzkKR3GP/H0msMri4QRM5RLGYKh1kbgjCvSA2RxLjuy5K1/Jcjdb 5laZN5+1BVp1leo8VnX1xTlFZfFU4GuSKQSaH+TQPm6bAVozmdTvRHIwr4sYsuZ5iUiC 0+7IX7WY7yiZw+Z2ijzoYcj7/xATpKwkFBijv2QrPOb3AaibbYaMLtYEdkAvGfJF4u/y XCgWSiBUAmc29VLe6cznZmQeTuW0gzEo+xPFZzOmd/WhE8rl12uWA+CMEpQhnKL49Hrh 4ExW3nhPYzc9Rs70jwNcd1/TcDr9lZIYuWRI0GqbdMFwoAvdLzbq+malQ2mnvjKd+iKi JLtA== X-Gm-Message-State: AElRT7GbDncuYnsoG8mK1eF90o61SPfJYXVDe4AbKYvOsYuuLOa+hC7F Z6uqC3EpoysowyLUzf4GKnM1MS6hKNK8n5FbOn2pFp0J X-Google-Smtp-Source: AG47ELunc9nNHqHm0ts8qMzmZ/51v/L6lSrS7EBrvLh+6YkUWULd6kaBEH+kOzF42RIblW/sI2W4gUGyE8/PGYqLq8M= X-Received: by 10.129.114.6 with SMTP id n6mr38932ywc.113.1521311940017; Sat, 17 Mar 2018 11:39:00 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Sat, 17 Mar 2018 11:38:29 -0700 (PDT) In-Reply-To: <20180317173815.GM75576@funkthat.com> References: <20180317173815.GM75576@funkthat.com> From: Eitan Adler Date: Sat, 17 Mar 2018 11:38:29 -0700 Message-ID: Subject: Re: gf128_add can be marked as __pure2 To: Eitan Adler , John Baldwin , FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 18:39:01 -0000 On 17 March 2018 at 10:38, John-Mark Gurney wrote: > Eitan Adler wrote this message on Mon, Feb 19, 2018 at 19:15 -0800: >> Is there any reason not to apply this patch? > > I don't see why there wouldn't be.. > >> __pure2 means __attribute__((const)) which is correct in this case as >> gf128_add read no global memory: > > Are these documented some where? Looksl ike __pure2 was created instead > of using __pure for some reason... I wish these things were documented > properly so others could know the correct usage... I don't know where the FreeBSD macros are documented (they are implementedi cdefs.h). https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes documents the attributes __pure2 is const __pure is pure -- Eitan Adler