Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What kind of projects (besides the obvious OS stuff) use assembly language?

Seemingly, no one uses assembly nowadays other than to develop device drivers, or the very core of OS kernels etc. Anyone has knowledge of it being currently used for other things?

I mean PC-style and bigger hardware, not embedded stuff with teeny tiny processors.

like image 755
JCCyC Avatar asked Jun 19 '09 18:06

JCCyC


2 Answers

Boost, being as modern C++ as it is, uses inline assembly for low-level performance-critical bits like atomic shared counters.

Edit: as @TokenMacGuy correctly notes, "performance" is a wrong word here. Boost uses assembly language for things that cannot be accomplished in standard C++ such as atomics (and compiler intrinsics are not available for some reason.)

like image 199
Nikolai Fetissov Avatar answered Sep 20 '22 15:09

Nikolai Fetissov


More or less obviously, assembly programming is needed for compiler back-ends and related technologies like dynamic recompiling CPU simulators.

Assembly language programming is also used with some frequency for video game programming, to take advantage of new CPU features that are not yet well supported by current compilers. However, this is kind of rare, these days, especially since on PC's, there are so many different CPU's to support. I expect this is a bit more common on consoles with uniform hardware, though.

Edit: These days games do most of their calculation in a GPU. Getting the most out of these compute resources is not always possible using just OpenGL or DirectX, and the vendors for these processors provide a host of tools for squeezing more out of their hardware. Although Cuda or OpenCL are well known terms, they are still at a relatively high level of abstraction over the GPU hardware, filling in a role that is very similar to the role of C on typical (Von Neuman) CPU's. A look at the developer pages for these products and you will find dozens of ways to use GPU compute resources optimally, and at every level of abstraction.

like image 38
SingleNegationElimination Avatar answered Sep 20 '22 15:09

SingleNegationElimination