ARM.SoC.Architecture

We have just looked at a number of ways of specifying

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: include instructions in the following categories: Data processing instructions such as add, subtract and multiply. Data movement instructions that copy data from one place in memory to another, or from memory to the processor's registers, and so on. Control flow instructions that switch execution from one part of the program to another, possibly depending on data values. Special instructions to control the processor's execution state, for instance to switch into a privileged mode to carry out an operating system function. Sometimes an instruction will fit into more than one of these categories. For example, a 'decrement and branch if non-zero' instruction, which is useful for controlling program loops, does some data processing on the loop variable and also performs a control flow function. Similarly, a data processing instruction which fetches an operand from an address in memory and places its result in a register can be viewed as performing a data movement function. Instruction types Orthogonal instructions An instruction set is said to be orthogonal if each choice in the building of an instruction is independent of the other choices. Since add and subtract are similar operations, one would expect to be able to use them in similar contexts. If add uses a 3-address format with register addresses, so should subtract, and in neither case should there be any peculiar restrictions on the registers which may be used. An orthogonal instruction set is easier for the assembly language programmer to learn and easier for the compiler writer to target. The hardware implementation will usually be more efficient too. Instruction set design 17 Addressing modes When accessing an operand for a data processing or movement instruction, there are several standard techniques used to specify the desired location. Most processors support several of these addressing modes (though few support all of them): 1. Immediate addressing: the desired value is presented as a binary value in the instruction. 2. Absolute addressing: the instruction contains the ful...
View Full Document

Ask a homework question - tutors are online