Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline assembly error: Instruction requires arm-mode #231

Open
mbekkomo opened this issue Jun 14, 2024 · 6 comments
Open

Inline assembly error: Instruction requires arm-mode #231

mbekkomo opened this issue Jun 14, 2024 · 6 comments

Comments

@mbekkomo
Copy link

I've stumbled upon this error when building libck for Termux with clang on arm.

clang error
In file included from /home/builder/.termux-build/libck/src/src/ck_ec.c:1:
In file included from /home/builder/.termux-build/libck/src/include/ck_ec.h:253:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:150:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_LOAD(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:143:19: note: expanded from macro 'CK_PR_DOUBLE_LOAD'
        __asm __volatile("ldrexd %0, [%1]"      \
                         ^
<inline asm>:1:2: note: instantiated into assembly here
        ldrexd r2, [r0]
        ^
In file included from /home/builder/.termux-build/libck/src/src/ck_ec.c:1:
In file included from /home/builder/.termux-build/libck/src/include/ck_ec.h:253:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:233:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_CAS_VALUE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:217:23: note: expanded from macro 'CK_PR_DOUBLE_CAS_VALUE'
        __asm__ __volatile__("1:"                               \
                             ^
<inline asm>:1:4: note: instantiated into assembly here
        1:ldrexd r4, [r12];cmp    r4, r2;ittt eq;cmpeq  r5, r3;strexdeq r6, r0, [r12];cmpeq  r6, #1;beq 1b;
          ^
In file included from /home/builder/.termux-build/libck/src/src/ck_ec.c:1:
In file included from /home/builder/.termux-build/libck/src/include/ck_ec.h:253:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:233:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_CAS_VALUE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:217:23: note: expanded from macro 'CK_PR_DOUBLE_CAS_VALUE'
        __asm__ __volatile__("1:"                               \
                             ^
<inline asm>:1:57: note: instantiated into assembly here
        1:ldrexd r4, [r12];cmp    r4, r2;ittt eq;cmpeq  r5, r3;strexdeq r6, r0, [r12];cmpeq  r6, #1;beq 1b;
                                                               ^
In file included from /home/builder/.termux-build/libck/src/src/ck_ec.c:1:
In file included from /home/builder/.termux-build/libck/src/include/ck_ec.h:253:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:150:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_LOAD(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:143:19: note: expanded from macro 'CK_PR_DOUBLE_LOAD'
        __asm __volatile("ldrexd %0, [%1]"      \
                         ^
<inline asm>:1:2: note: instantiated into assembly here
        ldrexd r2, [r10]
        ^
In file included from /home/builder/.termux-build/libck/src/src/ck_ec.c:1:
In file included from /home/builder/.termux-build/libck/src/include/ck_ec.h:253:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:233:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_CAS_VALUE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:217:23: note: expanded from macro 'CK_PR_DOUBLE_CAS_VALUE'
        __asm__ __volatile__("1:"                               \
                             ^
<inline asm>:1:4: note: instantiated into assembly here
        1:ldrexd r0, [r10];cmp    r0, r8;ittt eq;cmpeq  r1, r9;strexdeq r2, r4, [r10];cmpeq  r2, #1;beq 1b;
          ^
In file included from /home/builder/.termux-build/libck/src/src/ck_ec.c:1:
In file included from /home/builder/.termux-build/libck/src/include/ck_ec.h:253:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:233:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_CAS_VALUE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:217:23: note: expanded from macro 'CK_PR_DOUBLE_CAS_VALUE'
        __asm__ __volatile__("1:"                               \
                             ^
<inline asm>:1:57: note: instantiated into assembly here
        1:ldrexd r0, [r10];cmp    r0, r8;ittt eq;cmpeq  r1, r9;strexdeq r2, r4, [r10];cmpeq  r2, #1;beq 1b;
                                                               ^
In file included from /home/builder/.termux-build/libck/src/src/ck_ec.c:1:
In file included from /home/builder/.termux-build/libck/src/include/ck_ec.h:253:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:150:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_LOAD(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:143:19: note: expanded from macro 'CK_PR_DOUBLE_LOAD'
        __asm __volatile("ldrexd %0, [%1]"      \
                         ^
<inline asm>:1:2: note: instantiated into assembly here
        ldrexd r0, [r10]
        ^
In file included from /home/builder/.termux-build/libck/src/src/ck_ec.c:1:
In file included from /home/builder/.termux-build/libck/src/include/ck_ec.h:253:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:150:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_LOAD(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:143:19: note: expanded from macro 'CK_PR_DOUBLE_LOAD'
        __asm __volatile("ldrexd %0, [%1]"      \
                         ^
<inline asm>:1:2: note: instantiated into assembly here
        ldrexd r8, [r0]
        ^
In file included from /home/builder/.termux-build/libck/src/src/ck_ec.c:1:
In file included from /home/builder/.termux-build/libck/src/include/ck_ec.h:253:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:150:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_LOAD(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:143:19: note: expanded from macro 'CK_PR_DOUBLE_LOAD'
        __asm __volatile("ldrexd %0, [%1]"      \
                         ^
<inline asm>:1:2: note: instantiated into assembly here
        ldrexd r8, [r0]
        ^
In file included from /home/builder/.termux-build/libck/src/src/ck_ec.c:1:
In file included from /home/builder/.termux-build/libck/src/include/ck_ec.h:253:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:150:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_LOAD(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:143:19: note: expanded from macro 'CK_PR_DOUBLE_LOAD'
        __asm __volatile("ldrexd %0, [%1]"      \
                         ^
<inline asm>:1:2: note: instantiated into assembly here
        ldrexd r4, [r6]
        ^
In file included from /home/builder/.termux-build/libck/src/src/ck_ec.c:1:
In file included from /home/builder/.termux-build/libck/src/include/ck_ec.h:253:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:150:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_LOAD(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:143:19: note: expanded from macro 'CK_PR_DOUBLE_LOAD'
        __asm __volatile("ldrexd %0, [%1]"      \
                         ^
<inline asm>:1:2: note: instantiated into assembly here
        ldrexd r0, [r6]
        ^
11 errors generated.
make[1]: *** [Makefile:34: ck_ec.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:193:10: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "ldrexd        %0, [%2]\n"             \
                          ^
<inline asm>:2:1: note: instantiated into assembly here
ldrexd  r10, [r6]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:194:6: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "strexd        %1, %3, [%2]\n"         \
                          ^
<inline asm>:3:1: note: instantiated into assembly here
strexd  r1, r4, [r6]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:193:10: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "ldrexd        %0, [%2]\n"             \
                          ^
<inline asm>:2:1: note: instantiated into assembly here
ldrexd  r4, [r1]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:194:6: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "strexd        %1, %3, [%2]\n"         \
                          ^
<inline asm>:3:1: note: instantiated into assembly here
strexd  r3, r10, [r1]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:193:10: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "ldrexd        %0, [%2]\n"             \
                          ^
<inline asm>:2:1: note: instantiated into assembly here
ldrexd  r4, [r1]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:194:6: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "strexd        %1, %3, [%2]\n"         \
                          ^
<inline asm>:3:1: note: instantiated into assembly here
strexd  r3, r10, [r1]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:193:10: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "ldrexd        %0, [%2]\n"             \
                          ^
<inline asm>:2:1: note: instantiated into assembly here
ldrexd  r2, [r6]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:194:6: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "strexd        %1, %3, [%2]\n"         \
                          ^
<inline asm>:3:1: note: instantiated into assembly here
strexd  r1, r4, [r6]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:193:10: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "ldrexd        %0, [%2]\n"             \
                          ^
<inline asm>:2:1: note: instantiated into assembly here
ldrexd  r2, [r0]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:194:6: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "strexd        %1, %3, [%2]\n"         \
                          ^
<inline asm>:3:1: note: instantiated into assembly here
strexd  r1, r10, [r0]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:193:10: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "ldrexd        %0, [%2]\n"             \
                          ^
<inline asm>:2:1: note: instantiated into assembly here
ldrexd  r4, [r0]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:194:6: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "strexd        %1, %3, [%2]\n"         \
                          ^
<inline asm>:3:1: note: instantiated into assembly here
strexd  r1, r2, [r0]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:150:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_LOAD(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:143:19: note: expanded from macro 'CK_PR_DOUBLE_LOAD'
        __asm __volatile("ldrexd %0, [%1]"      \
                         ^
<inline asm>:1:2: note: instantiated into assembly here
        ldrexd r0, [r2]
        ^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:193:10: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "ldrexd        %0, [%2]\n"             \
                          ^
<inline asm>:2:1: note: instantiated into assembly here
ldrexd  r4, [r3]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:194:6: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "strexd        %1, %3, [%2]\n"         \
                          ^
<inline asm>:3:1: note: instantiated into assembly here
strexd  r1, r8, [r3]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:193:10: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "ldrexd        %0, [%2]\n"             \
                          ^
<inline asm>:2:1: note: instantiated into assembly here
ldrexd  r4, [r8]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:203:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_STORE(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:194:6: note: expanded from macro 'CK_PR_DOUBLE_STORE'
                         "strexd        %1, %3, [%2]\n"         \
                          ^
<inline asm>:3:1: note: instantiated into assembly here
strexd  r0, r2, [r8]
^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:150:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_LOAD(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:143:19: note: expanded from macro 'CK_PR_DOUBLE_LOAD'
        __asm __volatile("ldrexd %0, [%1]"      \
                         ^
<inline asm>:1:2: note: instantiated into assembly here
        ldrexd r2, [lr]
        ^
In file included from /home/builder/.termux-build/libck/src/src/ck_ht.c:28:
In file included from /home/builder/.termux-build/libck/src/include/ck_ht.h:30:
In file included from /home/builder/.termux-build/libck/src/include/ck_pr.h:64:
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:150:1: error: instruction requires: arm-mode
CK_PR_DOUBLE_LOAD(uint64_t, 64)
^
/home/builder/.termux-build/libck/src/include/gcc/arm/ck_pr.h:143:19: note: expanded from macro 'CK_PR_DOUBLE_LOAD'
        __asm __volatile("ldrexd %0, [%1]"      \
                         ^
<inline asm>:1:2: note: instantiated into assembly here
        ldrexd r0, [r6]
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
@cognet
Copy link
Contributor

cognet commented Jun 14, 2024

Hi @cattokomo,

After a bit of investigating, this instruction should definitely be available even when compiling for Thumb2. I suspect maybe your clang is targetting Armv7-M. What is the target provided by clang -v ?

@mbekkomo
Copy link
Author

Hello @cognet.

Here's the output of clang -v.

~ $ clang -v
clang version 18.1.7
Target: armv7a-unknown-linux-android24
Thread model: posix
InstalledDir: /data/data/com.termux/files/usr/bin

@cognet
Copy link
Contributor

cognet commented Aug 23, 2024

@cattokomo sorry for taking so long to respond, I'd like to fix that, but it sounds like a Termux-specific thing, can you help me reproduce the problem? I assume I have to install Termux on an Android device, but my phone has a 64bits arm, so it brings a 64bits compiler, and that seems to work fine here. Do you know of a way I could get access to a Termux running on 32bits arm?
Thank you!

@mbekkomo
Copy link
Author

@cattokomo sorry for taking so long to respond, I'd like to fix that, but it sounds like a Termux-specific thing, can you help me reproduce the problem? I assume I have to install Termux on an Android device, but my phone has a 64bits arm, so it brings a 64bits compiler, and that seems to work fine here. Do you know of a way I could get access to a Termux running on 32bits arm? Thank you!

I can try it on my device, it's running on 32 bit mode.

@cognet
Copy link
Contributor

cognet commented Aug 24, 2024

@cattokomo ideally I'd need a shell on it, to try various things

@twaik
Copy link

twaik commented Oct 19, 2024

You can try to use termux-docker. It is not the best solution since it uses qemu under the hood (if you use aarch64 or armv7) but it will give you a kind of device for tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants