From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in5.apple.com (mail-out5.apple.com [17.151.62.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0692B802B3 for ; Tue, 7 Mar 2017 04:54:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1488891291; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-transfer-encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xFHVhJJpdeo+ct1BuvEOUUhFfIT6n6I84Dh3cZNatig=; b=uIlTfhaUgmUAcnBGsAqJ/QXebi8LOs4AAU+x7NyKUVc+coXomI2PNj131mA8KEM+ r/rDhm7XmOMMtJyouTQptmc0xyhPQrku2UwBBmvgnE3TOsWoLCCClFZcoeIECq3F fCpKGpB0md5GN5h2PGnnBtOn6y7rspLCMHQa55oDd7DnHB8ixIwcQrtyRSyYtY7k mHj+F3yyTfRU/4uDalfUYtleYkYAKEWCXgHxqpW5LzvEHbhr+WnJSLKlm/6uuWfJ a/MxKzc3uTvEyEdlcKQuAZvNqRqRJUC//UGUPA7PrtuE4VsXqIltN19fvrXQtE5h +hxS/rqD2wbl75Z3swFySQ==; Received: from relay7.apple.com (relay7.apple.com [17.128.113.101]) by mail-in5.apple.com (Apple Secure Mail Relay) with SMTP id 4B.76.22688.89DAEB85; Tue, 7 Mar 2017 04:54:51 -0800 (PST) X-AuditID: 11973e13-ff5fb700000058a0-6a-58bead9848a8 Received: from nwk-mmpp-sz09.apple.com (nwk-mmpp-sz09.apple.com [17.128.115.80]) by relay7.apple.com (Apple SCV relay) with SMTP id 53.83.10079.79DAEB85; Tue, 7 Mar 2017 04:54:48 -0800 (PST) MIME-version: 1.0 Received: from [17.153.22.12] (unknown [17.153.22.12]) by nwk-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.1.2.20170210 64bit (built Feb 10 2017)) with ESMTPSA id <0OMG00KCJ3VBR270@nwk-mmpp-sz09.apple.com>; Tue, 07 Mar 2017 04:54:47 -0800 (PST) Sender: afish@apple.com From: Andrew Fish In-reply-to: Date: Tue, 07 Mar 2017 04:54:47 -0800 Cc: "edk2-devel@lists.01.org" Message-id: <1AF20C7D-5F8E-4F78-9742-B35DAED85A8F@apple.com> References: To: Amit kumar X-Mailer: Apple Mail (2.3226) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFLMWRmVeSWpSXmKPExsUi2FCYqjt77b4Ig6n3NSz2vd7JZLHn0FFm ByaPxz1n2Dy6Z/9jCWCK4rJJSc3JLEst0rdL4Mo4MGU+U8EZ7ooXLx8wNjD2c3YxcnJICJhI XP3wir2LkYtDSGAfo8Sfqy9YYRKnpkxlhEgcZJQ4u/8HC0iCV0BQ4sfke0A2BwezgLzEwfOy IGFmAS2J749aWSDq+5kkJs1ZCDZIWEBc4t2ZTcwQtqHE5ZMr2UBsNgFliRXzP7CD2JwC8RIv r74Aq2ERUJVYdWUfI8RQc4kZF74wQey1kdjzfy1YjZBAnMSzY1fBakSA6vvbp7CD3CMhICsx +5cXyA0SAivYJD7sfMgygVF4FpKzZyGcPQvJ2QsYmVcxCuUmZuboZuaZ6iUWFOSk6iXn525i BAX2dDvhHYynV1kdYhTgYFTi4U3I3hshxJpYVlyZe4hRmoNFSZy3XnJfhJBAemJJanZqakFq UXxRaU5q8SFGJg5OqQbG8ol7ulm5OuJKxe+vXdinf/MWV8X6/2f2n3mhvevrhxUhd2rsXlo0 rTfM6b+o5ZL2kKvsuVOuMMdqpuxdSQxrD808lf+7eOb56VeP/xGLL+AqUuPzUVqXM00wr5PH cYf3v/BLbzLn5avdX/B/qXKD8V1b8+ynzIEW9l8yunkjD1+1+Xfw4o11SizFGYmGWsxFxYkA k54i900CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphkeLIzCtJLcpLzFFi42IRbCgO0J2xdl+EwctWVYt9r3cyWew5dJTZ gcnjcc8ZNo/u2f9YApiiuGxSUnMyy1KL9O0SuDIOTJnPVHCGu+LFyweMDYz9nF2MnBwSAiYS p6ZMZexi5OIQEjjIKHF2/w8WkASvgKDEj8n3gGwODmYBeYmD52VBwswCWhLfH7WyQNT3M0lM mrOQFSQhLCAu8e7MJmYI21Di8smVbCA2m4CyxIr5H9hBbE6BeImXV1+A1bAIqEqsurKPEWKo ucSMC1+YIPbaSOz5vxasRkggTuLZsatgNSJA9f3tU9hB7pEQkJWY/ctrAqPALCSXzkK4dBaS SxcwMq9iFChKzUmsNNdLLCjISdVLzs/dxAgOxMLUHYyNy60OMQpwMCrx8CZk740QYk0sK67M PcQowcGsJMIrPnVfhBBvSmJlVWpRfnxRaU5q8SHGKqDzJzJLiSbnA6MkryTe0MTEwMTY2MzY 2NzEnCrCSuK8zMuAjhFITyxJzU5NLUgtglnOxMEp1cB4frbaGs/P3fKv965c4r8qnKtw75Y5 ol7hQiu1l1kmfLqw+pRYqemV8BW7boS+ncRwaP9q6YvGaekyu3XMjaVMXqT/Dd+8Mvy/Te8f g/Ycx6rvqyNYrn6Ud98iK9/yeLOuhqrh0vOPE/+fb2RsLnEILa+Rr1rJ+PJI/6Mj2u3agXWX ri98U7RIiaU4I9FQi7moOBEAzUjnl58CAAA= Subject: Re: SIMD Instruction supported ? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2017 12:54:52 -0000 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII > On Mar 7, 2017, at 4:06 AM, Amit kumar wrote: > > Hi, > I have been trying to exploit SIMD capabilities in a EFI shell application. > I have written a code which calls a procedure with is written in X64 asm. > but my application freezes at the following instruction > movdqa xmm0, XMMWORD PTR [rax] > > Is SIMD supported in UEFI ? > Kind of. I don't think the ABI requires it so you can't generically assume it exists, but it should be safe to use if it exists. If you `git grep movdqa` you will find code that is using that instruction. Did you look at the value of RAX? It is likely not 16 byte aligned and you are taking a GP. > Platform Details : > Processor :: intel I7, IvyBridge; > P.S i have checked the CPUID and SSE2 XMM are supported. Also the similar code works in windows environment. > I think you will find that malloc() is 16 byte aligned on Windows so that may be your issue. I.e. your code is non portable as it is making an implementation assumption, I think the contract from malloc is it is at least 8 byte aligned. I seem to remember AllocatePool() is 8 byte aligned. You could convert movdqa to movups and see if your fault goes away, or you could make sure your buffers are aligned. Thanks, Andrew Fish > Regards > Amit > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel