Questions tagged [mmx]

MMX is a single instruction, multiple data (SIMD) instruction set designed by Intel, introduced in 1997 with their P5-based Pentium line of microprocessors, designated as "Pentium with MMX Technology"

MMX is a trademark used to reference an extension to the Intel Architecture Instruction set. Officially Intel states the initials are meaningless. This extension adds 57 opcodes, a 64-bit quadword datatype and eight 64-bit registers. These registers can be addressed using the names mm0 through mm7.

To avoid compatibility problems with the context switch mechanisms in existing operating systems, these registers were aliases for the existing x87 FPU stack registers. Unlike the FP stack, the MMn registers are directly addressable.

The main usage of the MMX instruction set is based on the concept of packed data types, which means that instead of using the whole register for a single 64-bit integer, two 32-bit integers, four 16-bit integers, or eight 8-bit integers may be processed concurrently. Thus, the unofficial initials are known as "MultiMedia eXtension" or "Matrix Math eXtension."

The mapping of the MMX registers onto the existing FPU registers made it somewhat difficult to work with floating point and SIMD data in the same application.

MMX provides only integer operations

107 questions
0
votes
1 answer

WebSphere MQ and mmx : Not able to connect with queues

We are using WebSphere MQ and mmx , however we are facing issues while trying to connect with queue: [2/10/12 13:24:51:861 CST] 00000011 SystemOut O 13:24:51,861 INFO [ListenerThread] - Retry [=1] reconnecting to JMS Queue/Topic [2/10/12…
xslguy
  • 91
  • 1
  • 11
0
votes
1 answer

What is the Default addition Operator '+' of __m64

I found that the following code(C Files) can be compiled successfully in x86_64, gcc 10.1.0. #include #include #include typedef union{ __m64 x; #if defined(__arm__) || defined(__aarch64__) int32x2_t…
0
votes
0 answers

How can I convert C++ code to assembly using the SSE instruction set?

How can I convert the below code to assembly using the SSE instruction set? for (int &elem : elems){ int temp = 255 - elem > 0 ? 255 - elem : 0 ; results.push_back(temp); } I don't want to use intrinsic C++ functions. I can't understand how…
0
votes
0 answers

how to load array elements in MMX or SSE registers to do sum operation on them

I have the code bellow. #include #include #include #include #include #include using namespace std; vector &split(const string &s, char delim,…
0
votes
0 answers

How to prepare data for use with MMX/SSE intrinsics for shifting 16bit values?

No matter what I do with {0,8,16,0}(16bit vector, representation for copying into a big endian 64bit value) I am unable to properly bit shift a test value of { 0x00, 0x01, (...) 0x07 }; The result I get in the debugger is always 0x0. I tried to…
0
votes
0 answers

How to save a value to a variable using mmx ? (c++)

int А; int32_t matr1[10] = { 3,10,100,1000,2,40,200,3}; // first matrix int32_t result[10] = {}; //result ... _asm{ lea eax,[matr1] lea edx,[result] movq mm0,[eax] movd[edx],mm0 } How can I continue the code so that for example the 3 element of…
Kris
  • 13
  • 3
0
votes
0 answers

How to add all the elements of an array using MMX?

I use an assembler insert and cannot complete the task. I need to add all the elements of the array using MMX int32_t matr1[10] = { 3,10,100,1000,2,40,200,3}; // first matrix int32_t matr2[6] = { 1,0,4,6, 3,7}; // second matrix int32_t result[10]…
Kris
  • 13
  • 3
0
votes
0 answers

Problem with adds two arrays to each other and stores the result in 3, doesn't work

I have a problem with my assembler language program using mmx. This program declares 3 arrays, and then adds two to each other and stores the result in 3. What went wrong? %define ITERATIO 16 org 100h start: movq mm0, [tab1] paddb mm0,…
puac
  • 11
0
votes
0 answers

What is the difference between MMX PANDN and BMI ANDN?

What is the difference between the MMX instruction PANDN and the BMI 1.0 instruction ANDN ?
gnzlbg
  • 7,135
  • 5
  • 53
  • 106
0
votes
1 answer

MMX Invalid floating point operation

Using C++ Builder 6 and trying to run this code __int64 m64_1 = 1424115525456; __int64 m64_2 = 2222222222222; __int64 m64_3 = 1111111111111; __asm movq mm1, m64_1 __asm paddd mm1, m64_2 __asm movq m64_3, mm1 but I don't execute…
keipa
  • 702
  • 1
  • 8
  • 17
0
votes
1 answer

x86_64 ASM: Alternative to movq?

Is there an alternate way to put a qword in an mmx register? For example, in this code snippet: db random 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa run: movq mm2, [rel random] I can now work with that as a qword 0xaaaaaaaaaaaaaaaa and do pxor etc…
user2059300
  • 361
  • 1
  • 5
  • 17
0
votes
1 answer

MMX: fading two images result

I was trying to fade two images and the results were not the expected (did it earlier with C code). Here is the MMX code: void fadeMMX(ImagenBMP *imagen1, ImagenBMP *imagen2, int f) { double *puntero1; double *puntero2; int valor = (int)f*255; for…
danibeam
  • 29
  • 6
0
votes
2 answers

Processing string with MMX instructions

I'm trying to implement a high-performance C++ program, each cycle I load 8 bytes to MMX register and then process them, but of course I want to stop when I hit the end of the string. So this is the solution I found, each cycle load 8 bytes, compare…
EralpB
  • 1,621
  • 4
  • 23
  • 36
0
votes
1 answer

Assembler MMX errors

I am doing my school project: dynamic MASM assembler library in Visual Studio, that implements CaesarCipher's method. Everything worked fine, when I was using console application. When I created Windows Forms UI, MMX functions started to cause…
user1678401
  • 55
  • 1
  • 7
0
votes
1 answer

Adding packed bytes/words using MMX instructions

So let's say that we have two registers that contain the following hexadecimal values: AB0890C2, 4598EE50. What would be the result of adding them using MMX instructions: a. for packed byte b. for packed word Assuming saturation arithmetic is not…
k-Rocker
  • 147
  • 2
  • 9