AMD Logo AMD Developer Central

Platforms and Tools for the AMD Athlon 64 Processor  

Skip Navigation LinksHome
The Athlon 64 processor extends the classic x86 architecture to offer new general-purpose registers, new 128-bit registers, a huge memory address space, new instructions—and the unique ability to run both 32-bit and 64-bit applications at the same time. Alan Zeichick provides a quick programmers-eye view of the processors, and surveys the different operating systems and tools available for Athlon 64.
Alan Zeichick 
Share |
12/3/2003 

At present, there are two main operating-system choices for native 64-bit development on the Athlon 64 processors, Linux and Windows. The use of a 64-bit OS is required in order to take advantage of the AMD64 architecture's extensions to the 32-bit instruction set. Those include:

  • Eight new 64-bit general-purpose registers (GPR), for a total of 16
  • Eight new 128-bit extended registers (XMM) for floating-point and SSE/SSE2 instructions, for a total of 16
  • New native instructions for 64-bit integer and 128-bit floating-point arithmetic
  • New native instructions for 64-bit and 128-bit media operations, including SSE, SSE2, MMX and AMD's 3dNow! graphics operations.
  • A 64-bit virtual address space with a total addressable range of 4.5 terabytes of physical memory
  • A 64-bit Extended Instruction Pointer, compared to 32-bit on the x86 architecture
  • Ability to mix 64-bit and 32-bit code running on the 64-bit OS. The 32-bit app will require translation of arguments such as address pointers when communicating with the OS.

See Figure 1 for a view of the new and extended registers on the Athlon 64 processor family; I'm sure that you can see how those additional registers will add efficiency to nearly every application, especially when they're leveraged by a smart optimizing compiler. For more details, check out the AMD Architecture Programmer's Manual, Volume 1. For a basic overview of the three different models of Athlon 64 processors, see "64 Bits on the Desktop: Meet the AMD Athlon 64 Family."


Figure 1.
The AMD64 architecture, as implemented in the Athlon 64 processor, adds new 64-bit and 128-bit registers that go beyond the x86 architecture, and also extends many 32-bit registers to handle 64-bit data and operations. Source: AMD.

Legacy Mode vs. Long Mode
It's important to note that the AMD64 processor can be run in two separate modes, legacy mode and long mode. Legacy mode is used when you run the processor with a 16-bit OS, like DOS, or a 32-bit operating system, like Windows or the "classic" versions of x86 Linux.

When you boot into a 64-bit operating system, the processor switches into long mode. The OS can then load and execute native 64-bit applications, or use a special compatibility mode to handle existing 32-bit x86 apps without recompilation.

Note that while compatibility mode does require argument translation between 32-bits and 64-bits (aka "thunking") as data moves between the 32-bit application and the 64-bit OS, the application itself is not being emulated, but runs at full speed on the hardware. That's because the AMD64 instruction set is a pure superset of the x86 instruction set. In fact, in many cases the new instructions are the same as the old instructions with either new operands or a special op-code prefix.

It's easy to become confused about the different modes; Figure 2 might help you keep them straight. Of course, unless you're doing close-to-the-metal coding, such as hand-optimizing algorithms or writing device drivers, you won't have to go deep into the new instructions; your optimizing compiler (or 64-bit managed runtime environment) will take care of all that for you. In fact, rather than going deeper on the instruction set and chip internals, let's look at those different operating systems.


Figure 2.
The Athlon 64 processor runs in legacy mode when running a 16-bit or 32-bit OS, or in long mode under a 64-bit OS. Long mode turns on the 64-bit goodies, such as the extra registers and instructions. Source: AMD.

Linux, Windows, and Java
There are several Linux distributions available that support the AMD64 architecture and run on the Athlon 64 processor. Those include two that I have experience with, Red Hat Enterprise Linux WS desktop distribution and SUSE Linux 9.0 for AMD64, as well as several others from companies such as Turbolinux.

According to SUSE literature, "64-bit systems enable computing technologies that could not be realized on conventional PCs due to the excessive computing time. Moreover, 64-bit computers have larger caches and a more efficient memory access, which further increases the system speed. Example: A computer with an AMD Athlon 64 processor with 1.8 GHz is faster than a 32-bit computer with a Pentium 4 processor with 3.2 GHz."

