From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F47FC43462 for ; Sat, 17 Apr 2021 14:25:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D11960FDA for ; Sat, 17 Apr 2021 14:25:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236501AbhDQOZi (ORCPT ); Sat, 17 Apr 2021 10:25:38 -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.