My life for a code snippet!

Started by
2 comments, last by Goodlife 23 years, 11 months ago
Hi gang-- remember me? I wrote the now famous, beautifully written "MMX, my distant love" post below. It was eloquent, and you know it. Okay, so no floating point. However, I still want to do my vertex transforms without directx sometimes-- again, because when I transform, I don''t do 3-d rotations... I only need to do 2d rotations in some instances. But I am utterly unfamiliar with MMX, but only need a tiny code snippet to get me going. Could someone post (pretty please!) a lil'' code snippet that does the following in MMX? long vertex_x; long vertex_y; long multix; long multiy; vertex_x*=multix; vertex_y*=multiy; Again, I know this seems very rudimentary, but if someone could just show me MMX code for this, I''ll be able to figure out what I need from it. Thanks a billion! -- Goodlife ----------------------------- Think of your mind as a door on a house. Leave the door always closed, and it's not a house, it's a prison. Leave the door always open, and it's not a house, it's a wilderness-- all the vermin creep in.
-- Goodlife-----------------------------Those whom the gods would destroy, they first drive mad.--DirectX design team official motto
Advertisement
I Wish I Could Help....
But....
Erik, if you can''t help, why bother posting something saying that you can''t help??

/. Muzzafarath
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall
There is no MMX instruction to multiply to 32-bit values. The only multiply instructions that are available are the following:

pmaddwd: multiply and add 4 16-bit values to 4 16-bit values and store 2 32-bit values

pmulhw: multiply 4 16-bit values to 4 16-bit values and store 4 16-bit values of the high word of the product

pmullw: multiply 4 16-bit values to 4 16-bit values and store 4 16-bit values of the low word of the product

Sorry.

Mike

This topic is closed to new replies.

Advertisement