2014-06-13 3 views
1

나는 아이폰 OS (하는 ARMv7, armv7s, arm64)에 대한 boost::context를 컴파일하려고 : 나는 arm64를 제거하면boost :: context for arm64?

jump_arm_aapcs_macho_gas.S:52:18: error: ',' expected 
    stmia a1, {v1-v8,sp-lr} @ save V1-V8,SP-LR 
       ^
jump_arm_aapcs_macho_gas.S:53:14: error: register expected 
    str lr, [a1,#40] @ save LR as PC 
      ^
jump_arm_aapcs_macho_gas.S:69:18: error: invalid variant 'use' 
    mov a1, a3 @ use third arg as return value after jump 
       ^
jump_arm_aapcs_macho_gas.S:70:39: error: unexpected token at start of statement 
            @ and as first arg in context function 
            ^
jump_arm_aapcs_macho_gas.S:71:18: error: ',' expected 
    ldmia a2, {v1-v8,sp-pc} @ restore v1-V8,SP-PC 
       ^

jump_arm_aapcs_macho_gas.S

.text 
.globl _jump_fcontext 
.align 2 
_jump_fcontext: 
    stmia a1, {v1-v8,sp-lr}  @ save V1-V8,SP-LR 
    str  lr, [a1,#40]   @ save LR as PC 

#if (defined(__VFP_FP__) && !defined(__SOFTFP__)) 
    cmp  a4, #0     @ test if fpu env should be preserved 
    beq  1f 

    mov  a4, a1 
    add  a4, #52 
    vstmia a4, {d8-d15}   @ save S16-S31 

    mov  a4, a2 
    add  a4, #52 
    vldmia a4, {d8-d15}   @ restore S16-S31 
1: 
#endif 

    mov  a1, a3     @ use third arg as return value after jump 
            @ and as first arg in context function 
    ldmia a2, {v1-v8,sp-pc}  @ restore v1-V8,SP-PC 

오류, 아키텍처를 armv7로만 설정하면 컴파일되므로 코드가 잘되어야합니다.

arm64 용으로 컴파일 할 수있는 방법이 있습니까?

답변

2

ARM64 (AArch64)는 명령어와 레지스터 세트 모두 ARM32 (A32)와 상당히 다릅니다. 호출 규칙 (ABI)도 다릅니다. 어셈블러 스 니펫을 다시 작성해야합니다. 개발자가 직접 할 수있는 저수준 세부 정보에 익숙하지 않은 개발자에게 문의하는 것이 좋습니다.

+0

고마워요! 나는 32 비트와 64 비트를 위해 'e'나 'r'접두어로 된 레지스터만을 사용하여 asm을 보는 데 익숙하다. 나는 그렇게 단순 할 것이라고 기대했다. 나는 부스트 포럼으로 향할 것 같아. – bitwise