summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2014-09-07 16:36:25 -0400
committercomex <comexk@gmail.com>2014-09-17 19:56:09 -0400
commitb597ec3e081a289d9ac782586617a876535183d6 (patch)
tree01dec9e9ed8c7f91b958d4a51dce04cf073bb250 /Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
parent558dee84ca3f242a8da07758668f1f7fff778ac9 (diff)
Opportunistically predict BLR destinations using RET.
When executing a BL-type instruction, push the new LR onto the stack, then CALL the dispatcher or linked block rather than JMPing to it. When executing BLR, compare [rsp+8] to LR, and RET if it's right, which it usually will be unless the thread was switched out. If it's not right, reset RSP to avoid overflow. This both saves a trip through the dispatcher and improves branch prediction. There is a small possibility of stack overflow anyway, which should be handled... *yawn*
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp')
0 files changed, 0 insertions, 0 deletions