* SIMD Instruction supported in UEFI?
@ 2017-03-08 15:09 Amit kumar
2017-03-08 23:21 ` Ken Taylor
0 siblings, 1 reply; 3+ messages in thread
From: Amit kumar @ 2017-03-08 15:09 UTC (permalink / raw)
To: edk2-devel@lists.01.org
Hi ;
I have written a UEFI app in ASM which runs XOR on a block of data using SIMD instructions ("PXOR") in UEFI environment.
It takes around 2 Seconds to run this code, but when i use normal C XOR operator ("^") it takes 1 Seconds.
Is there something wrong ? I mean SIMD instructions must be giving me better performance(my expectation);
But when i do same experiment in Windows environment SIMD code ( _mm_xor_si128 ) gives me 9 times better performance than normal XOR instruction.
Have i missed something?.
Regards
Amit Kumar
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: SIMD Instruction supported in UEFI?
2017-03-08 15:09 SIMD Instruction supported in UEFI? Amit kumar
@ 2017-03-08 23:21 ` Ken Taylor
2017-03-09 6:18 ` Amit kumar
0 siblings, 1 reply; 3+ messages in thread
From: Ken Taylor @ 2017-03-08 23:21 UTC (permalink / raw)
To: Amit kumar, edk2-devel@lists.01.org
Hi Amit,
Maybe in UEFI the code in question crosses a cache line boundary when executed in UEFI, with the loop or part of the instruction itself on one side of the boundary and the rest on the other? At what point are you trying to execute this code, is it still from the UEFI shell or have you moved it into a driver that runs earlier?
You might try changing the linker flags to force 4k code alignment on your test binary.
Regards,
-Ken.
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Amit kumar
Sent: Wednesday, March 08, 2017 7:10 AM
To: edk2-devel@lists.01.org
Subject: [edk2] SIMD Instruction supported in UEFI?
Hi ;
I have written a UEFI app in ASM which runs XOR on a block of data using SIMD instructions ("PXOR") in UEFI environment.
It takes around 2 Seconds to run this code, but when i use normal C XOR operator ("^") it takes 1 Seconds.
Is there something wrong ? I mean SIMD instructions must be giving me better performance(my expectation);
But when i do same experiment in Windows environment SIMD code ( _mm_xor_si128 ) gives me 9 times better performance than normal XOR instruction.
Have i missed something?.
Regards
Amit Kumar
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: SIMD Instruction supported in UEFI?
2017-03-08 23:21 ` Ken Taylor
@ 2017-03-09 6:18 ` Amit kumar
0 siblings, 0 replies; 3+ messages in thread
From: Amit kumar @ 2017-03-09 6:18 UTC (permalink / raw)
To: Ken Taylor, edk2-devel@lists.01.org
>From UEFI shell
From: Ken Taylor <Ken_Taylor@phoenix.com>
Sent: Thursday, March 9, 2017 4:51 AM
To: Amit kumar; edk2-devel@lists.01.org
Subject: RE: [edk2] SIMD Instruction supported in UEFI?
Hi Amit,
Maybe in UEFI the code in question crosses a cache line boundary when executed in UEFI, with the loop or part of the instruction itself on one side of the boundary and the rest on the other? At what point are you trying to execute this code, is it still from the UEFI shell or have you moved it into a driver that runs earlier?
You might try changing the linker flags to force 4k code alignment on your test binary.
Regards,
-Ken.
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Amit kumar
Sent: Wednesday, March 08, 2017 7:10 AM
To: edk2-devel@lists.01.org
Subject: [edk2] SIMD Instruction supported in UEFI?
Hi ;
I have written a UEFI app in ASM which runs XOR on a block of data using SIMD instructions ("PXOR") in UEFI environment.
It takes around 2 Seconds to run this code, but when i use normal C XOR operator ("^") it takes 1 Seconds.
Is there something wrong ? I mean SIMD instructions must be giving me better performance(my expectation);
But when i do same experiment in Windows environment SIMD code ( _mm_xor_si128 ) gives me 9 times better performance than normal XOR instruction.
Have i missed something?.
Regards
Amit Kumar
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-09 6:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-08 15:09 SIMD Instruction supported in UEFI? Amit kumar
2017-03-08 23:21 ` Ken Taylor
2017-03-09 6:18 ` Amit kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox