Skip to main content

Abstract

There is little exploitation of the SIMD instructions described in the previous chapter because of relatively poor compiler support. When the MMX and SSE instructions became available, Intel supplied a C compiler that had low-level extensions allowing the extended instructions to be used. Intel terms these extensions ‘assembler intrinsics’. Syntactically these look like C functions but they are translated one for one into equivalent assembler instructions. The use of assembler intrinsics simplifies the process of developing MMX code, in that programmers use a single tool — the C compiler, and do not need to concern themselves with low-level linkage issues. However, the other disadvantages of assembler coding remain. The Intel C compiler comes with a set of C++ classes that correspond to the fundamental types supported by the MMX and SIMD instruction sets. The SIMD classes do a good job of presenting the underlying capabilities of the architecture within the context of the C language. The code produced is also efficient. However, although the C++ code has a higher level of expression than assembler intrinsics, it is not portable to other processors. The same approach of essentially allowing assembler inserts into a high-level language was adopted by other compilers: TMT-Pascal, Free-Pascal and a release of gcc for the G4 processor used in the iMac.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 159.00
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 109.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag London

About this chapter

Cite this chapter

Cockshott, P., Renfrew, K. (2004). SIMD Programming in Assembler and C. In: SIMD Programming Manual for Linux and Windows. Springer Professional Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3862-4_3

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-3862-4_3

  • Publisher Name: Springer, London

  • Print ISBN: 978-1-84996-920-8

  • Online ISBN: 978-1-4471-3862-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics