| Message ID | 20251202111745.1558349-1-mengqinggang@loongson.cn |
|---|---|
| Headers |
Return-Path: <binutils-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6CB1E4C3185E for <patchwork@sourceware.org>; Tue, 2 Dec 2025 11:21:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CB1E4C3185E X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id 891334BB3BB9 for <binutils@sourceware.org>; Tue, 2 Dec 2025 11:21:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 891334BB3BB9 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 891334BB3BB9 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=114.242.206.163 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764674466; cv=none; b=EhKS+N/i4dyukCFKFr/4IYxg4hXA/rAh1usxsligg+YZHe/t+PnkVdHWqu3Ij2ecGfa2/+xYpooweLu8Vlt15p1F5OQ96AovdRCxxWSkoxLVWuKLE/U1RaPKvC/aZhZzFLQM9UmPwR5XLRZ8S7F+W2YGMu+fHTZPphkSuvkfofo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764674466; c=relaxed/simple; bh=5AhyThshRLU1aQUz849mSc98hh+TG79acmoR1adhtxA=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=GIcVybyOe+gvttbgNVaqM4ymEWlBex38azzdN+tgAhudaQFpL+h/B1IKvWZcWLLYYuuAC5jkTOnQGLYwielnfDU8l925MhW1kCs/LN9rp1NY/LxHxvVRhd8cPV/A5aJ0r+t7/R1e2KTrajMPuEIPWSF5SieMx5VMPvuu/CLg4WQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 891334BB3BB9 Received: from loongson.cn (unknown [10.2.6.7]) by gateway (Coremail) with SMTP id _____8AxTNKWyy5p8UgqAA--.20381S3; Tue, 02 Dec 2025 19:20:55 +0800 (CST) Received: from amd9754.. (unknown [10.2.6.7]) by front1 (Coremail) with SMTP id qMiowJAxE+STyy5pZXxEAQ--.55545S2; Tue, 02 Dec 2025 19:20:52 +0800 (CST) From: mengqinggang <mengqinggang@loongson.cn> To: binutils@sourceware.org Cc: xuchenghua@loongson.cn, chenglulu@loongson.cn, cailulu@loongson.cn, xry111@xry111.site, i.swmail@xen0n.name, maskray@google.com, luweining@loongson.cn, hejinyang@loongson.cn, c@jia.je, mengqinggang@loongson.cn Subject: [PATCH v2 00/12] Add support for LoongArch32 Date: Tue, 2 Dec 2025 19:17:33 +0800 Message-Id: <20251202111745.1558349-1-mengqinggang@loongson.cn> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: qMiowJAxE+STyy5pZXxEAQ--.55545S2 X-CM-SenderInfo: 5phqw15lqjwttqj6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx nUUI43ZEXa7xR_UUUUUUUUU== X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
Add support for LoongArch32
|
|
Message
mengqinggang
Dec. 2, 2025, 11:17 a.m. UTC
Add support for LoongArch32 (LA32) and LoongArch32 Reduced (LA32R).
Add some new relocations for LA32 and LA32R.
A LA32 linux system based on qemu-user is here[1].
The gcc and glibc sources is here[2] [3].
The discussion about relocations is here[4].
[1] https://github.com/sunhaiyong1978/CLFS-for-LoongArch32/blob/main/Qemu_For_LoongArch32-Simple.md
[2] https://github.com/cloudspurs/gcc/tree/la32
[3] https://github.com/cloudspurs/glibc/tree/la32
[4] https://github.com/loongson/la-abi-specs/pull/16
v1 -> v2:
- Add some new relocations for LA32 and LA32R.
- Add tls type transition and got relaxation.
v1: https://sourceware.org/pipermail/binutils/2025-June/141697.html
Jiajie Chen (1):
LoongArch: Change DWARF2_CIE_DATA_ALIGNMENT to -4 for loongarch32
Lulu Cai (1):
LoongArch32: Fixed several regression test failures in gas and ld
mengqinggang (10):
LoongArch: Enable loongarch_elf64_vec loongarch64_pei_vec on LA32
target
LoongArch: Add R_LARCH_TLS_LE_ADD_R relocation support for add.w
LoongArch: Enable all instructions defaultly on LA32/LA64
LoongArch: Add LA32 and LA32R relocations
LoongArch: Add processing for LA32/LA32R relocations
LoongArch: LA32 macros support
LoongArch: LA32R macros expand
LoongArch: Add linker relaxation support for R_LARCH_CALL30
LoongArch: Add support for tls type transition on LA32
LoongArch: Add linker relaxation for got_pcadd_hi20 and got_pcadd_lo12
bfd/bfd-in2.h | 13 +
bfd/config.bfd | 2 +-
bfd/elfnn-loongarch.c | 550 +++++++++++++++---
bfd/elfxx-loongarch.c | 229 ++++++++
bfd/libbfd.h | 13 +
bfd/reloc.c | 27 +
gas/config/tc-loongarch.c | 172 ++++--
gas/config/tc-loongarch.h | 3 +-
gas/testsuite/gas/loongarch/macro_op_32.d | 72 ++-
include/elf/loongarch.h | 35 ++
include/opcode/loongarch.h | 4 +
ld/testsuite/ld-loongarch-elf/disas-jirl-32.d | 14 +-
ld/testsuite/ld-loongarch-elf/macro_op_32.d | 72 ++-
ld/testsuite/ld-loongarch-elf/pic.exp | 4 +-
opcodes/loongarch-opc.c | 42 +-
15 files changed, 1033 insertions(+), 219 deletions(-)