From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 749379419E1 for ; Fri, 14 Feb 2025 14:25:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=vzfI9prRB/W794DFw04pxkKYXrcp3ep2h+Y1WIxKFYc=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240830; t=1739543114; v=1; x=1739802312; b=dF2x8ChVCC+tZmN3TCphYCEaIsXdmycjt+P/xCDbc+gY/YUtA6EfWSEOeZ98dZJoj9UC2LU7 JY0fTO+M06k6xxPYRQ1fimC4HGA8GqeAX+03KrC6RnDMbPkPaKeyGweU7HpHIes198eEcOze/qR h9fk3bbm1Oe6DkeNU/UbRs6X6jm1bN+NAU4DSDGhAWKY63XErpAbg0SWnMI4SygQsOdS6xZv90U NXSGdbBznKf4g5hPOLQ42QihlZymR9sbCW7klzMRwaAEyPl+nvvwTE/Cq3dJW7s2y4Pp/pDtGcO j4TK/PB5Gairquy/jFqnrE95u0qyY+GPWhU+9T8BYYzag== X-Received: by 127.0.0.2 with SMTP id v5U3YY7687511xeTTgHDTKl7; Fri, 14 Feb 2025 06:25:12 -0800 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web11.22052.1739543112120813626 for ; Fri, 14 Feb 2025 06:25:12 -0800 X-Received: from [10.6.0.181] (unknown [20.39.63.8]) by linux.microsoft.com (Postfix) with ESMTPSA id 61347203F3F4; Fri, 14 Feb 2025 06:25:11 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 61347203F3F4 Message-ID: <8b244d08-478f-4969-8b85-df18a2718f40@linux.microsoft.com> Date: Fri, 14 Feb 2025 09:25:10 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] MOV64 and CLANGPDB To: Leif Lindholm Cc: devel@edk2.groups.io, Ard Biesheuvel References: <14280867-ac0c-4517-b336-3ddd88530606@linux.microsoft.com> From: "Michael Kubacki via groups.io" In-Reply-To: Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Fri, 14 Feb 2025 06:25:12 -0800 Resent-From: mikuback@linux.microsoft.com Reply-To: devel@edk2.groups.io,mikuback@linux.microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: N0elS38FqS1uMNJ2oXwDmojdx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=dF2x8ChV; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Thanks https://github.com/tianocore/edk2/pull/10760 is updated. I don't have a strong need for it to make the stable tag. I have a local=20 solution that can be used in the meantime. On 2/14/2025 5:48 AM, Leif Lindholm wrote: > On Fri, 14 Feb 2025 at 01:54, Michael Kubacki > wrote: >> That worked. >=20 > Splendid! Thanks. >=20 > Ard figured out how to reproduce the issue as well - the behaviour > changes between > -target aarch64-windows-none and -target aarch64-linux-gnu, so more LLP64= fun. >=20 >> Let me know what you'd like to do with >> https://github.com/tianocore/edk2/pull/10760. >=20 > I would prefer to fix the MOV64 macro and leave the invocation alone for = now. > If the optimization ot doing the direct mov is important enough, that > can be done > separately at a later point. >=20 > I pushed a fix to > https://github.com/leiflindholm/edk2/commit/a7ff8aebcad1a6621ac52007b6dc5= 30972b26125 > that you could cherry-pick into the PR. >=20 > Are you looking for this PR to hit the stable tag? > If not, the MOVx4 fix can wait too. >=20 > / > Leif >=20 >> --- >> >> Before (original code) >> >> ...ModuleEntryPoint.iiii:58:12: error: immediate must be an integer in >> range [0, 65535]. >> >> movz x9, (-1) >> 48, lsl #48 ; movk x9, ((-1) >> 32) & 0xffff, lsl #32 ; >> movk x9, ((-1) >> 16) & 0xffff, lsl #16 ; movk x9, (-1) & 0xffff >> >> --- >> >> After (new code) >> >> svc #0 >> >> movz x9, ((-1) >> 48) & 0xffff, lsl #48 ; movk x9, ((-1) >> 32) & >> 0xffff, lsl #32 ; movk x9, ((-1) >> 16) & 0xffff, lsl #16 ; movk x9, >> (-1) & 0xffff >> cmp x0, x9 >> cset x0, ne >> mov x9, xzr >> ret >> >> --- >> >> On 2/13/2025 5:33 PM, Leif Lindholm via groups.io wrote: >>> I would very much like to have a MOV64 that's universally usable. >>> That's sort of the point. >>> >>> However, I'm wondering if the error is in fact triggered by the first >>> stanza (movz), which doesn't mask its result, and will have 48 sign >>> extended bits above the ones we care about for the instruction. >>> >>> Annoyingly I cannot reproduce the build error in my setup, so I can't >>> verify if that is the problem. >>> >>> Michael, could you possibly do a test and change >>> movz Reg, (Val) >> 48, lsl #48 ; \ >>> to >>> movz Reg, ((Val) >> 48) & 0xffff, lsl #48 ; \ >>> >>> on line 51 in MdePkg/Include/AArch64/AsmMacroLib.h ? >>> >>> And then rebuild the MOV64 version of ArmStandaloneMmCoreEntryPoint? >>> >>> / >>> Leif >>> >>> >>>=20 >>> >> -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#121122): https://edk2.groups.io/g/devel/message/121122 Mute This Topic: https://groups.io/mt/111172486/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-