2

Android SDK附带的Android模拟器支持NEON指令集模拟(我自己测试过)。它基于 QEMU。

我最近尝试使用 QEMU(模拟 Cortex-A9)创建一个自定义 VM,并安装了一些 ARMEL Linux 发行版。

但是,安装后/proc/cpuinfo没有显示neon在 CPU 功能中。Android 模拟器实际上有什么技巧,所以 NEON 似乎在他们的虚拟机中可用?

4

2 回答 2

2

These values are stored in elf_hwcap (see kernel/setup.c). The vfp/vfpmodule.c detects NEON support and sets a bit in elf_hwcap. Specifically via this code,

            /*
             * Check for the presence of the Advanced SIMD
             * load/store instructions, integer and single
             * precision floating point operations. Only check
             * for NEON if the hardware has the MVFR registers.
             */
            if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) {
#ifdef CONFIG_NEON
                    if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100)
                            elf_hwcap |= HWCAP_NEON;
#endif
#ifdef CONFIG_VFPv3
                    if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000)
                            elf_hwcap |= HWCAP_VFPv4;
#endif
            }

The read_cpuid_id() is a macro for the co-processor CP15 which gets a cpu id bit map. The fmrx() also uses another VFP co-processor register. So the emulator you are using is not responding properly to MRC instructions from either co-processor register; or maybe it does not support NEON emulation.

于 2013-03-24T15:28:24.567 回答
0

我面临着同样的问题。您必须模拟支持霓虹灯的硬件。bealexm 有支持。在这里检查

于 2016-02-18T06:21:45.697 回答