You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
This is the last version that compiles fine for iOS… The latest commit fails with:
Undefined symbols for architecture arm64:
"___clear_cache", referenced from:
_sh2_drc_init in compiler.o
_dr_rm_block_entry in compiler.o
_sh2_translate in compiler.o
_dr_block_link in compiler.o
ld: symbol(s) not found for architecture arm64
cpu/sh2/compiler.c:825:31: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
host_instructions_updated(jump, jump + jsz, ((uintptr_t)jump & 0x0f) + jsz-1 > 0x0f);
^~~~
cpu/sh2/../drc/emit_arm64.c:1177:42: note: expanded from macro 'host_instructions_updated'
do { if (force) __builtin___clear_cache(base, end); } while (0)
^~~~
cc -arch arm64 -marm -miphoneos-version-min=8.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk -c -ocpu/sh2/mame/sh2pico.o cpu/sh2/mame/sh2pico.c -I platform/libretro/libretro-common/include -I platform/libretro/libretro-common/include/compat -I platform/libretro/libretro-common/include/encodings -I platform/libretro/libretro-common/include/streams -I platform/libretro/libretro-common/include/string -I platform/libretro/libretro-common/include/vfs -DGIT_VERSION=\"46902e0\" -marm -DARM -D__aarch64__=1 -DIOS -miphoneos-version-min=8.0 -DNO_ZLIB -D__LIBRETRO__ -fPIC -O3 -DNDEBUG -I. -falign-functions=2 -Izlib -DEMU_F68K -D_USE_CZ80 -DDRC_SH2
cpu/sh2/compiler.c:825:37: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
host_instructions_updated(jump, jump + jsz, ((uintptr_t)jump & 0x0f) + jsz-1 > 0x0f);
^~~~~~~~~~
cpu/sh2/../drc/emit_arm64.c:1177:48: note: expanded from macro 'host_instructions_updated'
do { if (force) __builtin___clear_cache(base, end); } while (0)
^~~
cpu/sh2/compiler.c:862:33: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
host_instructions_updated(jump, jump + jsz, 1);
^~~~
cpu/sh2/../drc/emit_arm64.c:1177:42: note: expanded from macro 'host_instructions_updated'
do { if (force) __builtin___clear_cache(base, end); } while (0)
^~~~
cpu/sh2/compiler.c:862:39: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
host_instructions_updated(jump, jump + jsz, 1);
^~~~~~~~~~
cpu/sh2/../drc/emit_arm64.c:1177:48: note: expanded from macro 'host_instructions_updated'
do { if (force) __builtin___clear_cache(base, end); } while (0)
^~~
clang: warning: argument unused during compilation: '-mno-thumb' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mno-thumb' [-Wunused-command-line-argument]
cpu/sh2/compiler.c:2781:12: warning: result of comparison of constant 4294967295 with expression of type 'sh2_reg_e' is always false [-Wtautological-constant-out-of-range-compare]
if (rd == SHR_TMP) {
~~ ^ ~~~~~~~
cpu/sh2/compiler.c:2797:12: warning: result of comparison of constant 4294967295 with expression of type 'sh2_reg_e' is always false [-Wtautological-constant-out-of-range-compare]
if (rd == SHR_TMP)
~~ ^ ~~~~~~~
cpu/sh2/compiler.c:2832:10: warning: result of comparison of constant 4294967295 with expression of type 'sh2_reg_e' is always false [-Wtautological-constant-out-of-range-compare]
if (rd == SHR_TMP)
~~ ^ ~~~~~~~
cpu/sh2/compiler.c:2854:10: warning: result of comparison of constant 4294967295 with expression of type 'sh2_reg_e' is always false [-Wtautological-constant-out-of-range-compare]
if (rd == SHR_TMP) {
~~ ^ ~~~~~~~
cpu/sh2/compiler.c:2864:10: warning: result of comparison of constant 4294967295 with expression of type 'sh2_reg_e' is always true [-Wtautological-constant-out-of-range-compare]
if (rd != SHR_TMP)
~~ ^ ~~~~~~~
cpu/sh2/compiler.c:2906:10: warning: result of comparison of constant 4294967295 with expression of type 'sh2_reg_e' is always false [-Wtautological-constant-out-of-range-compare]
if (rd == SHR_TMP)
~~ ^ ~~~~~~~
cpu/sh2/compiler.c:2935:10: warning: result of comparison of constant 4294967295 with expression of type 'sh2_reg_e' is always true [-Wtautological-constant-out-of-range-compare]
if (rd != SHR_TMP)
~~ ^ ~~~~~~~
cpu/sh2/compiler.c:5152:29: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
host_instructions_updated(block_entry_ptr, tcache_ptr, 1);
^~~~~~~~~~~~~~~
cpu/sh2/../drc/emit_arm64.c:1177:42: note: expanded from macro 'host_instructions_updated'
do { if (force) __builtin___clear_cache(base, end); } while (0)
^~~~
cpu/sh2/compiler.c:5152:46: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
host_instructions_updated(block_entry_ptr, tcache_ptr, 1);
^~~~~~~~~~
cpu/sh2/../drc/emit_arm64.c:1177:48: note: expanded from macro 'host_instructions_updated'
do { if (force) __builtin___clear_cache(base, end); } while (0)
^~~
cpu/sh2/compiler.c:5888:31: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
host_instructions_updated(tcache, tcache_ptr, 1);
^~~~~~
cpu/sh2/../drc/emit_arm64.c:1177:42: note: expanded from macro 'host_instructions_updated'
do { if (force) __builtin___clear_cache(base, end); } while (0)
^~~~
cpu/sh2/compiler.c:5888:39: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
host_instructions_updated(tcache, tcache_ptr, 1);
^~~~~~~~~~
cpu/sh2/../drc/emit_arm64.c:1177:48: note: expanded from macro 'host_instructions_updated'
do { if (force) __builtin___clear_cache(base, end); } while (0)
^~~
15 warnings generated.
On Thu, Dec 3, 2020 at 7:27 PM Weedy Weed Smoker ***@***.***> wrote:
This is the last version that compiles fine for iOS… The latest commit
fails with:
Undefined symbols for architecture arm64:
"___clear_cache", referenced from:
_sh2_drc_init in compiler.o
_dr_rm_block_entry in compiler.o
_sh2_translate in compiler.o
_dr_block_link in compiler.o
ld: symbol(s) not found for architecture arm64
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<e7e09a2#commitcomment-44780682>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHR2L4RTPPE67ENVLVNZLSLSS7KAFANCNFSM4UMLTKTA>
.
On Thu, Dec 3, 2020 at 10:39 PM Kai-Uwe Bloem ***@***.***> wrote:
I believe this was fixed by irixxxx/picodrive/69c2251. Could you please
try to import this and do a cross check?
On Thu, Dec 3, 2020 at 7:27 PM Weedy Weed Smoker ***@***.***>
wrote:
> This is the last version that compiles fine for iOS… The latest commit
> fails with:
>
> Undefined symbols for architecture arm64:
>
> "___clear_cache", referenced from:
>
> _sh2_drc_init in compiler.o
>
> _dr_rm_block_entry in compiler.o
>
> _sh2_translate in compiler.o
>
> _dr_block_link in compiler.o
>
> ld: symbol(s) not found for architecture arm64
>
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <e7e09a2#commitcomment-44780682>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHR2L4RTPPE67ENVLVNZLSLSS7KAFANCNFSM4UMLTKTA>
> .
>
The reason will be displayed to describe this comment to others. Learn more.
Could you try this on as many apple platforms you have at your disposal?
diff --git a/platform/libretro/libretro.c b/platform/libretro/libretro.c
index 23cd3df..ffbe31d 100644
--- a/platform/libretro/libretro.c
+++ b/platform/libretro/libretro.c
@@ -113,6 +113,15 @@ void cache_flush_d_inval_i(void *start, void *end)
#endif
}
+#ifdef __MACH__
+void __clear_cache(void *start, void *end)
+{
+ size_t len = (char *)end - (char *)start;
+ sys_dcache_flush(start, len);
+ sys_icache_invalidate(start, len);
+}
+#endif
+
#ifdef _WIN32
/* mmap() replacement for Windows
*
On Thu, Dec 3, 2020 at 10:42 PM Kai-Uwe Bloem ***@***.***> wrote:
Oh sorry, I overlooked it's arm64.
On Thu, Dec 3, 2020 at 10:39 PM Kai-Uwe Bloem ***@***.***> wrote:
> I believe this was fixed by irixxxx/picodrive/69c2251. Could you please
> try to import this and do a cross check?
>
> On Thu, Dec 3, 2020 at 7:27 PM Weedy Weed Smoker <
> ***@***.***> wrote:
>
>> This is the last version that compiles fine for iOS… The latest commit
>> fails with:
>>
>> Undefined symbols for architecture arm64:
>>
>> "___clear_cache", referenced from:
>>
>> _sh2_drc_init in compiler.o
>>
>> _dr_rm_block_entry in compiler.o
>>
>> _sh2_translate in compiler.o
>>
>> _dr_block_link in compiler.o
>>
>> ld: symbol(s) not found for architecture arm64
>>
>>
>> —
>> You are receiving this because you authored the thread.
>> Reply to this email directly, view it on GitHub
>> <e7e09a2#commitcomment-44780682>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AHR2L4RTPPE67ENVLVNZLSLSS7KAFANCNFSM4UMLTKTA>
>> .
>>
>
e7e09a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the last version that compiles fine for iOS… The latest commit fails with:
@irixxxx @notaz @twinaphex
BTW, here are the preceding warnings:
e7e09a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e7e09a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e7e09a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e7e09a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok! This compiles fine for iOS with the latest commit:
I will try for macOS now…
e7e09a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@irixxxx On macOS 10.14/Xcode 10, it currently fails at linking (with or without those changes) with:
ld: library not found for -lgcc_s.10.4
But it compiles fine by changing
SHARED += -mmacosx-version-min=10.1
toSHARED += -mmacosx-version-min=10.6
inMakefile.libretro
e7e09a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make up a proper fix in my repo. Synchronization with libretro is presently upcoming, so you should see it rsn.