- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to compile a .asm file that has a SSE4 instruction on Windows with the compiler version 11.0.061. The line "mpsadbw xmm0,xmm1,0" causes the compiler to throw an error that reads "Syntax error : xmm0". However, the SSE2 equivalent, "psadbw xmm0,xmm1" compiles fine. Am I doing anything wrong here? The compiler launch command I am trying to use from the Intel 32-bit compiler environment window is "icl foo.asm". Appreciate any insight you could provide. The inline assembly with __asm{} directive does compile fine, as does the compiler intrinsic. It is only when I try to compile the function as .asm file, I get the syntax error for the SSE4 instructions.
The code is attached below:
---------------------------------------------------------------------
.686
.XMM
.MODEL flat,stdcall
.STACK 4096
option casemap: none
.code
foo PROC x:XMMWORD,y:XMMWORD
mpsadbw xmm0,xmm1,0
foo ENDP
END
I am trying to compile a .asm file that has a SSE4 instruction on Windows with the compiler version 11.0.061. The line "mpsadbw xmm0,xmm1,0" causes the compiler to throw an error that reads "Syntax error : xmm0". However, the SSE2 equivalent, "psadbw xmm0,xmm1" compiles fine. Am I doing anything wrong here? The compiler launch command I am trying to use from the Intel 32-bit compiler environment window is "icl foo.asm". Appreciate any insight you could provide. The inline assembly with __asm{} directive does compile fine, as does the compiler intrinsic. It is only when I try to compile the function as .asm file, I get the syntax error for the SSE4 instructions.
The code is attached below:
---------------------------------------------------------------------
.686
.XMM
.MODEL flat,stdcall
.STACK 4096
option casemap: none
.code
foo PROC x:XMMWORD,y:XMMWORD
mpsadbw xmm0,xmm1,0
foo ENDP
END
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel C++ compiler for Windows does not have it's own assembler. The Intel C++ compiler calls Microsoft assembler if you try to compile the assebly file.
Intel compiler can compile inline assembly on its own. If you can convert your code to use the inline assembly then you can compiler SSE4 instructions by using /arch:SSE4.1 or /arch:SSE4.2 compiler option.
Intel compiler can compile inline assembly on its own. If you can convert your code to use the inline assembly then you can compiler SSE4 instructions by using /arch:SSE4.1 or /arch:SSE4.2 compiler option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Om Sachan (Intel)
Intel C++ compiler for Windows does not have it's own assembler. The Intel C++ compiler calls Microsoft assembler if you try to compile the assebly file.
Intel compiler can compile inline assembly on its own. If you can convert your code to use the inline assembly then you can compiler SSE4 instructions by using /arch:SSE4.1 or /arch:SSE4.2 compiler option.
Intel compiler can compile inline assembly on its own. If you can convert your code to use the inline assembly then you can compiler SSE4 instructions by using /arch:SSE4.1 or /arch:SSE4.2 compiler option.
Thanks Om.. I am using VS 2005. If Intel C++ compiler calls MS assembler, it does then make sense because, I believe, VS 2005 does not include support for SSE4.
Yes, the inline form compiles fine. But, I need the code to be in a saperate assembly file; I guess I will have to move to VS 2008 to be able to compile SSE4 instructions using MASM that comes with VS 2008.
Also, I was under the impression that the /arch:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The code generation and optimization are compilation phases. The compiler options /arch:SSE4.1 and /arch:SSE4.2 tells the compiler to generate optimized code specialized for the processor equipped with SSE4.1 and SSE4.2 instructions respectively.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Om Sachan (Intel)
The code generation and optimization are compilation phases. The compiler options /arch:SSE4.1 and /arch:SSE4.2 tells the compiler to generate optimized code specialized for the processor equipped with SSE4.1 and SSE4.2 instructions respectively.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
I think the question may have been whether SSE4 in-line instructions are accepted without SSE4 architecture selection.
Yes. Are they accepted without SSE4 architecture selection?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No. If we do not specify the architecture then compiler 11.x defaults to Intel Pentium IV instruction set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Om Sachan (Intel)
No. If we do not specify the architecture then compiler 11.x defaults to Intel Pentium IV instruction set.
This is not correct. User-written inline asm includingIntel Streaming SIMD Extensions 1-4or usage of SSE 1-4intrinsics or vector classes or manual cpu dispatching can all be used and compiled without needing the /Qx, /Qax, or /arch options to be set.
Om is correct that in general, the compiler generates code that can be run on processors that support SSE2.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page