What about Unix? It's in the works. For example (as of Fall 2003), there is a fully functional port of NetBSD now available, but it's currently considered to an unsupported release. It will be a completely support platform in the next NetBSD release, however. You can download binary snapshots here. (The original work to do the port was performed by Frank van der Linden, at Wasabi Systems—thank you, Frank!)

Microsoft is currently offering a beta version of Windows XP for the Athlon 64 processor, which I've not yet tried. Called "Windows XP 64-Bit Edition for 64-Bit Extended Systems," it's available to subscribers of MSDN, the Microsoft Development Network, and a final release is expected in the first half of 2004. (The company is running a similar beta program for an AMD64 version of Windows Server 2003.)

Microsoft doesn't currently offer much Web-based information about this version of Windows, but you can explore its technical resources at http://msdn.microsoft.com. (Many of the MSDN articles about the platform refer to AMD64 by its older name, x86-64.)

Sidebar: Getting Your Hands Dirty

Currently, only native Windows applications can run in 64-bit mode; the .NET Framework, even on a 64-bit OS, is still a 32-bit managed environment.

Sadly, the same is still true with Java as well. Sun has committed to developing a native version of its Java 2 Standard Edition virtual machine for the AMD64 architecture, but that will have to wait for J2SE 1.5, which is expected to appear in mid-2004. Until that point, 64-bit versions of Linux and Windows running on the Athlon 64 will still contain a 32-bit JVM. But since 32-bit apps run at full speed on the Athlon 64, you won't see a performance penalty; on the contrary, you'll benefit from the high-performance I/O and memory buses on the AMD processors.

So for now, any 64-bit applications you develop for the Athlon 64 will have to be native apps.

Development Tools for Athlon 64
Are you a Windows developer? Are you a member of MSDN? Check out Microsoft's native C/C++ compiler for AMD64, which is included in its Windows Server 2003 Device Driver Kit. Look on the disk that contains the 64-bit build environment. You can also get preliminary technical information on the Microsoft compiler.

Linux and Windows developers can benefit from other compilers in an AMD64 tool chain, such as compilers from Absoft, GNU and The Portland Group, and libraries from GNU, Numerical Algorithms Group and AMD itself. Plus, AMD offers a powerful code profiler, called CodeAnalyst, that's available for free download; learn more about it.

You can find a more detailed listing of the tools in the AMD64 Tools Guide.

A former mainframe software developer and systems analyst, Alan Zeichick is principal analyst at Camden Associates, an independent technology research firm focusing on networking, storage, and software development.

 

Getting Your Hands Dirty

If you're going to build 64-bit applications using the AMD64 architecture, you'll need a development workstation and testbed systems that use either the Athlon 64 or the Opteron processor. Currently, my build/test/debug system is an IBM eServer 325 server, which has dual Opteron processors running SUSE Linux. But because all of the AMD64 processors are programmatically identical, the choice of platforms is up to you.

More than two dozen vendors have committed to building Athlon 64-based desktops and notebooks, and some of them are already on the market. Currently available systems are available for several vendors, including:

Over the next few months, we should expect to see more systems based on the AMD architecture, including the Athlon 64 and Opteron—and that means customers for your applications.


Figure 3. Alienware's Aurora Extreme desktops, available in colors like Cyborg Green, not only look good on developers' desks, but also give them plenty of performance, memory, storage and connectivity for application development and testing. Source: Alienware.

Back to top
© 2009 Advanced Micro Devices, Inc. AMD, the AMD Arrow logo, AMD Opteron, AMD Athlon, AMD Turion, AMD Sempron, AMD LIVE!, and combinations thereof, are trademarks of Advanced Micro Devices, Inc. Microsoft and Windows are registered trademarks of Microsoft Corporation in the United States and/or other jurisdictions. Linux is a registered trademark of Linus Torvalds. Other names are for informational purposes only and may be trademarks of their respective owners.

This website may be linked to other websites which are not in the control of and are not maintained by AMD. AMD is not responsible for the content of those sites. AMD provides these links to you only as a convenience, and the inclusion of any link to such sites does not imply endorsement by AMD of those sites. AMD reserves the right to terminate any link or linking program at any time.