From patchwork Tue Jan 23 13:00:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lulu Cai X-Patchwork-Id: 190901 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp313435dyi; Tue, 23 Jan 2024 05:01:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBr6p65lBCA0964r6nbOEGrkOwGCkAe6toCaFelQJJuHBBm4oBDdwfS/0Co5+oAXBR8iqE X-Received: by 2002:a05:6214:d82:b0:681:73b8:5c28 with SMTP id e2-20020a0562140d8200b0068173b85c28mr745979qve.76.1706014862700; Tue, 23 Jan 2024 05:01:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706014862; cv=pass; d=google.com; s=arc-20160816; b=kXEYqMzQNumcObzntWThTaHxja365liSJwzQcTMVIpgYEF6iDJhsnFdtTdIU+h4sWN GBUBK4T0PuuihEPS/3QtXsYAKBkClSZ67iJgPcxyk96rmn/BLR6jtEAb19BCfiAocCfN COzFkBaDDa56OKq5XVEwVEzkq1OxqySKkU8QCCosMoHF7xRAaDnDf5LcBcMu7LVYUCVk s0ufHFg5Jp31uh5q8nxve7XJuRrkHugh0HgsVZ6mj6Qlk/sEaqgqxH5p0zoXzQkSn3aI rxFM5KZ53vABzYScrxRpvJiKlJHjCllXer14rGcNXsmdQHpEMWFcD4yUQt+sWAP3nrHW Pt/w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:arc-filter :dmarc-filter:delivered-to; bh=VDIFYLhLCX7g3xXdk6fvDwoLd1DjYcUqoN9afH2Nxo8=; fh=FvlVQEmCpm5H8oBXQswexzCupeeQXnbssobXN+3R2Wg=; b=EhMPDMjfW90T0LIdphqz5GBRtN706ng2ZrPEvM4e/TlxEVqACkhLR4RyD5jghsp4Mu vLCUFY2pn8UtSk6S6O+P4LGJclHKxnxyqpNdB1KpGG8SfdmYAldz8pYLiqY6Ab3SzMA6 /p24n1JDtqy7OgiXX1CzRo2t0Pwr1QHgHbVhDU2hCdxS3HOyXEgeCbvon+Qa7CxvVJvl igLo/QVCtXehOLc2UYrel6GzqIvos/d07ZQ44bqEnbHmEDf+xpbiKjM+UxHjHWP6mfJE l6gzHxzfJF7soV/y2MEXM9W0MbJ2JaVuUmHDdBfKqSsJB62rWEGfkalF7u5gCsQsteM0 tuqQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id x7-20020a0cda07000000b006818b4efa56si7729049qvj.140.2024.01.23.05.01.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 05:01:02 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 64F4E385803E for ; Tue, 23 Jan 2024 13:00:55 +0000 (GMT) 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 059913858409 for ; Tue, 23 Jan 2024 13:00:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 059913858409 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 059913858409 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=1706014845; cv=none; b=QEJsYiJPODpx1qYomLaQDUVtbho5eF1Xga+FSgLgijEok2QsjSjAgEGEx4XIE4x6+whTGKDBp+mHCLGNW5CqgZuV4GJe/e0qHQ4XafBaFhOzwinU73D7BXopyF9P9raQao9VHgzHqkSbR5Z8dC1agnbInHguS2/i5wR7pOil6zc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706014845; c=relaxed/simple; bh=myJnFyr+aJfht64LTYBjxtdx6Av1i2l/DT7JwrP4Zyk=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=i8/Q+2jqFONjA7OTq1kHWnkkV9iD1khaQgQpARUzMX+oII33pqooK3Hbp5QTQqNZUGqA3vMBBnDuN+ZFO3PhSUjQXR386PQub4VVRUJJ04dZyqxTHeNJGQN2bWTk3qeji7RnMARbWGnXGI9HpIOI644TUqwLUozBq1RyjDKZHG4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from loongson.cn (unknown [10.2.6.5]) by gateway (Coremail) with SMTP id _____8DxvutzuK9lgScEAA--.16527S3; Tue, 23 Jan 2024 21:00:35 +0800 (CST) Received: from 5.5.5 (unknown [10.2.6.5]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxXs1yuK9l324UAA--.22465S4; Tue, 23 Jan 2024 21:00:35 +0800 (CST) From: Lulu Cai To: binutils@sourceware.org Cc: xuchenghua@loongson.cn, chenglulu@loongson.cn, liuzhensong@loongson.cn, mengqinggang@loongson.cn, xry111@xry111.site, i.swmail@xen0n.name, maskray@google.com, luweining@loongson.cn, wanglei@loongson.cn, hejinyang@loongson.cn, Lulu Cai Subject: [PATCH] LoongArch: Fix the issue of excessive relocation generated by IE Date: Tue, 23 Jan 2024 21:00:29 +0800 Message-Id: <20240123130029.2100848-1-cailulu@loongson.cn> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8BxXs1yuK9l324UAA--.22465S4 X-CM-SenderInfo: xfdlz3tox6z05rqj20fqof0/1tbiAQAFB2WuJ2AEbAAYs- X-Coremail-Antispam: 1Uk129KBj9fXoWfJr13XrW7XF1kuF13Aw13trc_yoW8JFW8Ko WrZasYywn3KF97ZryFyay7JFyfZr48KrWUArZ3Cw47GayDWFZxA3s3C3Wjk34Iqry0y3Wk u34DJ3Z7ZFy7GF1Dl-sFpf9Il3svdjkaLaAFLSUrUUUUbb8apTn2vfkv8UJUUUU8wcxFpf 9Il3svdxBIdaVrn0xqx4xG64xvF2IEw4CE5I8CrVC2j2Jv73VFW2AGmfu7bjvjm3AaLaJ3 UjIYCTnIWjp_UUUY17kC6x804xWl14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI 8IcIk0rVWrJVCq3wAFIxvE14AKwVWUGVWUXwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xG Y2AK021l84ACjcxK6xIIjxv20xvE14v26r4j6ryUM28EF7xvwVC0I7IYx2IY6xkF7I0E14 v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAF wI0_Gr1j6F4UJwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI 0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUGVWUXwAv7VC2z280 aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28Icx kI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2Iq xVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42 IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY 6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aV CY1x0267AKxVWUJVW8JbIYCTnIWIevJa73UjIFyTuYvjxUzZ2-UUUUU X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_STOCKGEN, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788886240578258389 X-GMAIL-MSGID: 1788886240578258389 Currently, whether GD and IE generate dynamic repositioning is determined by SYMBOL_REFERENCES_LOCAL and bfd_link_executable. This results in dynamic relocations still being generated in some situations where dynamic relocations are not necessary (such as the undefined weak symbol in static links). We use RLARCH_TLS_GD_IE_NEED_DYN_RELOC macros to determine whether GD/IE needs dynamic relocation. If GD/IE requires dynamic relocation, set need_reloc/need_relocs to true and indx to be a dynamic index. At the same time, some test cases were modified to use regular expression matching instead of complete disassembly matching. --- bfd/elfnn-loongarch.c | 154 +++++++++++--------- ld/testsuite/ld-loongarch-elf/desc-ie.d | 14 +- ld/testsuite/ld-loongarch-elf/desc-le.d | 10 +- ld/testsuite/ld-loongarch-elf/tlsdesc-dso.d | 88 +++++------ 4 files changed, 140 insertions(+), 126 deletions(-) diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c index b2caa5fc3e1..b727c933e13 100644 --- a/bfd/elfnn-loongarch.c +++ b/bfd/elfnn-loongarch.c @@ -155,6 +155,27 @@ struct loongarch_elf_link_hash_table ((R_TYPE) == R_LARCH_TLS_IE_PC_HI20 \ || (R_TYPE) == R_LARCH_TLS_IE_PC_LO12) +/* If TLS GD/IE need dynamic relocations, INDX will be the dynamic indx, + and set NEED_RELOC to true used in allocate_dynrelocs and + loongarch_elf_relocate_section for TLS GD/IE. */ +#define LARCH_TLS_GD_IE_NEED_DYN_RELOC(INFO, DYN, H, INDX, NEED_RELOC) \ + do \ + { \ + if ((H) != NULL \ + && (H)->dynindx != -1 \ + && WILL_CALL_FINISH_DYNAMIC_SYMBOL ((DYN), \ + bfd_link_pic (INFO), (H))) \ + (INDX) = (H)->dynindx; \ + if (((H) == NULL \ + || ELF_ST_VISIBILITY ((H)->other) == STV_DEFAULT \ + || (H)->root.type != bfd_link_hash_undefweak) \ + && (!bfd_link_executable (INFO) \ + || (INDX) != 0)) \ + (NEED_RELOC) = true; \ + } \ + while (0) + + /* Generate a PLT header. */ static bool @@ -1263,40 +1284,24 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) h->got.offset = s->size; if (tls_type & (GOT_TLS_GD | GOT_TLS_IE | GOT_TLS_GDESC)) { + int indx = 0; + bool need_reloc = false; + LARCH_TLS_GD_IE_NEED_DYN_RELOC (info, dyn, h, indx, + need_reloc); /* TLS_GD needs two dynamic relocs and two GOT slots. */ if (tls_type & GOT_TLS_GD) { s->size += 2 * GOT_ENTRY_SIZE; - if (bfd_link_executable (info)) - { - /* Link exe and not defined local. */ - if (!SYMBOL_REFERENCES_LOCAL (info, h)) - htab->elf.srelgot->size += 2 * sizeof (ElfNN_External_Rela); - } - else - { - if (SYMBOL_REFERENCES_LOCAL (info, h)) - htab->elf.srelgot->size += sizeof (ElfNN_External_Rela); - else - htab->elf.srelgot->size += 2 * sizeof (ElfNN_External_Rela); - } + if (need_reloc) + htab->elf.srelgot->size += 2 * sizeof (ElfNN_External_Rela); } /* TLS_IE needs one dynamic reloc and one GOT slot. */ if (tls_type & GOT_TLS_IE) { s->size += GOT_ENTRY_SIZE; - - if (bfd_link_executable (info)) - { - /* Link exe and not defined local. */ - if (!SYMBOL_REFERENCES_LOCAL (info, h)) - htab->elf.srelgot->size += sizeof (ElfNN_External_Rela); - } - else - { - htab->elf.srelgot->size += sizeof (ElfNN_External_Rela); - } + if (need_reloc) + htab->elf.srelgot->size += 2 * sizeof (ElfNN_External_Rela); } /* TLS_DESC needs one dynamic reloc and two GOT slot. */ @@ -2623,6 +2628,18 @@ loongarch_tls_relax (bfd *abfd, asection *sec, Elf_Internal_Rela *rel, return false; } +#define TP_OFFSET 0 + +/* Return the relocation value for a static TLS tp-relative relocation. */ +static bfd_vma +tls_tpoff (struct bfd_link_info *info, bfd_vma addr) +{ + /* If tls_sec is NULL, we should have signalled an error already. */ + if (elf_hash_table (info)->tls_sec == NULL) + return 0; + return addr - elf_hash_table (info)->tls_sec->vma - TP_OFFSET; +} + static int loongarch_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, @@ -3751,53 +3768,54 @@ loongarch_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, { Elf_Internal_Rela rela; asection *relgot = htab->elf.srelgot; - bfd_vma tls_block_off = 0; - if (SYMBOL_REFERENCES_LOCAL (info, h)) - { - BFD_ASSERT (elf_hash_table (info)->tls_sec); - tls_block_off = relocation - - elf_hash_table (info)->tls_sec->vma; - } + int indx = 0; + bool need_relocs = false; + LARCH_TLS_GD_IE_NEED_DYN_RELOC (info, is_dyn, h, indx, need_relocs); if (tls_type & GOT_TLS_GD) { - rela.r_offset = sec_addr (got) + got_off; - rela.r_addend = 0; - if (SYMBOL_REFERENCES_LOCAL (info, h)) + if (need_relocs) { - /* Local sym, used in exec, set module id 1. */ - if (bfd_link_executable (info)) - bfd_put_NN (output_bfd, 1, got->contents + got_off); + /* Dynamic resolved Module ID. */ + rela.r_offset = sec_addr (got) + got_off; + rela.r_addend = 0; + rela.r_info = ELFNN_R_INFO (indx,R_LARCH_TLS_DTPMODNN); + bfd_put_NN (output_bfd, 0, got->contents + got_off); + loongarch_elf_append_rela (output_bfd, relgot, &rela); + + if (indx == 0) + { + /* Local symbol, tp offset has been known. */ + BFD_ASSERT (! unresolved_reloc); + bfd_put_NN (output_bfd, tls_tpoff (info, relocation), + (got->contents + got_off + GOT_ENTRY_SIZE)); + } else { - rela.r_info = ELFNN_R_INFO (0, R_LARCH_TLS_DTPMODNN); + /* Dynamic resolved block offset. */ + bfd_put_NN (output_bfd, 0, + got->contents + got_off + GOT_ENTRY_SIZE); + rela.r_info = ELFNN_R_INFO (indx, + R_LARCH_TLS_DTPRELNN); + rela.r_offset += GOT_ENTRY_SIZE; loongarch_elf_append_rela (output_bfd, relgot, &rela); } - - bfd_put_NN (output_bfd, tls_block_off, - got->contents + got_off + GOT_ENTRY_SIZE); } - /* Dynamic resolved. */ else { - /* Dynamic relocate module id. */ - rela.r_info = ELFNN_R_INFO (h->dynindx, - R_LARCH_TLS_DTPMODNN); - loongarch_elf_append_rela (output_bfd, relgot, &rela); - - /* Dynamic relocate offset of block. */ - rela.r_offset += GOT_ENTRY_SIZE; - rela.r_info = ELFNN_R_INFO (h->dynindx, - R_LARCH_TLS_DTPRELNN); - loongarch_elf_append_rela (output_bfd, relgot, &rela); + /* In a static link or an executable link with the symbol + binding locally. Mark it as belonging to module 1. */ + bfd_put_NN (output_bfd, 1, got->contents + got_off); + bfd_put_NN (output_bfd, tls_tpoff (info, relocation), + got->contents + got_off + GOT_ENTRY_SIZE); } } if (tls_type & GOT_TLS_GDESC) { /* Unless it is a static link, DESC always emits a dynamic relocation. */ - int indx = h && h->dynindx != -1 ? h->dynindx : 0; + indx = h && h->dynindx != -1 ? h->dynindx : 0; rela.r_offset = sec_addr (got) + got_off + desc_off; rela.r_addend = 0; if (indx == 0) @@ -3810,28 +3828,24 @@ loongarch_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } if (tls_type & GOT_TLS_IE) { - rela.r_offset = sec_addr (got) + got_off + ie_off; - if (SYMBOL_REFERENCES_LOCAL (info, h)) + if (need_relocs) { - /* Local sym, used in exec, set module id 1. */ - if (!bfd_link_executable (info)) - { - rela.r_info = ELFNN_R_INFO (0, R_LARCH_TLS_TPRELNN); - rela.r_addend = tls_block_off; - loongarch_elf_append_rela (output_bfd, relgot, &rela); - } + bfd_put_NN (output_bfd, 0, + got->contents + got_off + ie_off); + rela.r_offset = sec_addr (got) + got_off + ie_off; + rela.r_addend = 0; - bfd_put_NN (output_bfd, tls_block_off, - got->contents + got_off + ie_off); + if (indx == 0) + rela.r_addend = tls_tpoff (info, relocation); + rela.r_info = ELFNN_R_INFO (indx, R_LARCH_TLS_TPRELNN); + loongarch_elf_append_rela (output_bfd, relgot, &rela); } - /* Dynamic resolved. */ else { - /* Dynamic relocate offset of block. */ - rela.r_info = ELFNN_R_INFO (h->dynindx, - R_LARCH_TLS_TPRELNN); - rela.r_addend = 0; - loongarch_elf_append_rela (output_bfd, relgot, &rela); + /* In a static link or an executable link with the symbol + bindinglocally, compute offset directly. */ + bfd_put_NN (output_bfd, tls_tpoff (info, relocation), + got->contents + got_off + ie_off); } } } diff --git a/ld/testsuite/ld-loongarch-elf/desc-ie.d b/ld/testsuite/ld-loongarch-elf/desc-ie.d index 32e350507db..83ba5b5e9cb 100644 --- a/ld/testsuite/ld-loongarch-elf/desc-ie.d +++ b/ld/testsuite/ld-loongarch-elf/desc-ie.d @@ -7,10 +7,10 @@ Disassembly of section .text: -0+230 : - 230: 1a000084 pcalau12i \$a0, 4 - 234: 28cd6084 ld.d \$a0, \$a0, 856 - 238: 03400000 nop.* - 23c: 03400000 nop.* - 240: 1a000084 pcalau12i \$a0, 4 - 244: 28cd6081 ld.d \$ra, \$a0, 856 +[0-9a-f]+ : + +[0-9a-f]+: 1a000084 pcalau12i \$a0, .* + +[0-9a-f]+: 28cdc084 ld.d \$a0, \$a0, .* + +[0-9a-f]+: 03400000 nop.* + +[0-9a-f]+: 03400000 nop.* + +[0-9a-f]+: 1a000084 pcalau12i \$a0, .* + +[0-9a-f]+: 28cdc081 ld.d \$ra, \$a0, .* diff --git a/ld/testsuite/ld-loongarch-elf/desc-le.d b/ld/testsuite/ld-loongarch-elf/desc-le.d index b4ca9f82eb3..78202c1acde 100644 --- a/ld/testsuite/ld-loongarch-elf/desc-le.d +++ b/ld/testsuite/ld-loongarch-elf/desc-le.d @@ -8,8 +8,8 @@ Disassembly of section .text: -0+1200000e8 : - 1200000e8: 14000004 lu12i.w \$a0, 0 - 1200000ec: 03800084 ori \$a0, \$a0, 0x0 - 1200000f0: 03400000 nop.* - 1200000f4: 03400000 nop.* +[0-9a-f]+ : + +[0-9a-f]+: 14000004 lu12i.w \$a0, .* + +[0-9a-f]+: 03800084 ori \$a0, \$a0, .* + +[0-9a-f]+: 03400000 nop.* + +[0-9a-f]+: 03400000 nop.* diff --git a/ld/testsuite/ld-loongarch-elf/tlsdesc-dso.d b/ld/testsuite/ld-loongarch-elf/tlsdesc-dso.d index 453902d1622..5cfccb84ccb 100644 --- a/ld/testsuite/ld-loongarch-elf/tlsdesc-dso.d +++ b/ld/testsuite/ld-loongarch-elf/tlsdesc-dso.d @@ -8,49 +8,49 @@ Disassembly of section .text: -0+418 : - 418: 180214c4 pcaddi \$a0, 4262 - 41c: 1a000084 pcalau12i \$a0, 4 - 420: 28db0084 ld.d \$a0, \$a0, 1728 - 424: 180212a4 pcaddi \$a0, 4245 - 428: 18021304 pcaddi \$a0, 4248 - 42c: 28c00081 ld.d \$ra, \$a0, 0 - 430: 4c000021 jirl \$ra, \$ra, 0 - 434: 1a000084 pcalau12i \$a0, 4 - 438: 28d9c084 ld.d \$a0, \$a0, 1648 - 43c: 03400000 nop.* - 440: 03400000 nop.* - 444: 1a000084 pcalau12i \$a0, 4 - 448: 28d9c084 ld.d \$a0, \$a0, 1648 - 44c: 18021264 pcaddi \$a0, 4243 - 450: 18021244 pcaddi \$a0, 4242 - 454: 28c00081 ld.d \$ra, \$a0, 0 - 458: 4c000021 jirl \$ra, \$ra, 0 - 45c: 1a000084 pcalau12i \$a0, 4 - 460: 28daa084 ld.d \$a0, \$a0, 1704 +[0-9a-f]+ : + +[0-9a-f]+: 180214c4 pcaddi \$a0, .* + +[0-9a-f]+: 1a000084 pcalau12i \$a0, .* + +[0-9a-f]+: 28dc2084 ld.d \$a0, \$a0, .* + +[0-9a-f]+: 180212a4 pcaddi \$a0, .* + +[0-9a-f]+: 18021304 pcaddi \$a0, .* + +[0-9a-f]+: 28c00081 ld.d \$ra, \$a0, .* + +[0-9a-f]+: 4c000021 jirl \$ra, \$ra, .* + +[0-9a-f]+: 1a000084 pcalau12i \$a0, .* + +[0-9a-f]+: 28dae084 ld.d \$a0, \$a0, .* + +[0-9a-f]+: 03400000 nop.* + +[0-9a-f]+: 03400000 nop.* + +[0-9a-f]+: 1a000084 pcalau12i \$a0, .* + +[0-9a-f]+: 28dae084 ld.d \$a0, \$a0, .* + +[0-9a-f]+: 18021264 pcaddi \$a0, .* + +[0-9a-f]+: 18021244 pcaddi \$a0, .* + +[0-9a-f]+: 28c00081 ld.d \$ra, \$a0, .* + +[0-9a-f]+: 4c000021 jirl \$ra, \$ra, .* + +[0-9a-f]+: 1a000084 pcalau12i \$a0, .* + +[0-9a-f]+: 28dbc084 ld.d \$a0, \$a0, .* -0+464 : - 464: 1a000084 pcalau12i \$a0, 4 - 468: 28d86084 ld.d \$a0, \$a0, 1560 - 46c: 18020ce4 pcaddi \$a0, 4199 - 470: 18020e04 pcaddi \$a0, 4208 - 474: 28c00081 ld.d \$ra, \$a0, 0 - 478: 4c000021 jirl \$ra, \$ra, 0 - 47c: 18020d24 pcaddi \$a0, 4201 - 480: 1a000084 pcalau12i \$a0, 4 - 484: 28d90084 ld.d \$a0, \$a0, 1600 - 488: 03400000 nop.* - 48c: 03400000 nop.* - 490: 1a000084 pcalau12i \$a0, 4 - 494: 28d90084 ld.d \$a0, \$a0, 1600 - 498: 18020d84 pcaddi \$a0, 4204 - 49c: 28c00081 ld.d \$ra, \$a0, 0 - 4a0: 4c000021 jirl \$ra, \$ra, 0 - 4a4: 18020d24 pcaddi \$a0, 4201 - 4a8: 1a000084 pcalau12i \$a0, 4 - 4ac: 28d96084 ld.d \$a0, \$a0, 1624 +[0-9a-f]+ : + +[0-9a-f]+: 1a000084 pcalau12i \$a0, .* + +[0-9a-f]+: 28d98084 ld.d \$a0, \$a0, .* + +[0-9a-f]+: 18020ce4 pcaddi \$a0, .* + +[0-9a-f]+: 18020e04 pcaddi \$a0, .* + +[0-9a-f]+: 28c00081 ld.d \$ra, \$a0, .* + +[0-9a-f]+: 4c000021 jirl \$ra, \$ra, .* + +[0-9a-f]+: 18020d24 pcaddi \$a0, .* + +[0-9a-f]+: 1a000084 pcalau12i \$a0, .* + +[0-9a-f]+: 28da2084 ld.d \$a0, \$a0, .* + +[0-9a-f]+: 03400000 nop.* + +[0-9a-f]+: 03400000 nop.* + +[0-9a-f]+: 1a000084 pcalau12i \$a0, .* + +[0-9a-f]+: 28da2084 ld.d \$a0, \$a0, .* + +[0-9a-f]+: 18020d84 pcaddi \$a0, .* + +[0-9a-f]+: 28c00081 ld.d \$ra, \$a0, .* + +[0-9a-f]+: 4c000021 jirl \$ra, \$ra, .* + +[0-9a-f]+: 18020d24 pcaddi \$a0, .* + +[0-9a-f]+: 1a000084 pcalau12i \$a0, .* + +[0-9a-f]+: 28da8084 ld.d \$a0, \$a0, .* -0+4b0 : - 4b0: 18020d84 pcaddi \$a0, 4204 - 4b4: 28c00081 ld.d \$ra, \$a0, 0 - 4b8: 4c000021 jirl \$ra, \$ra, 0 +[0-9a-f]+ : + +[0-9a-f]+: 18020d84 pcaddi \$a0, .* + +[0-9a-f]+: 28c00081 ld.d \$ra, \$a0, .* + +[0-9a-f]+: 4c000021 jirl \$ra, \$ra, .*