1 to the value 2c code to simulate the write of the new value to register g2 3a code to simulate the read of the value in register g1 which is the address we will store to 3b code to do the hash lookup see below 3c code to simulate the read of the value in register g2 3d code which uses the pointer supplied by the hash lookup to store the value the code that makes the hash lookup for the load and the store instructions follows names starting with a lower case r are all registers that should be mapped to real registers here we use the more descriptive names for clarity words with only upper case letters are constants that are actually numbers again we use more descriptive names rdata is a register that points to a data section in the simulator program from where we can get the address of the hash table the register raddr holds the virtual address that we want to lookup the hash lookup code comprises in the example below of a relatively lengthy of nine lines of code note that this code differs slightly from the hash table lookup code described in ref1 because that code was aimed at simulating a sparc v8 architecture whereas this sample code is indented to simulate a sparc v9 architecture for instance the idd instruction cannot be used to load two 64.