Skip to content

SparcInstructionSet

Felix S. Klock II edited this page Jul 28, 2013 · 1 revision

The page Will links to as a description of the SPARC instruction set is pretty much useless for hacking SPARC assembly. (for completeness: http://www.eecs.harvard.edu/~nr/toolkit/specs/sparc.html)

The real SPARC instruction set architecture manual is available online:

http://www.sparc.com/standards/V8.pdf

The first couple sections go on about traps and memory models and so on, appendix B is a good reference to SPARC instructions.

And of course, source:trunk/larceny_src/src/Asm/Sparc/sparcasm2.sch tells you what instructions you can emit. You can hunt around source:trunk/larceny_src/src/Asm/Sparc/sparcasm.sch in the definition of sparc-instruction to find out exactly what arguments a particular instruction's procedure takes, or you can try to find another use of the instruction in another operation's code.

There are some gotchas in the SPARC architecture:

  • Floating point comparisons: you must leave a one-instruction gap between an fp operation that sets the fp condition codes register (like fcmpd) and an fp operation that attempts to use it (like fbge). See page 146 in the manual.
Clone this wiki locally