flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > pmulhrwc

Author
Thread Post new topic Reply to topic
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
From NASM manual:
Quote:
B.4.238 PMULHRWC, PMULHRIW: Multiply Packed 16−bit Integers With Rounding, and Store
High Word
PMULHRWC mm1,mm2/m64 ; 0F 59 /r [CYRIX,MMX]
PMULHRIW mm1,mm2/m64 ; 0F 5D /r [CYRIX,MMX]
These instructions take two packed 16−bit integer inputs, multiply the values in the inputs, round on
bit 15 of each result, then store bits 15−30 of each result to the corresponding position of the
destination register.
• For PMULHRWC, the destination is the first source operand.
• For PMULHRIW, the destination is an implied register (worked out as described for PADDSIW
(section B.4.200)).
The operation of this instruction is:
dst[0−15] := (src1[0−15] *src2[0−15] + 0x00004000)[15−30]
dst[16−31] := (src1[16−31]*src2[16−31] + 0x00004000)[15−30]
dst[32−47] := (src1[32−47]*src2[32−47] + 0x00004000)[15−30]
dst[48−63] := (src1[48−63]*src2[48−63] + 0x00004000)[15−30]
See also PMULHRWA (section B.4.239) for a 3DNow! version of this instruction.


When I try to use pmulhrwc, pmulhriw, or pmulhrwa, fasm says "illegal instruction".
pmulhuw assembles fine though.

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 05 Jul 2004, 03:35
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7623
Location: Kraków, Poland
Tomasz Grysztar
Cyrix-specific instructions were never implemented into fasm.
For a quick solution you can try making some macros similar to those for 3DNow! instructions that were made before fasm supported them internally: http://board.win32asmcommunity.net/showthread.php?s=3bc0c4cd59064067ce382228e3f7be6a&threadid=7892
Post 08 Jul 2004, 08:54
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
My bad, I thought it was a native MMX instruction!

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 08 Jul 2004, 17:45
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
Are you going to implement these Cyrix extensions? I think they are referred to as MMX+ (at least in WCPUID)

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 13 Jul 2004, 15:06
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.