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
mupen64plus-libretro-nx
Commits
8214e9cb
Commit
8214e9cb
authored
Jan 12, 2022
by
m4xw
Browse files
Cache flush optimization for pointer invalidation
TODO: Port to ARMv7
parent
ca1deafe
Pipeline
#79178
passed with stages
in 4 minutes and 34 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
mupen64plus-core/src/device/r4300/new_dynarec/arm64/assem_arm64.c
View file @
8214e9cb
...
...
@@ -356,6 +356,9 @@ static void *kill_pointer(void *stub)
int
*
i_ptr
=
(
int
*
)((
intptr_t
)
ptr
+
offset
);
assert
((
*
i_ptr
&
0xfc000000
)
==
0x14000000
);
//b
set_jump_target
((
intptr_t
)
i_ptr
,(
intptr_t
)
stub
);
intptr_t
ptr_rx
=
((
intptr_t
)
i_ptr
-
(
intptr_t
)
base_addr
)
+
(
intptr_t
)
base_addr_rx
;
cache_flush
((
void
*
)
ptr_rx
,
(
void
*
)(
ptr_rx
+
4
));
return
i_ptr
;
}
...
...
mupen64plus-core/src/device/r4300/new_dynarec/new_dynarec.c
View file @
8214e9cb
...
...
@@ -2464,7 +2464,7 @@ static void ll_kill_pointers(struct ll_entry *head,intptr_t addr,int shift)
{
inv_debug
(
"EXP: Kill pointer at %x (%x)
\n
"
,(
intptr_t
)
head
->
addr
,
head
->
vaddr
);
uintptr_t
host_addr
=
(
intptr_t
)
kill_pointer
(
head
->
addr
);
#if NEW_DYNAREC
>
= NEW_DYNAREC_ARM
#if NEW_DYNAREC
=
= NEW_DYNAREC_ARM
needs_clear_cache
[(
host_addr
-
(
uintptr_t
)
base_addr
)
>>
17
]
|=
1
<<
(((
host_addr
-
(
uintptr_t
)
base_addr
)
>>
12
)
&
31
);
#else
/* avoid unused variable warning */
...
...
@@ -2805,7 +2805,7 @@ static void invalidate_page(u_int page)
while
(
head
!=
NULL
)
{
inv_debug
(
"INVALIDATE: kill pointer to %x (%x)
\n
"
,
head
->
vaddr
,(
intptr_t
)
head
->
addr
);
uintptr_t
host_addr
=
(
intptr_t
)
kill_pointer
(
head
->
addr
);
#if NEW_DYNAREC
>
= NEW_DYNAREC_ARM
#if NEW_DYNAREC
=
= NEW_DYNAREC_ARM
needs_clear_cache
[(
host_addr
-
(
uintptr_t
)
base_addr
)
>>
17
]
|=
1
<<
(((
host_addr
-
(
uintptr_t
)
base_addr
)
>>
12
)
&
31
);
#else
/* avoid unused variable warning */
...
...
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