From: Andrew Fish <afish@apple.com>
To: Amit kumar <akamit91@hotmail.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: SIMD Instruction supported ?
Date: Tue, 07 Mar 2017 04:54:47 -0800 [thread overview]
Message-ID: <1AF20C7D-5F8E-4F78-9742-B35DAED85A8F@apple.com> (raw)
In-Reply-To: <BN6PR11MB181169A66A3D97752C9757BFDC2F0@BN6PR11MB1811.namprd11.prod.outlook.com>
> On Mar 7, 2017, at 4:06 AM, Amit kumar <akamit91@hotmail.com> 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
prev parent reply other threads:[~2017-03-07 12:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-07 12:06 SIMD Instruction supported ? Amit kumar
2017-03-07 12:54 ` Andrew Fish [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1AF20C7D-5F8E-4F78-9742-B35DAED85A8F@apple.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox