473,400 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

SSE2 intrinsic optimization problems

I have two problems. Both of them only happen with /O2.

First I have some code that uses the _mm_cvtsi32_si128 intrinsic. There are
two of them close together. I can see that one translates into:

B8 01 00 00 00 mov eax,1
66 0F 6E C0 movd xmm0, eax
66 0F 7F 84 24 E0 01 00 00 movdqa xmmword ptr [esp+1E0h],xmm0

But the other translates into:

BA 02 00 00 00 mov edx,2
0F 6E 94 24 10 02 00 00 movd mm2,dword ptr [esp+210h]

The location [esp+210h] is where that value is supposed to be stored.
The second problem happends when I am loading a bunch of values using
_mm_loadu_si128. Looking at the disassembly, these all translate into movdqu
and after a few it starts putting the values on the stack with movdqa.
Depending on the compiler state, it will switch these two opcodes and try to
load an unaligned value with movdqa and store it on the stack with movdqu.
I've been able to get the proper opcodes to be generated if I intersperse the
_mm_loadu_si128 with the code that uses the values.

I've tried to replicate both of these issues in a small console application,
but haven't been able to.

Nov 17 '05 #1
0 1088

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jeremy Cowles | last post by:
I have been reading a book that focuses on understanding the intrinsic types of C++ in depth. The author's mentality is this: "Understand the intrinsic types, then learn the std types as needed...
4
by: N4M | last post by:
Dear, C++ is currently a dominant programming lanaguage to solve Combinatorial Optimization problems. Will other languages be able to compete with C++ in this field? Could you suggest some C++...
0
by: Yusuf Motiwala | last post by:
Hi, Has anyone evaluated Visual Studio 2003 SSE/SSE2 code generation in terms of performance. As per Microsoft documentation, SSE/SSE2 is only used in VS.Net 2003 for some floating point...
13
by: Alek Davis | last post by:
Hi, Is it possible to access intrinsic ASP objects, such as Request, from a .NET class. Say, I have a .NET library exposed via a COM or COM+ wrapper. Can this library retrieve the request info...
6
by: Hipo | last post by:
Hi. For a project I have to load and store data to/from XMM registers. Loading and operating on the data works perfectly, but every time I try to store the data from the register to memory I get a...
3
by: Abhishek | last post by:
Recently i found that my C++ program was running fine with no optimization and giving segmentation fault with error code 139 when compiled with optimization level 2. I searched somewhat but never...
3
by: Pexi | last post by:
Hi, we have a component developed with VB6 (compiled as a single threaded dll), which we have used as Application level object for several years in classic asp without problems. Yet now, when we...
5
by: wkaras | last post by:
I've compiled this code: const int x0 = 10; const int x1 = 20; const int x2 = 30; int x = { x2, x0, x1 }; struct Y {
3
by: amitsoni.1984 | last post by:
Hi, I need to do a quadratic optimization problem in python where the constraints are quadratic and objective function is linear. What are the possible choices to do this. Thanks Amit
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.