From patchwork Fri Jan 5 07:44:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenglulu X-Patchwork-Id: 185255 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp6077336dyb; Thu, 4 Jan 2024 23:45:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IG/TzRyzCcGdRUymVCUZd2qdGXbZsBdHPpPQJ2iFgeHyzEjeghPvW9+kbMFbufjmIEYk52v X-Received: by 2002:a05:620a:7f8:b0:781:b4a4:d793 with SMTP id k24-20020a05620a07f800b00781b4a4d793mr1637834qkk.149.1704440733566; Thu, 04 Jan 2024 23:45:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704440733; cv=pass; d=google.com; s=arc-20160816; b=vizIBL+h+Zm7j4ozVlsLEu36KYsTHHTDkqfXXwy0L2OicoajvW268JR4qbFv+LCga4 DTZx3RQsNY1n0kirCVI9oQZGl0R5KIJVeFkkBA9gTRsnlfE84Ls5bmoFq+pENL9fqI/+ alsVDxbFCXvCCglQzpxBp4drzg774qFYmDQ0NTHo28afioeGpTH5cOInQAvRvP5LRgLX u8egD1AvirzxrvWdYVx3hWlHq+L/WnLmTRgZj87I94FXJYGMbzVYINY8IBr8OIXKbmK1 nGwU/q3ZkIrEqPZ22izSpchW562sGgJ8dmyEpbwsbMKY+J8N99/QSXq2tPA1ck3O9IO9 BPcQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:arc-filter:dmarc-filter:delivered-to; bh=vO0I1ZMiv3Ba2sEUd2H+o2GxgXhJto9D5TvnJ4vxDwo=; fh=wYRiZnn9nDBltyuQH1H/s7FMOEBgw7D5UzXRQ9Hnwic=; b=UVjNllL3IANSLsujnGWvBRBjK5KGeVUYyBNMSllwqZbdhvF9nV3tBmZNrTz1CpGUL/ PsyT5Cvi9c5V5hFGl56Do0KYCAHBZMLcdRAHKpXCN3uIUVsObUgTO9zpn+Tgyvyf9hE3 d7ysK34epVFQdSQrWrD1EY1ZYoGI8ZwHNUAlThMK/jWNxoy3Po5XDu7V2mWP7pY+sFVk hVVEANxdTFxnzn8o3OjQHSd5rKImD9xys6FVL+4OVZSxQvS/eXCRJV8aNAWvyCo2P5IQ cYxJL3OHBrptokyFcdm1ejzawG3PlPh1SRwSuPANX3DQ5glll9j0IMMNiDRS04zd30fw C3tQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id x23-20020a05620a14b700b00783050b5df9si1164262qkj.773.2024.01.04.23.45.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 23:45:33 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.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 gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 436E8385E02B for ; Fri, 5 Jan 2024 07:45:33 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id EB6EE385DC33 for ; Fri, 5 Jan 2024 07:44:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EB6EE385DC33 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 EB6EE385DC33 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=1704440679; cv=none; b=AgrI/AWcTsX2U1Fp4j9EEqyUyNYBlX3eMvKdcMsfjkWTr0Fxv9Db/vf1K6xrpo6NMHLvVxYIxQcBpEociDM5jLw0YXqi8X1ZMHnfP/OT23KM2AWCTvF0zjfdnLunm283CzcyQ3x0vj6vJsaGxnI+Gg9X5FHOhbajChgLl9E/AW8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704440679; c=relaxed/simple; bh=BPCcwnNzAPmUi5DhnUFdybfxFBgEoc75jPcy247auFs=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=ZuiKj5ormuuZCMbw8OfQs/KjCjXHjOeKU6hcr3FW/KgsXlXUvp3/oHB85xcD6owe/DyVQHzHIuuFhLYIUCwOR4wbmKIaQhI9LB9u3vhUrHXYu+GvWvI7/NKqhY9NbxIzA9Lu7+e63PTWcrQ0hQ9TKcnx7b+gT+6tZALmfcQmObo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from loongson.cn (unknown [10.20.4.107]) by gateway (Coremail) with SMTP id _____8BxXetgs5dl1D4CAA--.8339S3; Fri, 05 Jan 2024 15:44:32 +0800 (CST) Received: from loongson-pc.loongson.cn (unknown [10.20.4.107]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cxyt1Xs5dlkhIDAA--.7970S4; Fri, 05 Jan 2024 15:44:30 +0800 (CST) From: Lulu Cheng To: gcc-patches@gcc.gnu.org Cc: xry111@xry111.site, i@xen0n.name, xuchenghua@loongson.cn, chenglulu@loongson.cn Subject: [PATCH v3 2/2] LoongArch: When the code model is extreme, the symbol address is obtained through macro instructions regardless of the value of -mexplicit-relocs. Date: Fri, 5 Jan 2024 15:44:12 +0800 Message-Id: <20240105074412.14096-3-chenglulu@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20240105074412.14096-1-chenglulu@loongson.cn> References: <20240105074412.14096-1-chenglulu@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Cxyt1Xs5dlkhIDAA--.7970S4 X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBj93XoW3Cr15Ww13CFyDGrWfZw4DWrX_yoWkGFWxpa y7Zr1jqF4rGFZ7K3WkZa4ftrWfZa1DKrWa9wnxJFyxZF48tr9FqaykKa9rtF4UJF1UtryS va4xuw17XFs0g3cCm3ZEXasCq-sJn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUk2b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r126r1DMcIj6I8E87Iv 67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2 Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s02 6x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0x vE2Ix0cI8IcVAFwI0_JFI_Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE 42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6x kF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxUcDDGUUUUU X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787235646638261555 X-GMAIL-MSGID: 1787235646638261555 Instructions pcalau12i, addi.d, lu32i.d and lu52i.d must be adjancent so that the linker can infer the PC of pcalau12i to apply relocations to lu32i.d and lu52i.d. Otherwise, the results would be incorrect if these four instructions are not in the same 4KiB page. See the link for details: https://github.com/loongson/la-abi-specs/blob/release/laelf.adoc#extreme-code-model. gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_symbol_extreme_p): Add function declaration. (loongarch_explicit_relocs_p): Use the macro instruction to get the symbol address when loongarch_symbol_extreme_p returns true. gcc/testsuite/ChangeLog: * gcc.target/loongarch/attr-model-1.c: Modify the content of the search string in the test case. * gcc.target/loongarch/attr-model-2.c: Likewise. * gcc.target/loongarch/attr-model-3.c: Likewise. * gcc.target/loongarch/attr-model-4.c: Likewise. * gcc.target/loongarch/func-call-extreme-1.c: Likewise. * gcc.target/loongarch/func-call-extreme-2.c: Likewise. * gcc.target/loongarch/func-call-extreme-3.c: Likewise. * gcc.target/loongarch/func-call-extreme-4.c: Likewise. --- gcc/config/loongarch/loongarch.cc | 11 +++++++++++ gcc/testsuite/gcc.target/loongarch/attr-model-1.c | 2 +- gcc/testsuite/gcc.target/loongarch/attr-model-2.c | 2 +- gcc/testsuite/gcc.target/loongarch/attr-model-3.c | 2 +- gcc/testsuite/gcc.target/loongarch/attr-model-4.c | 2 +- .../gcc.target/loongarch/func-call-extreme-1.c | 6 +++--- .../gcc.target/loongarch/func-call-extreme-2.c | 6 +++--- .../gcc.target/loongarch/func-call-extreme-3.c | 6 +++--- .../gcc.target/loongarch/func-call-extreme-4.c | 6 +++--- 9 files changed, 27 insertions(+), 16 deletions(-) diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc index 6a3321327ea..3b4b28f3bcc 100644 --- a/gcc/config/loongarch/loongarch.cc +++ b/gcc/config/loongarch/loongarch.cc @@ -264,6 +264,9 @@ const char *const loongarch_fp_conditions[16]= {LARCH_FP_CONDITIONS (STRINGIFY)}; #undef STRINGIFY +static bool +loongarch_symbol_extreme_p (enum loongarch_symbol_type type); + /* Size of guard page. */ #define STACK_CLASH_PROTECTION_GUARD_SIZE \ (1 << param_stack_clash_protection_guard_size) @@ -1963,6 +1966,14 @@ loongarch_symbolic_constant_p (rtx x, enum loongarch_symbol_type *symbol_type) bool loongarch_explicit_relocs_p (enum loongarch_symbol_type type) { + /* Instructions pcalau12i, addi.d, lu32i.d and lu52i.d must be adjancent + so that the linker can infer the PC of pcalau12i to apply relocations + to lu32i.d and lu52i.d. Otherwise, the results would be incorrect if + these four instructions are not in the same 4KiB page. + Therefore, macro instructions are used when cmodel=extreme. */ + if (loongarch_symbol_extreme_p (type)) + return false; + if (la_opt_explicit_relocs != EXPLICIT_RELOCS_AUTO) return la_opt_explicit_relocs == EXPLICIT_RELOCS_ALWAYS; diff --git a/gcc/testsuite/gcc.target/loongarch/attr-model-1.c b/gcc/testsuite/gcc.target/loongarch/attr-model-1.c index 916d715b98b..199849147de 100644 --- a/gcc/testsuite/gcc.target/loongarch/attr-model-1.c +++ b/gcc/testsuite/gcc.target/loongarch/attr-model-1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mexplicit-relocs -mcmodel=normal -O2" } */ -/* { dg-final { scan-assembler-times "%pc64_hi12" 2 } } */ +/* { dg-final { scan-assembler-times "la\.local\t\\\$r\[0-9\]+,\\\$r\[0-9\]+," 2 } } */ #define ATTR_MODEL_TEST #include "attr-model-test.c" diff --git a/gcc/testsuite/gcc.target/loongarch/attr-model-2.c b/gcc/testsuite/gcc.target/loongarch/attr-model-2.c index a74c795ac3e..72dcc89930f 100644 --- a/gcc/testsuite/gcc.target/loongarch/attr-model-2.c +++ b/gcc/testsuite/gcc.target/loongarch/attr-model-2.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mexplicit-relocs -mcmodel=extreme -O2" } */ -/* { dg-final { scan-assembler-times "%pc64_hi12" 3 } } */ +/* { dg-final { scan-assembler-times "la\.local\t\\\$r\[0-9\]+,\\\$r\[0-9\]+," 3 } } */ #define ATTR_MODEL_TEST #include "attr-model-test.c" diff --git a/gcc/testsuite/gcc.target/loongarch/attr-model-3.c b/gcc/testsuite/gcc.target/loongarch/attr-model-3.c index 5622d508678..cfb299986cc 100644 --- a/gcc/testsuite/gcc.target/loongarch/attr-model-3.c +++ b/gcc/testsuite/gcc.target/loongarch/attr-model-3.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mexplicit-relocs=auto -mcmodel=normal -O2" } */ -/* { dg-final { scan-assembler-times "%pc64_hi12" 2 } } */ +/* { dg-final { scan-assembler-times "la\.local\t\\\$r\[0-9\]+,\\\$r\[0-9\]+," 2 } } */ #define ATTR_MODEL_TEST #include "attr-model-test.c" diff --git a/gcc/testsuite/gcc.target/loongarch/attr-model-4.c b/gcc/testsuite/gcc.target/loongarch/attr-model-4.c index 482724bb974..a3ab22794d3 100644 --- a/gcc/testsuite/gcc.target/loongarch/attr-model-4.c +++ b/gcc/testsuite/gcc.target/loongarch/attr-model-4.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mexplicit-relocs=auto -mcmodel=extreme -O2" } */ -/* { dg-final { scan-assembler-times "%pc64_hi12" 3 } } */ +/* { dg-final { scan-assembler-times "la\.local\t\\\$r\[0-9\]+,\\\$r\[0-9\]+," 3 } } */ #define ATTR_MODEL_TEST #include "attr-model-test.c" diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-extreme-1.c b/gcc/testsuite/gcc.target/loongarch/func-call-extreme-1.c index db1e0f85396..96445328252 100644 --- a/gcc/testsuite/gcc.target/loongarch/func-call-extreme-1.c +++ b/gcc/testsuite/gcc.target/loongarch/func-call-extreme-1.c @@ -1,8 +1,8 @@ /* { dg-do compile } */ /* { dg-options "-mabi=lp64d -O0 -fno-pic -fno-plt -mexplicit-relocs -mcmodel=extreme" } */ -/* { dg-final { scan-assembler "test:.*pcalau12i.*%got_pc_hi20.*\n\taddi\.d.*%got_pc_lo12.*\n\tlu32i\.d.*%got64_pc_lo20.*\n\tlu52i\.d.*%got64_pc_hi12.*\n\tldx\.d" } } */ -/* { dg-final { scan-assembler "test1:.*pcalau12i.*%pc_hi20.*\n\taddi\.d.*%pc_lo12.*\n\tlu32i\.d.*%pc64_lo20.*\n\tlu52i\.d.*pc64_hi12.*\n\tadd\.d" } } */ -/* { dg-final { scan-assembler "test2:.*pcalau12i.*%pc_hi20.*\n\taddi\.d.*%pc_lo12.*\n\tlu32i\.d.*%pc64_lo20.*\n\tlu52i\.d.*pc64_hi12.*\n\tadd\.d" } } */ +/* { dg-final { scan-assembler "test:.*la\.global\t\\\$r\[0-9\]+,\\\$r\[0-9\]+,g" } } */ +/* { dg-final { scan-assembler "test1:.*la\.local\t\\\$r\[0-9\]+,\\\$r\[0-9\]+,f" } } */ +/* { dg-final { scan-assembler "test2:.*la\.local\t\\\$r\[0-9\]+,\\\$r\[0-9\]+,l" } } */ extern void g (void); void diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-extreme-2.c b/gcc/testsuite/gcc.target/loongarch/func-call-extreme-2.c index 21bf81ae837..49d49d21754 100644 --- a/gcc/testsuite/gcc.target/loongarch/func-call-extreme-2.c +++ b/gcc/testsuite/gcc.target/loongarch/func-call-extreme-2.c @@ -1,8 +1,8 @@ /* { dg-do compile } */ /* { dg-options "-mabi=lp64d -O0 -fpic -fno-plt -mexplicit-relocs -mcmodel=extreme" } */ -/* { dg-final { scan-assembler "test:.*pcalau12i.*%got_pc_hi20.*\n\taddi\.d.*%got_pc_lo12.*\n\tlu32i\.d.*%got64_pc_lo20.*\n\tlu52i\.d.*%got64_pc_hi12.*\n\tldx\.d" } } */ -/* { dg-final { scan-assembler "test1:.*pcalau12i.*%got_pc_hi20.*\n\taddi\.d.*%got_pc_lo12.*\n\tlu32i\.d.*%got64_pc_lo20.*\n\tlu52i\.d.*%got64_pc_hi12.*\n\tldx\.d" } } */ -/* { dg-final { scan-assembler "test2:.*pcalau12i.*%pc_hi20.*\n\taddi\.d.*%pc_lo12.*\n\tlu32i\.d.*%pc64_lo20.*\n\tlu52i\.d.*pc64_hi12.*\n\tadd\.d" } } */ +/* { dg-final { scan-assembler "test:.*la\.global\t\\\$r\[0-9\]+,\\\$r\[0-9\]+,g" } } */ +/* { dg-final { scan-assembler "test1:.*la\.global\t\\\$r\[0-9\]+,\\\$r\[0-9\]+,f" } } */ +/* { dg-final { scan-assembler "test2:.*la\.local\t\\\$r\[0-9\]+,\\\$r\[0-9\]+,l" } } */ extern void g (void); void diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-extreme-3.c b/gcc/testsuite/gcc.target/loongarch/func-call-extreme-3.c index a4da44b4a3d..029fb9934f4 100644 --- a/gcc/testsuite/gcc.target/loongarch/func-call-extreme-3.c +++ b/gcc/testsuite/gcc.target/loongarch/func-call-extreme-3.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-mabi=lp64d -O0 -fno-pic -fno-plt -mexplicit-relocs=auto -mcmodel=extreme" } */ -/* { dg-final { scan-assembler "test:.*pcalau12i.*%got_pc_hi20.*\n\taddi\.d.*%got_pc_lo12.*\n\tlu32i\.d.*%got64_pc_lo20.*\n\tlu52i\.d.*%got64_pc_hi12.*\n\tldx\.d" } } */ -/* { dg-final { scan-assembler "test1:.*pcalau12i.*%pc_hi20.*\n\taddi\.d.*%pc_lo12.*\n\tlu32i\.d.*%pc64_lo20.*\n\tlu52i\.d.*pc64_hi12.*\n\tadd\.d" } } */ -/* { dg-final { scan-assembler "test2:.*pcalau12i.*%pc_hi20.*\n\taddi\.d.*%pc_lo12.*\n\tlu32i\.d.*%pc64_lo20.*\n\tlu52i\.d.*pc64_hi12.*\n\tadd\.d" } } */ +/* { dg-final { scan-assembler "test:.*la\.global\t\\\$r\[0-9\]+,\\\$r\[0-9\]+,g" } } */ +/* { dg-final { scan-assembler "test1:.*la\.local\t\\\$r\[0-9\]+,\\\$r\[0-9\]+,f" } } */ +/* { dg-final { scan-assembler "test2:.*la\.local\t\\\$r\[0-9\]+,\\\$r\[0-9\]+,l" } } */ #include "func-call-extreme-1.c" diff --git a/gcc/testsuite/gcc.target/loongarch/func-call-extreme-4.c b/gcc/testsuite/gcc.target/loongarch/func-call-extreme-4.c index 16b00f4c5f2..68b342202b1 100644 --- a/gcc/testsuite/gcc.target/loongarch/func-call-extreme-4.c +++ b/gcc/testsuite/gcc.target/loongarch/func-call-extreme-4.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-mabi=lp64d -O0 -fpic -fno-plt -mexplicit-relocs=auto -mcmodel=extreme" } */ -/* { dg-final { scan-assembler "test:.*pcalau12i.*%got_pc_hi20.*\n\taddi\.d.*%got_pc_lo12.*\n\tlu32i\.d.*%got64_pc_lo20.*\n\tlu52i\.d.*%got64_pc_hi12.*\n\tldx\.d" } } */ -/* { dg-final { scan-assembler "test1:.*pcalau12i.*%got_pc_hi20.*\n\taddi\.d.*%got_pc_lo12.*\n\tlu32i\.d.*%got64_pc_lo20.*\n\tlu52i\.d.*%got64_pc_hi12.*\n\tldx\.d" } } */ -/* { dg-final { scan-assembler "test2:.*pcalau12i.*%pc_hi20.*\n\taddi\.d.*%pc_lo12.*\n\tlu32i\.d.*%pc64_lo20.*\n\tlu52i\.d.*pc64_hi12.*\n\tadd\.d" } } */ +/* { dg-final { scan-assembler "test:.*la\.global\t\\\$r\[0-9\]+,\\\$r\[0-9\]+,g" } } */ +/* { dg-final { scan-assembler "test1:.*la\.global\t\\\$r\[0-9\]+,\\\$r\[0-9\]+,f" } } */ +/* { dg-final { scan-assembler "test2:.*la\.local\t\\\$r\[0-9\]+,\\\$r\[0-9\]+,l" } } */ #include "func-call-extreme-1.c"