Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
flycast
Commits
6a940fde
Commit
6a940fde
authored
Apr 24, 2020
by
Flyinghead
Browse files
arm64: check CpuRunning at end of each timeslice
fix hang when exiting service menu in kofnw. Issue
#867
parent
11d8e45d
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/rec-ARM64/ngen_arm64.S
View file @
6a940fde
...
...
@@ -19,8 +19,7 @@ ngen_LinkBlock_Generic_stub:
.
hidden
ngen_LinkBlock_Shared_stub
.
globl
ngen_LinkBlock_Shared_stub
ngen_LinkBlock_Shared_stub
:
mov
x0
,
lr
sub
x0
,
x0
,
#
4
//
go
before
the
call
sub
x0
,
lr
,
#
4
//
go
before
the
call
bl
rdv_LinkBlock
//
returns
an
RX
addr
br
x0
...
...
core/rec-ARM64/rec_arm64.cpp
View file @
6a940fde
...
...
@@ -65,7 +65,7 @@ static jmp_buf jmp_env;
static
u32
cycle_counter
;
static
void
(
*
mainloop
)(
void
*
context
);
static
void
(
*
arm64_intc_sched
)();
static
int
(
*
arm64_intc_sched
)();
static
void
(
*
arm64_no_update
)();
void
(
*
ngen_FailedToFindBlock
)();
...
...
@@ -324,6 +324,12 @@ public:
Label
cycles_remaining
;
B
(
&
cycles_remaining
,
pl
);
GenCall
(
*
arm64_intc_sched
);
Label
cpu_running
;
Cbnz
(
w0
,
&
cpu_running
);
Mov
(
w29
,
block
->
vaddr
);
Str
(
w29
,
sh4_context_mem_operand
(
&
next_pc
));
GenBranch
(
*
arm64_no_update
);
Bind
(
&
cpu_running
);
Bind
(
&
cycles_remaining
);
for
(
size_t
i
=
0
;
i
<
block
->
oplist
.
size
();
i
++
)
...
...
@@ -1333,8 +1339,8 @@ public:
Label
intc_sched
;
Label
end_mainloop
;
//
void
intc_sched()
arm64_intc_sched
=
GetCursorAddress
<
void
(
*
)()
>
();
//
int
intc_sched()
arm64_intc_sched
=
GetCursorAddress
<
int
(
*
)()
>
();
B
(
&
intc_sched
);
// void no_update()
...
...
@@ -1421,6 +1427,7 @@ public:
GenCallRuntime
(
UpdateSystem
);
Mov
(
lr
,
x29
);
Cbnz
(
w0
,
&
do_interrupts
);
Ldr
(
w0
,
MemOperand
(
x28
,
offsetof
(
Sh4Context
,
CpuRunning
)));
Ret
();
Bind
(
&
do_interrupts
);
...
...
@@ -2086,7 +2093,7 @@ private:
CanonicalParamType
type
;
shil_param
*
prm
;
};
vector
<
CC_PS
>
CC_pars
;
std
::
vector
<
CC_PS
>
CC_pars
;
std
::
vector
<
const
WRegister
*>
call_regs
;
std
::
vector
<
const
XRegister
*>
call_regs64
;
std
::
vector
<
const
VRegister
*>
call_fregs
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment