Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1128022pxb; Sat, 17 Apr 2021 07:26:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBzxpvBmLq/9+wYALyfcE8DTRmTYF5jzXlOdU90n/erms7YjNdnckFJmfRETvmszHAjwNm X-Received: by 2002:a17:907:1b20:: with SMTP id mp32mr13410441ejc.495.1618669617570; Sat, 17 Apr 2021 07:26:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618669617; cv=none; d=google.com; s=arc-20160816; b=HJPj64H4W1c7l3CWI8WL6fTewM97WRb7AAWYx4e7ETyc78Ud3i6tE873RHYPJyQEx+ zS0qjvQDiSAY8sOjBcwuT1vLDX1maO5XaIaYtQ+++tRhRIeKC7o22e5aKOjk2bIctnXC CTjRP3SSKE6/k5L+nSBWMjJsNtsLvg3oQPbbllkoPuJb2p4/SUpmH76SJuBDcd+tv1Rp Vhtd8A9jv0nNzFf2VEay1vlyH1L+l8oRS4RwG03hVPB5zU+q6u8JsMoh7xDDjVctocaG RBZKiW8W6PCnmtgDbM0ECVMB9pNCG1Tu9k0zYfehuPhwq0CZYw1pfRUHIJmcxr7zKW++ uEGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3+RD4PGfvp8A2z71LoP4t3wAnw9CDL/WbCBC7uAAteM=; b=t6TAvx1flqbp1vzH/+x32OGddA7QM5dwGklqYjHqIiLXKzwZYFwRQDErAyRy8zY82U ITqteh8RLTsBW8zfKCJ2Izl8pizWUYweqru39sjxP97zE0qvXoxaIaJtiCEk29q2Jwzc jPQwsH4LH5T/sy05F/DyFBwIJp9aGe4u6Ov/NJYvU1m9S9WiMBEOOrtahGtTZFWdvkEb UtoFe28Qv9qN+KcI6SoEbQhuxhhbFk6uUC9obzIvWVBq62GEZJEFVW90NXPcRPFMU8kk pP065VJiSZEkF8M521OiIDZYyNvysLq6U6fyB4NPNgX7U75QzIDh0tbNvn3uT9FBRKhS rbhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=q0Jpc44K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x2si7504968ejy.213.2021.04.17.07.26.34; Sat, 17 Apr 2021 07:26:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=q0Jpc44K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236519AbhDQOZh (ORCPT + 99 others); Sat, 17 Apr 2021 10:25:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233008AbhDQOZh (ORCPT ); Sat, 17 Apr 2021 10:25:37 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F09DC061574; Sat, 17 Apr 2021 07:25:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=3+RD4PGfvp8A2z71LoP4t3wAnw9CDL/WbCBC7uAAteM=; b=q0Jpc44KVVFF5wX6/JAAU5kxZu yXVOh6sJ8baO4d1QLkuxerJe9tpswK0Z+Gmcbrs+jb8pA3hKS0hhOeBsegcbAk4VoXCL5drcj7Kzq y/NCWE5azoAkvlidNr2BhmNOd0di39Im9F3BqyZNv1HjmRXa3cbnaqE9sheo0Lqx0IamYsWUm0LBM XXhaxK8O9juCcU3bnori7s0KqqqJt8XS2YzhF4CV0vseBNW5STTmv+eSycrdFEm1aKzpUpUTYhnwC bG4lrQYqqHWJfck/eQrGAsFPANzPq5OOKGeAz4nmhwpOxOc7mheTqnT73JaSik1FjXdX4jWJ9Y9i7 QkjtlTLw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lXlsK-00BLUw-PW; Sat, 17 Apr 2021 14:24:48 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 8901E30015A; Sat, 17 Apr 2021 16:24:43 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6829523CC6F09; Sat, 17 Apr 2021 16:24:43 +0200 (CEST) Date: Sat, 17 Apr 2021 16:24:43 +0200 From: Peter Zijlstra To: Willy Tarreau Cc: Matthew Wilcox , Miguel Ojeda , Wedson Almeida Filho , Miguel Ojeda , Linus Torvalds , Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, Linux Kbuild mailing list , Linux Doc Mailing List , linux-kernel Subject: Re: [PATCH 00/13] [RFC] Rust support Message-ID: References: <20210416161444.GA10484@1wt.eu> <20210416180829.GO2531743@casper.infradead.org> <20210417114623.GA15120@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210417114623.GA15120@1wt.eu> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 17, 2021 at 01:46:23PM +0200, Willy Tarreau wrote: > For me the old trick of casting one side as long long still works: > > unsigned long long mul3264(unsigned int a, unsigned int b) > { > return (unsigned long long)a * b; > } > > i386: > 00000000 : > 0: 8b 44 24 08 mov 0x8(%esp),%eax > 4: f7 64 24 04 mull 0x4(%esp) > 8: c3 ret > > x86_64: > 0000000000000000 : > 0: 89 f8 mov %edi,%eax > 2: 89 f7 mov %esi,%edi > 4: 48 0f af c7 imul %rdi,%rax > 8: c3 retq > > Or maybe you had something else in mind ? Last time I tried it, the thing refused :/ which is how we ended up with mul_u32_u32() in asm.