Beispiel #1
0
def execute_syscall( s, inst ):
  #v0 = reg_map['v0']
  #syscall_number = s.rf[ v0 ]
  #if syscall_number in syscall_funcs:
  #  syscall_funcs[ syscall_number ]( s )
  #else:
  #  print "WARNING: syscall not implemented!", syscall_number
  do_syscall( s )
  s.pc += 4
Beispiel #2
0
def execute_scall( s, inst ):
  # test pass/fail
  if s.testbin:
    status = s.rf[ 28 ] >> 1
    if status:
      print "  [ FAILED ] %s (test #%s)" % (s.exe_name, status)
    else:
      print "  [ passed ] %s" % s.exe_name
    s.running = False
  else:
    do_syscall( s )
  s.pc += 4
Beispiel #3
0
def execute_scall(s, inst):
    # test pass/fail
    if s.testbin:
        status = s.rf[28] >> 1
        if status:
            print "  [ FAILED ] %s (test #%s)" % (s.exe_name, status)
        else:
            print "  [ passed ] %s" % s.exe_name
        s.running = False
    else:
        do_syscall(s)
    s.pc += 4
Beispiel #4
0
def execute_swi(s, inst):
    if condition_passed(s, inst.cond()):
        do_syscall(s, s.rf[7])
    s.rf[PC] = s.fetch_pc() + 4
Beispiel #5
0
def execute_swi( s, inst ):
  if condition_passed( s, inst.cond ):
    do_syscall( s )
  s.rf[PC] = s.fetch_pc() + 4