PS2 Syscall - Delay slot?

Discussion in 'General PS2 Discussion' started by kozarovv, May 23, 2020.

  1. 7,869
    6,071
    872
    kozarovv

    kozarovv Developer

    Joined:
    Nov 8, 2014
    Messages:
    7,869
    Likes Received:
    6,071
    Trophy Points:
    872
    Home Page:
    Hello, does Syscall instruction on PS2 is treat like a branch/jump? Does it it have delay slot like other branch instructions? I'm trying to fix something that in emulation is called "evil branches", this is code where you can find another branch in branch delay slot. Does it apply also here?

    gsdx0.94.jpg

    Edit: Nevermind, it is not. Looks like all syscall instructions have jr ra in next address. So is impossible that is delay slot.
     
    Last edited: May 23, 2020
  2. 67
    20
    37
    Anonamous

    Anonamous Member

    Joined:
    Aug 26, 2018
    Messages:
    67
    Likes Received:
    20
    Trophy Points:
    37
    Occupation:
    Electrical Engineering Student
    There is no delay slot. It may seem strange but you can think of a syscall as throwing an exception/triggering an interrupt. The processor stops executing instructions at pc, loads an address from an interrupt vector, switches to kernel mode and begins executing that.
     
    kozarovv likes this.

Share This Page