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 A06AFAC0F2D for ; Fri, 14 Feb 2025 10:48:51 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=TLXjyn7hNnNbYz5mIeI+kVZZn87VBRSy8t7hINN6q88=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240830; t=1739530131; v=1; x=1739789330; b=fRBFWaKsxZxXyWozAlJuf0bYStHJKuee/YB+3dqlLPbJlpTIpICrMVjqaYqvwVbG2XpB4MBs ZA3PCSonkE3/o7dBWODtBm45mzijjj7O0F3cwUFBsAuGFpHqQ67hO8udp4Egyz3tZiXryjxXEjW u87mHx60aDwaCOcvP+iMOaD6RlPn4ho64OPwgmlcAH+bJB/1DmpjK0MX/ttgioyyZt8QWYL3O0t yH+CK8tKD7laZssPAPJElWP3Q9i0wLPGmcmZuoj9Fb+XmM4rPYsNrL44ujP6ZQJkdAPBDjAFvkn Ruq+ky+QdjyfFx9I4btDnDylgINM2R46WzyRB9KhYh6lA== X-Received: by 127.0.0.2 with SMTP id PljyYY7687511xM8Oxv9zHq8; Fri, 14 Feb 2025 02:48:50 -0800 X-Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.web11.18146.1739530124079488520 for ; Fri, 14 Feb 2025 02:48:44 -0800 X-Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 51E8QkOK016895 for ; Fri, 14 Feb 2025 10:48:43 GMT X-Received: from mail-yb1-f197.google.com (mail-yb1-f197.google.com [209.85.219.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44sde8bgnw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 14 Feb 2025 10:48:43 +0000 (GMT) X-Received: by mail-yb1-f197.google.com with SMTP id 3f1490d57ef6-e5742f52896so2533652276.3 for ; Fri, 14 Feb 2025 02:48:43 -0800 (PST) X-Gm-Message-State: M2XSnkrSdaXqb8PEVqFOO2jdx7686176AA= X-Gm-Gg: ASbGncvKfrohJkwSNbgxmgdaC9zPPCOcuqiTrPyYbKkynk9D49XpkMArkgeg8ziOU50 G1kPUZwPpziMGzj9QKHNLk1FEnrgljKM99qYerkPgGIQHVY3DoWeVACcV1BQQDE5eBlOH0ZWs/d wNG7iR56pSBuv6Cx3dThQ= X-Received: by 2002:a05:6902:1746:b0:e5d:aeb7:6e62 with SMTP id 3f1490d57ef6-e5daeb76f15mr3574910276.7.1739530122554; Fri, 14 Feb 2025 02:48:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IGaeQvzL6PEPqIgUBNHHOKBntq0TKTvqKgpV3fCV+ZmMXocsqzD3IYD2snssqgSagpbkMrfvQdN3bI0jJUddZY= X-Received: by 2002:a05:6902:1746:b0:e5d:aeb7:6e62 with SMTP id 3f1490d57ef6-e5daeb76f15mr3574901276.7.1739530122248; Fri, 14 Feb 2025 02:48:42 -0800 (PST) MIME-Version: 1.0 References: <14280867-ac0c-4517-b336-3ddd88530606@linux.microsoft.com> In-Reply-To: <14280867-ac0c-4517-b336-3ddd88530606@linux.microsoft.com> From: "Leif Lindholm via groups.io" Date: Fri, 14 Feb 2025 10:48:31 +0000 X-Gm-Features: AWEUYZkWQioGLH0oOJoWBfvZx3HH2M5udDYyCxXcy9lZf5-IcBrwhinn2saV6Bw Message-ID: Subject: Re: [edk2-devel] MOV64 and CLANGPDB To: Michael Kubacki Cc: devel@edk2.groups.io, Ard Biesheuvel X-Proofpoint-GUID: qhNJbGHB1pXf7R27AoVs9m4KNRUAFHvr X-Proofpoint-ORIG-GUID: qhNJbGHB1pXf7R27AoVs9m4KNRUAFHvr 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 02:48:44 -0800 Resent-From: leif.lindholm@oss.qualcomm.com Reply-To: devel@edk2.groups.io,leif.lindholm@oss.qualcomm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=fRBFWaKs; 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 On Fri, 14 Feb 2025 at 01:54, Michael Kubacki wrote: > That worked. Splendid! Thanks. 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. > Let me know what you'd like to do with > https://github.com/tianocore/edk2/pull/10760. 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. I pushed a fix to https://github.com/leiflindholm/edk2/commit/a7ff8aebcad1a6621ac52007b6dc530972b26125 that you could cherry-pick into the PR. Are you looking for this PR to hit the stable tag? If not, the MOVx4 fix can wait too. / Leif > --- > > 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 > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#121121): https://edk2.groups.io/g/devel/message/121121 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] -=-=-=-=-=-=-=-=-=-=-=-