code: def _compute_memory_address(self, mem_operand):
          
          base = ReilRegisterOperand(mem_operand.base_reg.name, mem_operand.size)
  
          if mem_operand.displacement:
              address = self.temporal(mem_operand.size)
  
              if isinstance(mem_operand.displacement, ArmRegisterOperand):
                  disp = ReilRegisterOperand(mem_operand.displacement.name, mem_operand.size)
              elif isinstance(mem_operand.displacement, ArmImmediateOperand):
                  disp = ReilImmediateOperand(mem_operand.displacement.immediate, mem_operand.size)
              elif isinstance(mem_operand.displacement, ArmShiftedRegisterOperand):
                  disp = self._compute_shifted_register(mem_operand.displacement)
              else:
                  raise Exception("_compute_memory_address: displacement type unknown")
  
              if mem_operand.index_type == ARM_MEMORY_INDEX_PRE:
                  if mem_operand.disp_minus:
                      self.add(self._builder.gen_sub(base, disp, address))
                  else:
                      self.add(self._builder.gen_add(base, disp, address))
                  self.add(self._builder.gen_str(address, base))
              elif mem_operand.index_type == ARM_MEMORY_INDEX_OFFSET:
                  if mem_operand.disp_minus:
                      self.add(self._builder.gen_sub(base, disp, address))
                  else:
                      self.add(self._builder.gen_add(base, disp, address))
              elif mem_operand.index_type == ARM_MEMORY_INDEX_POST:
                  self.add(self._builder.gen_str(base, address))
                  tmp = self.temporal(base.size)
                  if mem_operand.disp_minus:
                      self.add(self._builder.gen_sub(base, disp, tmp))
                  else:
                      self.add(self._builder.gen_add(base, disp, tmp))
                  self.add(self._builder.gen_str(tmp, base))
              else:
                  raise Exception("_compute_memory_address: indexing type unknown")
  
          else:
              address = base
  
          return address
docs: Return operand memory access translation.