Emulation of new instructions

By Mark Charney (Intel) (1 posts) on August 11, 2008 at 10:45 am

Hello and welcome to my blog. This is my first blog posting.

My name is Mark Charney and I work at Intel in Hudson, Massachusetts. Intel has just made available some software that I've been working on for emulation of new instructions: Intel® Software Development Emulator, or Intel® SDE for short. Intel SDE emulates instructions in the SSE4, the AES and PCLMULQDQ instruction set extensions, and also the Intel® AVX instructions. Intel SDE runs on Windows* and Linux* and supports IA-32 architecture and Intel® 64 architecture programs.

Intel SDE is a functional emulator, meaning that it is useful for testing software that uses these new instructions to make sure it computes the right answers. Testing software that uses instructions that do not exist in hardware yet requires an emulator. Intel SDE is not meant for predicting performance.

Intel SDE is actually a "Pintool" built upon the Pin dynamic binary instrumentation system.. The Pin that comes with Intel SDE uses a special version of the software encoder decoder called XED that I also develop. While Intel SDE is primarily useful for learning about the new instructions, it also has some features for doing simple workload analysis. The "mix" tool compute static and dynamic histograms. It can compute histograms by the type of the instruction (ADD, SUB, MUL, etc.) or by "iforms" which are XED classifications of instructions that include the operands, or by instruction length.

Intel SDE is fairly speedy. I actually haven't measured it because it was so much faster than the other emulator we have been using (over 100x faster) that I'm not getting any complaints internally. We routinely run SPEC2006 using Intel SDE using the reference inputs. Most of the inputs can run in several hours while a few of the longer running inputs take about a day. Emulation performance is tricky to measure as each instruction requires a different amount of work and each application is different. I could probably take the slow down relative to a version of SPEC2006 that only used native instructions. The reason that Intel SDE is faster than our previous "trap-and-emulate" emulator basically has to do with the fact that we do not rely on the illegal-instruction exception saving 1000s of cycles dispatching and returning from the emulation routines. Because Intel SDE is built upon Pin, we can JIT-translate the original program and branch to the emulation routines, saving that exception overhead.

Right now, there are several ways that I know about to write programs using the new instructions. If you want to use the SSE4, AES and PCLMULQDQ instructions, then you can use the Intel® Compiler. The Intel Compiler supporting Intel AVX is expected to be released in the first quarter of 2009. GCC4.3 supports SSE4. There is also a version of GCC that supports AES and PCLMULQDQ available in the svn (subversion) respository svn://gcc.gnu.org/svn/gcc/branches/ix86/gcc-4_3-branch . GCC for Intel AVX is under development as well: svn://gcc.gnu.org/svn/gcc/branches/ix86/avx. GNU binutils which includes the "gas" assembler is available for AES, PCLMULQDQ and Intel AVX. Also available are the YASM and NASM assemblers.

If anyone has questions about this or suggestions for something they'd like me to write about, please post a comment. I'd like to hear about what is important to you. There are so many aspects of this that I'd like to describe in future postings:

Also if you have software questions you can post them to the Intel® AVX and CPU forum at:
http://software.intel.com/en-us/forums/intel-avx-and-cpu-instructions/

Categories: What If Software

Comments (5)

November 7, 2008 10:00 PM PST

srimks
srimksTotal Points:
5,886
Status Points:
0
Brown Belt
Hi.

I would feel proud in exploring AVX behaviour with some scientific-applications. I have some more queries -

(a) Could I EVAL version for Intel AVX Simulator. If YES, this EVAL version would be for how many days?

(b) Can I simulate AVX with GNU Compiler Toolchain(GCC - 4.4, Binutils-2.18.50.0.9, & Glibc-2.7)?

(c) I do have Intel Compilers(v-10.0), can I have Intel AVX library support on this Intel-v10.0 compiler toolchain?
Also, we have Clovertown processor from Intel.


Looking forward.

~BR
Mukesh
January 7, 2009 7:56 AM PST

Mark Charney (Intel)
Mark Charney (Intel)Total Points:
776
Status Points:
276
Brown Belt
Hi Mukesh,

The license terms for the emulator are available on the download
page.

For GCC, the latest binutils 2.19.51.0.1 was released to support the
latest AVX architecture specification. It is available at this site:
http://www.kernel.org/pub/linux/devel/binutils. GCC 4.4 revision
143117 supports the same AVX architecture specification.

The first version of the Intel Compiler to support AVX will be available in early 2009.

Regards,
Mark
January 16, 2009 11:04 AM PST

Aaron Tersteeg (Intel)
Aaron Tersteeg (Intel)Total Points:
16,428
Status Points:
16,428
Community Manager
Mark Great to see that you have posted an update to the Software Development Emulator:
http://software.intel.com/en-us/articles/intel-software-development-emulator/
What are the big benefits to the update?
December 14, 2009 9:14 AM PST


Chris
Hi,
Is there any way to use a pintool with SDE?
Thanks,
Chris
January 1, 2010 5:50 PM PST

Mark Charney (Intel)
Mark Charney (Intel)Total Points:
776
Status Points:
276
Brown Belt
Hi Chris,

Currently we do not release the libraries/headers for making SDE-enabled pintools. SDE is itself a pintool and sometimes it is a little tricky to compose distinct pintools. SDE uses pin virtual registers for example so it is composed with another pintool that uses pin virtual registers, both tools must use the proper pin API for allocating those.

Was there a specific feature you were looking for that might be generally useful?

(Sorry for the delay in responding. I did not get notified about your comment.)

Regards,
Mark

Trackbacks (0)


Leave a comment  

To obtain technical support, please go to Software Support.
Name (required)*

Email (required; will not be displayed on this page)*

Your URL (optional)


Comment*