From patchwork Tue Aug 20 12:10:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuriy Kolerov X-Patchwork-Id: 96151 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E54E43846081 for ; Tue, 20 Aug 2024 12:13:10 +0000 (GMT) X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from mx0a-00230701.pphosted.com (mx0a-00230701.pphosted.com [148.163.156.19]) by sourceware.org (Postfix) with ESMTPS id 9DC28384514A for ; Tue, 20 Aug 2024 12:11:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9DC28384514A Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=synopsys.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=synopsys.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9DC28384514A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.156.19 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724155916; cv=none; b=uTrAUR1t5BR00oy1KykW5XyNXhDzuhUFw7S7ifYkv1qhFQhD2HQFvkoO5MxrbDPu/kH4Z3yTUrab9jJfq1l7XptjYiJchj8p9xJy6+nQSLw+l3YYyVM7jfFen+NPAjvIw1Bul0nBIdu8wbzAePBnGsII3PCy5no5yJNZLbTfhwg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724155916; c=relaxed/simple; bh=tm+wk1YqV4nKhi4HSBYNebbxtfP6RCv9GZ7/URytcEs=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-Id: MIME-Version; b=HQGJalt9bLzTkcPM5Tp3OvvfH4tItt2T2dxpikiClCmqw6q6ECsVn1E1TqmOP7Gyfp1C0ynUmz0Eobjtp42+fXYZY3GC8rz5cXMyZu0QLkdNGSDjnt4h1XhwCM5YHr9OLrRNIebA9aoDs8y9BxJN9wgvMO7qvjSoTQvVKZOytDQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0098571.ppops.net [127.0.0.1]) by mx0a-00230701.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47KBaKhA031015 for ; Tue, 20 Aug 2024 05:11:51 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=synopsys.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pfptdkimsnps; bh=tq3njmKh xofQTyEesQwF+NfS3UFD+gKew9zbu3bYcgU=; b=IvEzzN4Hu8COYJGMK4+HDkFs J1YkWgaGwbVJl45sb/HQf1RwJMGOeQ2bmpe6bFi55ygFPErPNEFmvMsVdc5xTTkp 5dvC18zkqlqS30oBqrNXQrYM0KhWk8S431JhESma+iY0LZY449RWCsBlnIrxay9B yfR/MOBlWRYr1IdvXgObc8UWypEWfgC+hKsVmbViDs6Gl+mNVhBRL1jvIezmVi8x 40Gf9XMm+Ld3Uqbv3ato6zssd4tTxQ/OaXAv2beoSwjr4slKsgQgggq3XTZ2O6zg +wBeWEq3UuWrDqKykLvrt6pcB0E0NMwROhVbNV1GpcY7KqU8K6PcJkDUdX1X0Q== Received: from smtprelay-out1.synopsys.com (smtprelay-out1.synopsys.com [149.117.87.133]) by mx0a-00230701.pphosted.com (PPS) with ESMTPS id 414g8kjmxu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 20 Aug 2024 05:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1724155891; bh=tm+wk1YqV4nKhi4HSBYNebbxtfP6RCv9GZ7/URytcEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OWOB5Ki8PSoMocBq1Wh7Zu7CbSsc9MWU2KP3SEwY/xmcQXuTMhFSG4WjtXjot5hQ8 EFDxGxIw6Y9K+QMG8MCaGmCu7W3cmWL3F3e5IGjtaz3fZ/FYZ2O3RUcFtbib/GYpBT nDtAQHXKG+8lpjqfFxPW+rQHd1XjElHa0ts0p3tTLJsJXXX4lgGbEWe/0fB/koCrS0 Y7RADRv/LZzFN0F4+zWXA4kAxeTr4jkUqCggzkOqLC0ioV/mtITPeif7pMeyGVEF3M TLtZxL97y+s+9TPaW6gKS5JxJQ3iQ2Y6GDqtch1EXmVJnF0jCe+WVNwbtoF8T+7iUc Gu2EexyMea69Q== Received: from mailhost.synopsys.com (eudc-mailhost2.synopsys.com [10.213.161.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) client-signature RSA-PSS (2048 bits)) (Client CN "mailhost.synopsys.com", Issuer "SNPSica2" (verified OK)) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id A102D40467 for ; Tue, 20 Aug 2024 12:11:31 +0000 (UTC) Received: from SNPS-HRlPxd6IgG.internal.synopsys.com (snps-hrlpxd6igg.internal.synopsys.com [10.120.15.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by mailhost.synopsys.com (Postfix) with ESMTPSA id 28BFBC0B10; Tue, 20 Aug 2024 12:11:30 +0000 (UTC) X-SNPS-Relay: synopsys.com From: Yuriy.Kolerov@synopsys.com To: newlib@sourceware.org Cc: Alexey Brodkin Subject: [PATCH 5/8] arc: Remove @ from symbol references in assembly Date: Tue, 20 Aug 2024 15:10:40 +0300 Message-Id: <20240820121043.1605628-6-ykolerov@synopsys.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240820121043.1605628-1-ykolerov@synopsys.com> References: <20240820121043.1605628-1-ykolerov@synopsys.com> MIME-Version: 1.0 X-Authority-Analysis: v=2.4 cv=VcqlP0p9 c=1 sm=1 tr=0 ts=66c48807 cx=c_pps a=t4gDRyhI9k+KZ5gXRQysFQ==:117 a=t4gDRyhI9k+KZ5gXRQysFQ==:17 a=yoJbH4e0A30A:10 a=jIQo8A4GAAAA:8 a=UlrhkWCSf2s1214rN5AA:9 a=Lf5xNeLK5dgiOs8hzIjU:22 X-Proofpoint-GUID: YxPt1RwAKGCax6TSi79Cj9RNuIO9-Qn- X-Proofpoint-ORIG-GUID: YxPt1RwAKGCax6TSi79Cj9RNuIO9-Qn- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-20_09,2024-08-19_03,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_active_cloned_notspam policy=outbound_active_cloned score=0 mlxscore=0 bulkscore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 phishscore=0 adultscore=0 malwarescore=0 spamscore=0 mlxlogscore=761 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2408200090 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org From: Alexey Brodkin There's no semantic change, it's only to make the same code compilable with MetaWare toolchian, which actually assumes @x as a full name, not omitting @. Signed-off-by: Alexey Brodkin --- libgloss/arc/crt0.S | 46 +++++++++++++------------- libgloss/arc/gcrt0.S | 2 +- newlib/libc/machine/arc/memcpy-archs.S | 34 +++++++++---------- newlib/libc/machine/arc/strcmp-archs.S | 2 +- 4 files changed, 42 insertions(+), 42 deletions(-) diff --git a/libgloss/arc/crt0.S b/libgloss/arc/crt0.S index 36b9c250a..04fe82d7e 100644 --- a/libgloss/arc/crt0.S +++ b/libgloss/arc/crt0.S @@ -106,11 +106,11 @@ IVT_ENTRY(IRQ_20) ; 20 0x50 80 #ifdef __ARC601__ ; Startup code for the ARC601 processor __start: - mov gp, @__SDATA_BEGIN__ - mov sp, @__stack_top ; Point to top of stack + mov gp, __SDATA_BEGIN__ + mov sp, __stack_top ; Point to top of stack mov r5, 0 ; Zero value - mov_s r2, @__sbss_start ; r2 = start of the bss section - sub r3, @_end, r2 ; r3 = size of the bss section in bytes + mov_s r2, __sbss_start ; r2 = start of the bss section + sub r3, _end, r2 ; r3 = size of the bss section in bytes asr_s r3, r3 asr_s r3, r3 ; r3 = size of bss in words @@ -144,11 +144,11 @@ __start: #if defined (__ARC_CODE_DENSITY__) ;; Initialize jli_base - sr @__JLI_TABLE__,[jli_base] + sr __JLI_TABLE__,[jli_base] #endif - mov gp, @__SDATA_BEGIN__ - mov_s r2, @__sbss_start ; r2 = start of the bss section - sub r3, @_end, r2 ; r3 = size of the bss section in bytes + mov gp, __SDATA_BEGIN__ + mov_s r2, __sbss_start ; r2 = start of the bss section + sub r3, _end, r2 ; r3 = size of the bss section in bytes ; set up the loop counter register to the size (in words) of the bss section #if defined (__ARC_BARREL_SHIFTER__) asr.f lp_count, r3, 2 @@ -158,19 +158,19 @@ __start: #endif #if defined (__ARC600__) ; loop to zero out the bss. Enter loop only if lp_count != 0 - lpnz @.Lend_zbss + lpnz .Lend_zbss add r3, pcl, 20 sr r3, [2] ; LP_END ; initialize stack pointer, and this instruction has 2 words - mov sp, @__stack_top + mov sp, __stack_top mov_s r3, 0 st.ab r3, [r2, 4] ; zero out the word .Lend_zbss: #else - mov sp, @__stack_top ; initialize stack pointer + mov sp, __stack_top ; initialize stack pointer mov_s r3,0 ; loop to zero out the bss. Enter loop only if lp_count != 0 - lpnz @.Lend_zbss + lpnz .Lend_zbss st.ab r3,[r2, 4] ; zero out the word nop .Lend_zbss: @@ -220,30 +220,30 @@ __start: #endif /* ARCv2 */ ;; Call constructors - jl @_init + jl _init ;;; Setup fini routines to be called from exit - mov_s r0, @_fini - jl @atexit + mov_s r0, _fini + jl atexit #ifdef PROFILE_SUPPORT /* Defined in gcrt0.S. */ - mov r0,@__start - mov r1,@_etext - jl @_monstartup + mov r0,__start + mov r1,_etext + jl _monstartup #endif /* PROFILE_SUPPORT */ ; branch to main mov fp,0 ; initialize frame pointer - jl @__setup_argv_and_call_main + jl __setup_argv_and_call_main #ifdef PROFILE_SUPPORT mov r13, r0 ; Save return code - jl @_mcleanup + jl _mcleanup mov r0, r13 #endif /* PROFILE_SUPPORT */ ; r0 contains exit code - j @exit + j exit .size __start, .-__start ;;; arc-main-helper.o object can be used to replace this function and @@ -258,7 +258,7 @@ __setup_argv_and_call_main: ; Call main with argc = 0 and *argv[] = 0 mov r0, 0 mov r1, 0 - jl @main + jl main pop_s blink j_s [blink] @@ -275,5 +275,5 @@ _exit_halt: nop nop #endif - b @_exit_halt + b _exit_halt .align 4 diff --git a/libgloss/arc/gcrt0.S b/libgloss/arc/gcrt0.S index 0ce6b63cd..0526b99f3 100644 --- a/libgloss/arc/gcrt0.S +++ b/libgloss/arc/gcrt0.S @@ -58,7 +58,7 @@ __mcount: push r11 push r12 mov r0,blink - jl @_mcount_internal + jl _mcount_internal pop r12 pop r11 pop r10 diff --git a/newlib/libc/machine/arc/memcpy-archs.S b/newlib/libc/machine/arc/memcpy-archs.S index 3c477a745..e8a2a7e03 100644 --- a/newlib/libc/machine/arc/memcpy-archs.S +++ b/newlib/libc/machine/arc/memcpy-archs.S @@ -95,12 +95,12 @@ ENTRY (memcpy) ; if size <= 8 cmp r2, 8 - bls.d @.Lsmallchunk + bls.d .Lsmallchunk mov.f lp_count, r2 and.f r4, r0, 0x03 rsub lp_count, r4, 4 - lpnz @.Laligndestination + lpnz .Laligndestination ; LOOP BEGIN ldb.ab r5, [r1,1] sub r2, r2, 1 @@ -109,12 +109,12 @@ ENTRY (memcpy) ; Check the alignment of the source and.f r4, r1, 0x03 - bnz.d @.Lsourceunaligned + bnz.d .Lsourceunaligned ; CASE 0: Both source and destination are 32bit aligned ; Convert len to Dwords, unfold x4 lsr.f lp_count, r2, ZOLSHFT - lpnz @.Lcopy32_64bytes + lpnz .Lcopy32_64bytes ; LOOP START LOADX (r6, r1) PREFETCH_READ (r1) @@ -130,7 +130,7 @@ ENTRY (memcpy) and.f lp_count, r2, ZOLAND ;Last remaining 31 bytes .Lsmallchunk: - lpnz @.Lcopyremainingbytes + lpnz .Lcopyremainingbytes ; LOOP START ldb.ab r5, [r1,1] stb.ab r5, [r3,1] @@ -141,10 +141,10 @@ ENTRY (memcpy) .Lsourceunaligned: cmp r4, 2 - beq.d @.LunalignedOffby2 + beq.d .LunalignedOffby2 sub r2, r2, 1 - bhi.d @.LunalignedOffby3 + bhi.d .LunalignedOffby3 ldb.ab r5, [r1, 1] ; CASE 1: The source is unaligned, off by 1 @@ -159,7 +159,7 @@ ENTRY (memcpy) or r5, r5, r6 ; Both src and dst are aligned - lpnz @.Lcopy8bytes_1 + lpnz .Lcopy8bytes_1 ; LOOP START ld.ab r6, [r1, 4] prefetch [r1, 28] ;Prefetch the next read location @@ -186,7 +186,7 @@ ENTRY (memcpy) stb.ab r5, [r3, 1] and.f lp_count, r2, 0x07 ;Last 8bytes - lpnz @.Lcopybytewise_1 + lpnz .Lcopybytewise_1 ; LOOP START ldb.ab r6, [r1,1] stb.ab r6, [r3,1] @@ -204,7 +204,7 @@ ENTRY (memcpy) #ifdef __BIG_ENDIAN__ asl.nz r5, r5, 16 #endif - lpnz @.Lcopy8bytes_2 + lpnz .Lcopy8bytes_2 ; LOOP START ld.ab r6, [r1, 4] prefetch [r1, 28] ;Prefetch the next read location @@ -229,7 +229,7 @@ ENTRY (memcpy) sth.ab r5, [r3, 2] and.f lp_count, r2, 0x07 ;Last 8bytes - lpnz @.Lcopybytewise_2 + lpnz .Lcopybytewise_2 ; LOOP START ldb.ab r6, [r1,1] stb.ab r6, [r3,1] @@ -246,7 +246,7 @@ ENTRY (memcpy) #ifdef __BIG_ENDIAN__ asl.ne r5, r5, 24 #endif - lpnz @.Lcopy8bytes_3 + lpnz .Lcopy8bytes_3 ; LOOP START ld.ab r6, [r1, 4] prefetch [r1, 28] ;Prefetch the next read location @@ -271,7 +271,7 @@ ENTRY (memcpy) stb.ab r5, [r3, 1] and.f lp_count, r2, 0x07 ;Last 8bytes - lpnz @.Lcopybytewise_3 + lpnz .Lcopybytewise_3 ; LOOP START ldb.ab r6, [r1,1] stb.ab r6, [r3,1] @@ -294,12 +294,12 @@ ENTRY(memcpy) ;;; if size <= 8 cmp r2, 8 - bls.d @.Lsmallchunk + bls.d .Lsmallchunk mov.f lp_count, r2 ;;; Convert len to Dwords, unfold x4 lsr.f lp_count, r2, ZOLSHFT - lpnz @.Lcopyfast + lpnz .Lcopyfast ;; LOOP START LOADX (r6, r1) PREFETCH_READ (r1) @@ -316,7 +316,7 @@ ENTRY(memcpy) #ifdef __ARC_LL64__ and r2, r2, ZOLAND ;Remaining 31 bytes lsr.f lp_count, r2, 3 ;Convert to 64-bit words. - lpnz @.Lcopy64b + lpnz .Lcopy64b ;; LOOP START ldd.ab r6,[r1,8] std.ab r6,[r3,8] @@ -328,7 +328,7 @@ ENTRY(memcpy) #endif .Lsmallchunk: - lpnz @.Lcopyremainingbytes + lpnz .Lcopyremainingbytes ;; LOOP START ldb.ab r5, [r1,1] stb.ab r5, [r3,1] diff --git a/newlib/libc/machine/arc/strcmp-archs.S b/newlib/libc/machine/arc/strcmp-archs.S index 543cebc4e..3226c377f 100644 --- a/newlib/libc/machine/arc/strcmp-archs.S +++ b/newlib/libc/machine/arc/strcmp-archs.S @@ -40,7 +40,7 @@ ENTRY (strcmp) or r2, r0, r1 bmsk_s r2, r2, 1 - brne r2, 0, @.Lcharloop + brne r2, 0, .Lcharloop ; s1 and s2 are word aligned ld.ab r2, [r0, 4]