asm中未知的寄存器名称'q0'

Pav*_*sky 19 build cpu-registers armv7 ios ios7

我正在尝试为$(ARCHS_STANDARD_32_BIT)体系结构构建ios项目- armv7对于最新的iOS(iOS 7.0),我遇到以下错误:

Unknown register name 'q0' in asm
Run Code Online (Sandbox Code Playgroud)

在功能上

static void neon_asm_mat4_vec4_mul(const float* __restrict m, const int* __restrict v, int* __restrict output)
      {
        asm volatile
        (
         // Store m & v - avoiding q4-q7 which need to be preserved - q0 = result
         "vldmia %1, { q8-q11 } \n\t"   // q8-q11 = m
         "vldmia %2, { q1 }     \n\t"   // q1     = v

         // Convert v to floats
         "vcvt.f32.s32 q1, q1 \n\t"

         // result = first column of A x V.x
         "vmul.f32 q0, q8, d2[0] \n\t"

         // result += second column of A x V.y
         "vmla.f32 q0, q9, d2[1] \n\t"

         // result += third column of A x V.z
         "vmla.f32 q0, q10, d3[0] \n\t"

         // result += last column of A x V.w
         "vmla.f32 q0, q11, d3[1] \n\t"

         // convert to integer
         "vcvt.s32.f32 q0, q0 \n\t"

         // output = result registers
         "vstmia %0, { q0 }  \n\t"

         : // no output
         : "r" (output), "r" (m), "r" (v)      // input - note *value* of pointer doesn't change
         : "memory", "q0", "q1", "q2", "q3", "q8", "q9", "q10", "q11" //clobber
         );
      }
Run Code Online (Sandbox Code Playgroud)

您可以帮我更新我的代码,以便可以为最新的硬件构建它,或者只是以不同的方式配置构建设置.我是iOS开发的新手,所以我有点失落......

cha*_*eme 46

尝试将neon_matrix_impl.c和mat4.c更改
#if defined(ARM_NEON)

#if defined(_ARM_ARCH_7)

  • 我发现我必须更改这是两个文件:neon_matrix_impl.c和mat4.c. (6认同)

Sau*_*lui 19

#if defined(ARM_NEON) ->#if defined(_ARM_ARCH_7)在两个宏中需要使用Cocos2d 2.1,modification()的人

  1. neon_matrix_impl.c和
  2. mat4.c在第218行

在此输入图像描述

实际上,ARM NEON在iOS设备中被用作多媒体渲染引擎,但现在使用iOS 7.0以及新的渲染引擎(ARM ARCH 64位).

可以从这里获得更多细节.

但是我的Xcode项目在我的iPod Touch(第5代)上进行了完美编译和成功执行并且没有进行这些修改,这真的让我很困惑.只有当我试图将我的项目归档到AppStore上提交时才需要进行修改.