From owner-svn-src-projects@freebsd.org Sun Aug 2 20:50:20 2020 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F83F3A705A for ; Sun, 2 Aug 2020 20:50:20 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BKY7G41Fjz3gQ6 for ; Sun, 2 Aug 2020 20:50:18 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f50.google.com with SMTP id f18so32381961wrs.0 for ; Sun, 02 Aug 2020 13:50:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=lxTQJeuxq2YIGXixwGu4lU55Bkd+SlSBc9ZRmnntkqI=; b=ewoeu8tLlYGzcS1O6CFFLnDUXGmGwU1JA9gr0QDRC/2g59XGOSpjuPJfVZ5X2YzvGS lusO9UOd+B9rFeLhKxUatJYQ7+5CCVwpaP75nm16iG69rMRdHSeH+FQseaWEpVxAveFL 3gMw7wlHs/CNnO39pCg/o8caTeqfwFHoFZJEGDssRGiv7CueAzCnQyrPKSpJTV7P2qXS mMfk5hmhTeP2vjw72UCwxzmDYUw/lgXjQsT2aEO9WI4IpewMa6k6YHZdjTQ8qCWGlNsB k3A3gqSo03HRIgmf3pZeIEgEgKBTf0C92FHJKCsX6PYWO/iHuTpxSgXI9klftG1DInjR Yu2A== X-Gm-Message-State: AOAM533CMpSplX9sPtXAB4GymQNHx56j/r6Der727qaLGizYV9KHRkZC H4gAQIxZRtrp04VVdR849PYMIA== X-Google-Smtp-Source: ABdhPJwMyoBq24QwdGH0ssc3zBNGaUIfax2Pjz+GfixRlsChOZTnQlYO4EfBdoVXWL81FEDKrNZRtw== X-Received: by 2002:adf:e550:: with SMTP id z16mr12201167wrm.329.1596401416876; Sun, 02 Aug 2020 13:50:16 -0700 (PDT) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id b129sm19949209wmb.29.2020.08.02.13.50.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Aug 2020 13:50:16 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r363773 - projects/clang1100-import/contrib/llvm-project/compiler-rt/lib/builtins From: Jessica Clarke In-Reply-To: <202008021807.072I7GM9059504@repo.freebsd.org> Date: Sun, 2 Aug 2020 21:50:15 +0100 Cc: src-committers , svn-src-projects@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <5D6813EB-F270-412D-8C15-8A05CB6353DE@freebsd.org> References: <202008021807.072I7GM9059504@repo.freebsd.org> To: Dimitry Andric X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 4BKY7G41Fjz3gQ6 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.50 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-1.95 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-projects@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.95)[-0.947]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.60)[-0.603]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.50:from]; NEURAL_HAM_MEDIUM(-0.90)[-0.896]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.50:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2020 20:50:20 -0000 On 2 Aug 2020, at 19:07, Dimitry Andric wrote: > > Author: dim > Date: Sun Aug 2 18:07:16 2020 > New Revision: 363773 > URL: https://svnweb.freebsd.org/changeset/base/363773 > > Log: > Reapply r230021, r276851 and a few other commits to compiler-rt > > Reapply r230021 (by ed): > > Add a workaround to prevent endless recursion in compiler-rt. > > SPARC and MIPS CPUs don't have special instructions to count > leading/trailing zeroes. The compiler-rt library provides fallback > rountines for these. The 64-bit routines, __clzdi2 and __ctzdi2, are > implemented as simple wrappers around the compiler built-in > __builtin_clz(), assuming these will expand to either 32-bit > CPU instructions or calls to __clzsi2 and __ctzsi2. > > Unfortunately, our GCC 4.2 probably thinks that because the operand is > stored in a 64-bit register, it might just be a better idea to invoke > its 64-bit equivalent, simply resulting into endless recursion. Fix this > by defining __builtin_clz and __builtin_ctz to __clzsi2 and __ctzsi2 > explicitly. > > Reapply r276851: > > Update compiler-rt to trunk r224034. This brings a number of new > builtins, and also the various sanitizers. Support for these will be > added in a later commit. Are you sure this is still necessary? https://reviews.llvm.org/D42902 (which landed in in 2018 for 7.0.0, way after the original r230021 in 2012) followed by a follow-up commit for the correct SPARC macro, fixed this in an OS-independent way upstream, but inside c?zdi2.c themselves so you won't notice a merge conflict. Jess