Pelles C forum
Pelles C => General discussions => Topic started by: PaoloC13 on December 26, 2020, 10:49:45 PM
-
Hi,
I'm having an issue with the _mm_storel_pi function, from the xmmintrin.h header.
I've an open source library's header that calls this function, but it is undeclared.
I see the _mm_storel_pi declaration in xmmintrin.h is commented out.
Any tip to overcome this stop?
-
Hi,
This will not be much help, but it probably indicates that the function is not yet implemented within Pelles C libraries.
John Z
-
I don't know how to get around this problem, maybe I should implement a function with the corresponding asm instructions?
-
Include <intrin.h>
-
Hi frankie
I tried to include <intrin.h>, but the compiler still can't find the _mm_storel_pi function, which I found in <xmmintrin.h> where it's commented out:
/* void __cdecl _mm_storel_pi(__m64 *, __m128); */
Where am I wrong?
Thanks
-
Pelles C don't have that
With MS cl
#include <intrin.h>
void foo(void)
{
__m128 m128 = {0};
__m64 m64;
_mm_storel_pi(&m64, m128);
}
_foo:
00000000 53 push ebx
00000001 8BDC mov ebx, esp
00000003 83EC08 sub esp, 8h
00000006 83E4F0 and esp, -10h
00000009 83C404 add esp, 4h
0000000C 55 push ebp
0000000D 8B6B04 mov ebp, dword ptr [ebx+4h]
00000010 896C2404 mov dword ptr [esp+4h], ebp
00000014 8BEC mov ebp, esp
00000016 83EC20 sub esp, 20h
00000019 33C0 xor eax, eax
0000001B 8945E0 mov dword ptr [ebp-20h], eax
0000001E 8945E4 mov dword ptr [ebp-1Ch], eax
00000021 8945E8 mov dword ptr [ebp-18h], eax
00000024 8945EC mov dword ptr [ebp-14h], eax
00000027 0F2845E0 movaps xmm0, xmmword ptr [ebp-20h]
0000002B 0F1345F8 movlps qword ptr [ebp-8h], xmm0
0000002F 8BE5 mov esp, ebp
00000031 5D pop ebp
00000032 8BE3 mov esp, ebx
00000034 5B pop ebx
00000035 C3 ret
foo:
00000000 4057 push rdi
00000002 4883EC20 sub rsp, 20h
00000006 488D442410 lea rax, [rsp+10h]
0000000B 488BF8 mov rdi, rax
0000000E 33C0 xor eax, eax
00000010 B910000000 mov ecx, 10h
00000015 F3AA rep stosb
00000017 0F28442410 movaps xmm0, xmmword ptr [rsp+10h]
0000001C 0F130424 movlps qword ptr [rsp], xmm0
00000020 4883C420 add rsp, 20h
00000024 5F pop rdi
00000025 C3 ret
-
Hi TimoVJL,
thanks for the help.
As soon as I have time I'll try to build the function with the inline assembler.