From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39032 invoked by alias); 5 Sep 2019 11:43:11 -0000 Mailing-List: contact dwz-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: dwz-owner@sourceware.org Received: (qmail 38974 invoked by uid 48); 5 Sep 2019 11:43:07 -0000 From: "marxin.liska at gmail dot com" To: dwz@sourceware.org Subject: [Bug default/24965] [dwz] Faster hashing using native insns Date: Tue, 01 Jan 2019 00:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: dwz X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: marxin.liska at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: nobody at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2019-q3/txt/msg00103.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D24965 --- Comment #5 from Martin Li=C5=A1ka --- (In reply to Jakub Jelinek from comment #4) > This looks wrong to me. It will fail to compile on non-x86, fail to run = on > x86 on older hw, and it is unclear why an option is needed. Sure, it should be conditional for x86_64. > It needs to be > guarded with preprocessor autoconf macros on whether the insns are availa= ble > (assembler handles them) and runtime check whether it can be used or not. > Formatting glitches too (missing space before ( ). And the detection should be run-time, so we can use target_clone attribute: __attribute__((target_clones ("default", "sse42"))) or set guard at the sta= rt up: #include ... guard =3D ((__cpu_model.__cpu_features[0] & (1 << FEATURE_AVX4_2)) which would be faster as we'll not use indirect calls. --=20 You are receiving this mail because: You are on the CC list for the bug.