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=-3.8 required=3.0 tests=BAYES_00, 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 656A7C64E7B for ; Thu, 19 Nov 2020 16:47:27 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A2FEA22227 for ; Thu, 19 Nov 2020 16:47:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2FEA22227 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-mips.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfn5h-0001Yd-BX for qemu-devel@archiver.kernel.org; Thu, 19 Nov 2020 11:47:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfn45-0000Bo-Tz for qemu-devel@nongnu.org; Thu, 19 Nov 2020 11:45:49 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:39110 helo=cvs.linux-mips.org) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfn42-00007X-D8 for qemu-devel@nongnu.org; Thu, 19 Nov 2020 11:45:43 -0500 Received: from localhost.localdomain ([127.0.0.1]:51136 "EHLO localhost" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23991915AbgKSQp33nVaE (ORCPT ); Thu, 19 Nov 2020 17:45:29 +0100 Date: Thu, 19 Nov 2020 16:45:29 +0000 (GMT) From: "Maciej W. Rozycki" To: =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= Subject: Re: [PATCH 3/4] default-configs: Support o32 ABI with 64-bit MIPS CPUs In-Reply-To: <20201119161710.1985083-4-f4bug@amsat.org> Message-ID: References: <20201119161710.1985083-1-f4bug@amsat.org> <20201119161710.1985083-4-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Received-SPF: none client-ip=148.251.95.138; envelope-from=macro@linux-mips.org; helo=cvs.linux-mips.org X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.399, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fredrik Noring , Mathieu Malaterre , Richard Henderson , qemu-devel@nongnu.org, Laurent Vivier , YunQiang Su , James Cowgill , David Daney , =?UTF-8?Q?J=C3=BCrgen_Urban?= , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Thu, 19 Nov 2020, Philippe Mathieu-Daudé wrote: > MIPS o32 ABI on 64-bit CPUs looks like a ILP32-on-64bit data > model, allowing 64-bit arithmetic and data movement instructions. > > This is the default ABI used by the "Sony Linux Toolkit for > Playstation 2". Please don't, not at least with a generic configuration (i.e. make it unambiguous that this is R5900-specific). This only works with R5900 because it does not implement the MIPS ISA correctly (e.g. see what $ra is set to with JAL/JALR/etc. in the kernel mode), and it is not supported by the standard Linux ABI. Use n32 instead, which has the same functionality and is standard (and is also a better ABI in terms of performance). You'd probably need to implement all the R5900 addressing quirks for your proposed hack to match hardware, or otherwise you'll end up with emulation that creates its own reality. Maciej