3DNow!™ Instructions are Being Deprecated

by Sharon Troia

AMD introduced the 3DNow! instruction set back in the K6-2 days to do Single Instruction Multiple Data (SIMD) instructions, otherwise known as vectorized instructions.  These were mainly used for graphics intensive applications and even audio processing. Since then, we have added many SIMD instruction sets to our processors, such as the widely used Streaming SIMD Extensions (SSE) instruction set and its successive versions. 

3DNow! instructions are being deprecated and will not be supported in certain upcoming AMD processors. In those processors, the 3DNow! Instructions feature flag bit will not be set. This is indicated by EDX bit 31 of CPUID function 8000_0001h. This is a good time to remind developers just how important it is to check for features supported at runtime before using them.  We have always recommended this feature check at runtime as a best practice, but it becomes very important now to help prevent your program from failing if it tries to execute this instruction without first checking if the feature is supported.  Around the same time as 3DNow! instructions were developed, programmers were accustomed to using a model of ‘try and catch’ to check if a processor supported an instruction or instruction set.  This is when the application ‘tries’ to execute an instruction to see if it’s available.  If the application receives an Undefined Exception (#UD) from the processor, it believes the instruction set isn’t available.  These types of applications may not do well under newer virtual machines.  That’s subject for another blog though.

There is one exception.  The 3DNow! versions of the PREFETCH and PREFETCHW instructions are now in a class of their own and AMD plans to continue to support them. This can be checked by testing bit 8 of register ECX following a CPUID function 8000_0001 instruction. This feature flag bit is named 3DNowPrefetch in the CPUID Specification.

What does this mean for you? 

If your software used 3DNow! instructions at any point in time you should confirm that you only take that code path after checking to see if the feature is supported during runtime, using CPUID.

Most likely, your code already has another code path to take, such as an SSE path, if 3DNow! instructions are not supported.  To reiterate, make sure that the code uses feature bits to determine when the code should take this path.  If the code uses the vendorID string rather than a feature bit to make the path determination, AMD processors that support SSE may end up taking a slower path as a result. 

If you are interested in changing your 3DNow! code to SSE, you can reference Appendix A of the AMD64 Architecture Programmer’s Manual, Volume 5It lists the recommended SSE substitutions for those considering porting 3DNow! code to SSE.

Also, note that deprecating 3DNow! instructions or any other instruction set can have an impact on migrating virtual machines between dissimilar hardware. This is another topic unto itself, but VMware addresses this issue here as it relates to 3DNow! and you can reference AMD’s own documentation regarding live migration:

 

-Written by Randy VanderHeyden, Member of Technical Staff at AMD and Sharon Troia, Sr. Developer Relations Engineer

Related Links:

 

Randy VanderHeyden is a software developer at AMD and Sharon Troia is a Developer Relations Engineer at AMD. Their postings are their own opinions and may not represent AMD’s positions, strategies or opinions. Links to third party sites are provided for convenience and unless explicitly stated, AMD is not responsible for the contents of such linked sites and no endorsement is implied.

7 Comments

  • James August 21, 2010

    How would an application react if it was programed for 3DNow! and was on one of these new processors. would it go 3DNow? and lock up; revert to SSE and be processed; or would it be processed in an unaccelerated fashion.

  • Searcher August 22, 2010

    but then…

    what about retrocompatibility ?

    specially with some video games, they will not work if 3D Now! is removed :S ?

  • 93sr20det August 23, 2010

    This saddens me as one of my first real computers was an AMD K6-2 350mhz. Everyone was on the Pentium2 / Celeron wagon at the time but my machine held it’s own

  • James August 25, 2010

    With 3DNow! deprecated, what are the plans for SSE4? Bobcat and Bulldozer make no mention of SSE4 or super/subsets; can they be added in at a later date easily?

    Is SSE4a deprecated as well?

  • roger September 8, 2010

    but wouldnt a webstei be better detecting the connection speed adn monitoring the available bandwidth instead of using a screen reoslution which is not supported bythe lcd screen – which tend to have fixed rez – also why the heck cant the vga mode 0 text only mode be combined with hi rez to reduce the amount of video ram required when displaying a website? was vga mode 0 proportioanl font ? why cant the vga card support 320×200 minimum rez this would make some smaller screens and fone screens legible
    ati tv ecnoders dont even support desktop video encoding frmo the catalyst control panel you can set the screen to 640 x 480 and suddenly some of the features ofthe vga dcard stop working see videos on youtube
    also the font size is not detected like on your site right now this article has no idea how big the text is im having to zoom to 200% just to read it thats rediculous i have to cahnge the zoom factor for each website that is daft
    can you recommend a uk isp that allows an itu t v44 connection to use the +IPR=291600 command please?

  • loan calulator September 30, 2010

    It’ s the primary time I obtain heard that in Macedonia, obits are an unusual observe. You receive wonderfully written the post. I bear liked your aspect of journalism leading article this. Thanks against sharing this.

  • Pingback: Работа процессора в Hyper-V - Russian Windows Virtualization Discussion - Site Home - TechNet Blogs

Submit a Comment

Connect with Facebook

Reminder about Comments:

All comments will be moderated by AMD before they are published. Unrelated comments or requests for support will not be published. Please post your technical questions in the AMD Forums or for drivers and other support resources visit AMD Support. By submitting a comment, you are agreeing to AMD Terms and Conditions.