Exemplo n.º 1
0
 // since this operation is carried out writing sa value as unsigned value, it is necessary
 // the overriding of ID method
 public void ID() throws RAWException, IrregularWriteOperationException {
   // if the source register is valid passing his own value into a temporary register
   Register rt = cpu.getRegister(params.get(RT_FIELD));
   if (rt.getWriteSemaphore() > 0) throw new RAWException();
   TR[RT_FIELD] = rt;
   // writing on a temporary register the sa field as unsigned value
   TR[SA_FIELD].writeDoubleWord(params.get(SA_FIELD));
   // increment the semaphore of the destination register
   Register rd = cpu.getRegister(params.get(RD_FIELD));
   rd.incrWriteSemaphore();
 }