From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by sourceware.org (Postfix) with ESMTPS id 38F933858407 for ; Mon, 25 Oct 2021 03:12:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 38F933858407 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=xen0n.name Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xen0n.name Received: from ld50.lan (unknown [101.88.135.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id 0276B6012F; Mon, 25 Oct 2021 11:12:33 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=xen0n.name; s=mail; t=1635131554; bh=WYADc6reg6tFbebD6ckkvN7YuKlBCtuxhcFfsiEyNDk=; h=From:To:Cc:Subject:Date:From; b=olQlvjkwzzA2+PwzwZeRwZjAs3gOdaHI0DbkYQtII17yY9p1hmmj05poo4/+BgJMo YuCuZu//UIuQgZ6B0NZcl0W7Tlr2eWz/N4ZpjpsE7s8tCQs8TyWpiOlrqQZRbiteca PYsZMce0W1F4qcvoq3ir/mM8NM7Jy3P1LZlE4jhI= From: WANG Xuerui To: binutils@sourceware.org Cc: Chenghua Xu , liuzhensong , WANG Xuerui Subject: [PATCH 0/7] Assorted LoongArch fixes Date: Mon, 25 Oct 2021 11:11:56 +0800 Message-Id: <20211025031203.115721-1-i.swmail@xen0n.name> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Oct 2021 03:12:40 -0000 From: WANG Xuerui Hi everyone, Here's some tweaks and fixes that pushes LoongArch a little closer to other architectures, to hopefully reduce learning costs for newcomers. - The ubiquitous "ret" instruction is added as syntactic sugar for "jirl $zero, $ra, 0". - The starting address for .text is changed to 0x10000 which many other architectures use; the previous value is inherited from MIPS with no reason. - Syntax for jumps are slightly tweaked, primarily for making sure that multiple register operands always come in LSB-first order, for consistency. The patches have been brewing since August, and are used to build a whole Gentoo system without problem. I'll add support for disassembling known idioms (things like "andi $zero, $zero, 0" -> "nop") and syntactic sugars in a future series. WANG Xuerui (7): opcodes: LoongArch: explicitly define b{lt/gt/le/ge}z as syntactic sugars opcodes: LoongArch: move definition of jr to sugar section opcodes: LoongArch: sort loongarch_jmp_opcodes entries by opcodes opcodes: LoongArch: make all non-native jumps desugar to canonical b{gt/le}[u] forms opcodes: LoongArch: add "ret" instruction to reduce typing opcodes: LoongArch: make beq/bne's operand order "rd, rj" to be consistent with all others LoongArch: make .text start at 0x10000 ld/emulparams/elf64loongarch-defs.sh | 2 +- opcodes/loongarch-opc.c | 38 +++++++++++++--------------- 2 files changed, 18 insertions(+), 22 deletions(-) -- 2.33.1