hxcpp icon indicating copy to clipboard operation
hxcpp copied to clipboard

unknown token in expression in GC code for ARM64 arch

Open darmie opened this issue 3 years ago • 1 comments

Setting flag to HXCPP_ARCH=arm64 on Mac M1 causes the following problem:

Error: /usr/local/lib/haxe/lib/hxcpp/git/src/hx/gc/GcRegCapture.cpp:69:12: error: unknown token in expression
      asm ("movq %%rbx, %0\n\t" : "=r" (regBx) );
           ^
<inline asm>:1:7: note: instantiated into assembly here
        movq %rbx, x8
             ^
/usr/local/lib/haxe/lib/hxcpp/git/src/hx/gc/GcRegCapture.cpp:69:12: error: invalid operand
      asm ("movq %%rbx, %0\n\t" : "=r" (regBx) );
           ^
<inline asm>:1:7: note: instantiated into assembly here
        movq %rbx, x8
             ^
/usr/local/lib/haxe/lib/hxcpp/git/src/hx/gc/GcRegCapture.cpp:70:12: error: unknown token in expression
      asm ("movq %%rbp, %0\n\t" : "=r" (regBp) );
           ^
<inline asm>:1:7: note: instantiated into assembly here
        movq %rbp, x9
             ^
/usr/local/lib/haxe/lib/hxcpp/git/src/hx/gc/GcRegCapture.cpp:70:12: error: invalid operand
      asm ("movq %%rbp, %0\n\t" : "=r" (regBp) );
           ^
<inline asm>:1:7: note: instantiated into assembly here
        movq %rbp, x9
             ^
/usr/local/lib/haxe/lib/hxcpp/git/src/hx/gc/GcRegCapture.cpp:72:12: error: unknown token in expression
      asm ("movq %%r12, %0\n\t" : "=r" (reg12) );
           ^
<inline asm>:1:7: note: instantiated into assembly here
        movq %r12, x8
             ^
/usr/local/lib/haxe/lib/hxcpp/git/src/hx/gc/GcRegCapture.cpp:72:12: error: invalid operand
      asm ("movq %%r12, %0\n\t" : "=r" (reg12) );
           ^
<inline asm>:1:7: note: instantiated into assembly here
        movq %r12, x8
             ^
/usr/local/lib/haxe/lib/hxcpp/git/src/hx/gc/GcRegCapture.cpp:73:12: error: unknown token in expression
      asm ("movq %%r13, %0\n\t" : "=r" (reg13) );
           ^
<inline asm>:1:7: note: instantiated into assembly here
        movq %r13, x9
             ^
/usr/local/lib/haxe/lib/hxcpp/git/src/hx/gc/GcRegCapture.cpp:73:12: error: invalid operand
      asm ("movq %%r13, %0\n\t" : "=r" (reg13) );
           ^
<inline asm>:1:7: note: instantiated into assembly here
        movq %r13, x9
             ^
/usr/local/lib/haxe/lib/hxcpp/git/src/hx/gc/GcRegCapture.cpp:74:12: error: unknown token in expression
      asm ("movq %%r14, %0\n\t" : "=r" (reg14) );
           ^
<inline asm>:1:7: note: instantiated into assembly here
        movq %r14, x10
             ^
/usr/local/lib/haxe/lib/hxcpp/git/src/hx/gc/GcRegCapture.cpp:74:12: error: invalid operand
      asm ("movq %%r14, %0\n\t" : "=r" (reg14) );
           ^
<inline asm>:1:7: note: instantiated into assembly here
        movq %r14, x10
             ^
/usr/local/lib/haxe/lib/hxcpp/git/src/hx/gc/GcRegCapture.cpp:75:12: error: unknown token in expression
      asm ("movq %%r15, %0\n\t" : "=r" (reg15) );
           ^
<inline asm>:1:7: note: instantiated into assembly here
        movq %r15, x11
             ^
/usr/local/lib/haxe/lib/hxcpp/git/src/hx/gc/GcRegCapture.cpp:75:12: error: invalid operand
      asm ("movq %%r15, %0\n\t" : "=r" (reg15) );
           ^
<inline asm>:1:7: note: instantiated into assembly here
        movq %r15, x11
             ^
12 errors generated.
Error: Build failed

darmie avatar Jan 11 '23 08:01 darmie

I've confirmed that HXCPP_ARCH=arm64 still attempts to compile with x86, try using -D HXCPP_ARM64.

davidbruce avatar Feb 26 '23 18:02 davidbruce