From nobody Fri Mar 31 16:00:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pp4l466Wpz42w8l for ; Fri, 31 Mar 2023 16:00:48 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pp4l448qCz4JXh for ; Fri, 31 Mar 2023 16:00:48 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f41.google.com with SMTP id v6-20020a05600c470600b003f034269c96so3977965wmo.4 for ; Fri, 31 Mar 2023 09:00:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680278446; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zFsD5Rm1Mak3T76TBymx2pTUixkIolXZIfn082AOti8=; b=c/BsOnXUxISP6mpVyThmtEvUvbFIqBQZYuIIJoTR+CWZvwW/WLE4h1iqsf97EeD4th 8Qf7rTHjxU4EeEpeidqL8u0P/O6ldUF7BM49cbxxCVhxcP8Pqn7+ms2rDxugTwnXFHyO sxVxoBTsXNJb93Ejx1UNW1aumrT4wJffljqZYeU9LqIbsKWhNCy4GkF10hugK/Zuo97K 4iBy/WeeKSCyrqOKOb+/IRfrnfV/nQ6RIVDilHXSEEjiTU8XgPUlHsE4/uaP2cabOvR9 BZpu3SvyKLkFhWIPPGjzBSbDkM8V5vvyMslxOBg5mGL2W7iOyaoBquC3MUty0isOvoAX Z/Kg== X-Gm-Message-State: AO0yUKWuBCDysPsyMi9XF+na5+3EF21IUP5LjGAAK9/aVsUiaeXihzVY FSETCuMz7hWSAI4bNv+S74pfSQ== X-Google-Smtp-Source: AK7set9WijhMWDG+gLx6UrmNDva9L5b7lX+qwgR6Ur3fs8tHKujXzwShkKEtSGvVtsXWg1+zSal6jg== X-Received: by 2002:a1c:790b:0:b0:3ee:7022:5eda with SMTP id l11-20020a1c790b000000b003ee70225edamr20795577wme.7.1680278446599; Fri, 31 Mar 2023 09:00:46 -0700 (PDT) Received: from smtpclient.apple (global-5-144.n-2.net.cam.ac.uk. [131.111.5.144]) by smtp.gmail.com with ESMTPSA id 3-20020a05600c228300b003ed2384566fsm3100702wmf.21.2023.03.31.09.00.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Mar 2023 09:00:46 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 47ff149afaea - main - Move arm64 EENTRY uses before ENTRY From: Jessica Clarke In-Reply-To: <202303311556.32VFuGQT080989@gitrepo.freebsd.org> Date: Fri, 31 Mar 2023 17:00:45 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1D6F1E29-6EA8-4ABA-BA63-A9D91B1C8A0A@freebsd.org> References: <202303311556.32VFuGQT080989@gitrepo.freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Pp4l448qCz4JXh X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 31 Mar 2023, at 16:56, Andrew Turner wrote: >=20 > The branch main has been updated by andrew: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D47ff149afaea6a403b8d044e26673bc3= cd605fe4 >=20 > commit 47ff149afaea6a403b8d044e26673bc3cd605fe4 > Author: Andrew Turner > AuthorDate: 2023-03-31 12:34:51 +0000 > Commit: Andrew Turner > CommitDate: 2023-03-31 15:45:31 +0000 >=20 > Move arm64 EENTRY uses before ENTRY >=20 > The ENTRY macro adds instructions to the start of a function but = not > EENTRY. To use these instructions in both functions move the EENTRY > use before the ENTRY use. This doesn=E2=80=99t work. ENTRY is what has the .text and .align 2, so = this could have the EENTRY symbols be unaligned or in the wrong section. In this specific case it happens to work, but in general this is broken and so your original problem needs fixing another way. Or I guess you could make both ENTRY and EENTRY include the .text and .align 2 (but on other architectures with variable-length instructions, or even on arm64 were you to ever want to over-align functions, this would still be insufficient). Jess > Sponsored by: Arm Ltd > --- > sys/arm64/arm64/memcpy.S | 4 ++-- > sys/arm64/arm64/support.S | 8 ++++---- > 2 files changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/sys/arm64/arm64/memcpy.S b/sys/arm64/arm64/memcpy.S > index d5fbfa64e0fa..b394d6c1d30a 100644 > --- a/sys/arm64/arm64/memcpy.S > +++ b/sys/arm64/arm64/memcpy.S > @@ -55,8 +55,8 @@ > The loop tail is handled by always copying 64 bytes from the end. > */ >=20 > -ENTRY(memcpy) > EENTRY(memmove) > +ENTRY(memcpy) > add srcend, src, count > add dstend, dstin, count > cmp count, 128 > @@ -237,6 +237,6 @@ L(copy64_from_start): > stp B_l, B_h, [dstin, 16] > stp C_l, C_h, [dstin] > ret > -EEND(memmove) > END(memcpy) > +EEND(memmove) >=20 > diff --git a/sys/arm64/arm64/support.S b/sys/arm64/arm64/support.S > index 885af5676159..28ac1d553fbc 100644 > --- a/sys/arm64/arm64/support.S > +++ b/sys/arm64/arm64/support.S > @@ -175,15 +175,15 @@ END(fueword32) > * long fueword(volatile const void *, int64_t *) > * int64_t fueword64(volatile const void *, int64_t *) > */ > -ENTRY(fueword) > EENTRY(fueword64) > +ENTRY(fueword) > check_user_access 0, (VM_MAXUSER_ADDRESS-7), fsu_fault_nopcb > fsudata ldtr, x0, 0 > str x0, [x1] /* Save the data in kernel space = */ > mov x0, #0 /* Success */ > ret /* Return */ > -EEND(fueword64) > END(fueword) > +EEND(fueword64) >=20 > /* > * int subyte(volatile void *, int) > @@ -218,14 +218,14 @@ END(suword32) > /* > * int suword(volatile void *, long) > */ > -ENTRY(suword) > EENTRY(suword64) > +ENTRY(suword) > check_user_access 0, (VM_MAXUSER_ADDRESS-7), fsu_fault_nopcb > fsudata sttr, x1, 0 > mov x0, #0 /* Success */ > ret /* Return */ > -EEND(suword64) > END(suword) > +EEND(suword64) >=20 > ENTRY(setjmp) > /* Store the stack pointer */