The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Glenn9999 on February 05, 2011, 04:42:37 AM

Title: 3DNow instructions?
Post by: Glenn9999 on February 05, 2011, 04:42:37 AM
I get the feeling that they aren't supported in MASM and that since they will be phased out, they might not have no future good, but I thought I'd ask this: What kind of experiences do people have with the AMD 3DNow instructions?  And what kinds of things might I find using them, or (as I guess since AMD phases them out) would I find much of this at all?   For that matter, how well is SSE implemented on the same processors that support 3DNow?
Title: Re: 3DNow instructions?
Post by: MichaelW on February 05, 2011, 05:13:58 AM
I have no experience with the 3DNow instructions, and currently nothing that they will run on, but even ML 6.14 appears to support the instruction set.

;====================================================================
    include \masm32\include\masm32rt.inc
    .K3D
;====================================================================
    .data
    .code
;====================================================================
start:
;====================================================================
    PF2ID mm0, mm1
    PFCMPEQ mm0, mm1
    PFADD mm0, mm1

    inkey "Press any key to exit..."
    exit
;====================================================================
end start

Title: Re: 3DNow instructions?
Post by: dedndave on February 05, 2011, 05:47:26 AM
i have seen them used in code for stuff like AVI players
of course, only AMD processors support them   :P
i don't know about them being "phased out", though
i think the AMD version of AVX (aka SSE5) augment the 3DNow set
i guess they'll be viable as long as AMD makes processors
Title: Re: 3DNow instructions?
Post by: sinsi on February 05, 2011, 06:05:04 AM
From the font of knowledge
Quote from: wikiAs of August 2010 support for 3DNow! will be dropped in future AMD processors, except for two instructions.
Title: Re: 3DNow instructions?
Post by: dedndave on February 05, 2011, 07:45:24 AM
that's a surprise
it shouldn't break any code, really
any app that uses 3dnow, tests for it
i suppose they needed to make room for the AVX set

question, though
what is the "font of knowledge" ???
(arial bold - lol)
Title: Re: 3DNow instructions?
Post by: sinsi on February 05, 2011, 08:05:42 AM
Yeah, to use 3DNow you would test for it via CPUID, so nothing has changed.
Intel never implemented it and it was largely superceded by SSE3 (or maybe SSE2).
Probably why AMD are letting it die.

font/fount/fountain of knowledge/wisdom = wikipedia
Title: Re: 3DNow instructions?
Post by: jj2007 on February 05, 2011, 08:17:14 AM
Quote from: sinsi on February 05, 2011, 08:05:42 AM
font/fount/fountain of knowledge/wisdom = wikipedia

Sinsi,
Quick, post something in the Colosseum before Hutch realises what you just wrote here!! ::)
Title: Re: 3DNow instructions?
Post by: sinsi on February 05, 2011, 08:21:05 AM
[sarcasm][/sarcasm] tags were implied, surely?
Title: Re: 3DNow instructions?
Post by: hutch-- on February 05, 2011, 12:14:12 PM
 :bg