Tom Kelliher, CS 240
Feb. 4, 2004
Distribute shell account info for phoenix.
AIM screen name.
Read 3.5.
Calculating performance.
Conditional instructions in MIPS.
Things to consider:
Consider your favorite HLL. What classes of instructions (operations) are required?
Now, consider a multi-user OS such as Unix? What additional classes of instructions are required?
Any general purpose architecture must support these classes.
Consider the two simplest:
add subConsider an HLL statement:
f = (g + h) - (i + j);
add a, b, c # This, BTW, is a comment. sub a, a, bDe-compile each of the following:
add a, b, c add a, a, d add a, a, eDe-compile further into a single HLL statement.
Compile each of the following:
a = b + c; d = a - e; f = (g + h) - (i + j);
Consider operands within an HLL:
#include <stdio.h>
int main()
{
int foo = 1234;
printf("%d, %p\n", foo, &foo);
return 0;
}
A variable is an abstraction which the compiler/OS binds to a memory
address.
RISC instruction sets don't ordinarily support memory operands. Why not?
Where are the operands? Registers.