SPARC instructions


The first thing to remember when looking at SPARC instructions is that they are constrained by many factors. One we've already seen. Addressing must be done correctly. Another restriction is placed on the instructions themselves : they must fit into one word exactly. That means that all instruction codes are exactly 32 bits long, and will always start on a 4-byte boundary (an address where the lower two bits are always zeroes). Readers who have some previous experience with assembly language may be wondering how 32-bit addresses or constants are loaded into registers. The answer is, they aren't ” not in one instruction, anyway. More on this later.

Yet another characteristic of SPARC instructions is that no instruction accesses memory directly with an address in the instruction code itself. Any memory reference requires an address in a register as everything is done register-indirect. This means that the address of a data value must be loaded into a register before the data can be fetched . When you consider that it usually takes more than one instruction to load up an address, you can see that referencing data in memory is a fairly complex and expensive operation. No wonder registers are popular, and no wonder there are lots of them!



PANIC. UNIX System Crash Dump Analysis Handbook
PANIC! UNIX System Crash Dump Analysis Handbook (Bk/CD-ROM)
ISBN: 0131493868
EAN: 2147483647
Year: 1994
Pages: 289
Authors: Chris Drake

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net