ARM窗口的VFP调用约定 [英] VFP calling convention for ARM Windows

查看:122
本文介绍了ARM窗口的VFP调用约定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎浮点和双精度参数通过VFP寄存器(d0-d8)传递。

It seems that floating point and double precision arguments are passed via VFP  registers (d0-d8).

1。是否有一个标志,我可以要求编译器使用通用寄存器(GPR)/堆栈来传递浮点值?

2。有没有办法可以在编译期间关闭VFP。

我有一些旧的汇编代码,它假设参数通过GPR和堆栈传递(就像在ARM iOS上完成的那样),我不想改变它。有什么建议吗?

谢谢,

Daman

推荐答案

为Windows RT / Windows Phone编写ARM程序集有很多限制和调用约定差异不是唯一的。 Windows RT / Windows Phone需要Thumb-2,VFPv3,Little-Endian,ARM-NEON以及专门的展开
信息(类似于x64程序集适用于Windows x64的方式)。因此,您必须对来自大多数其他平台的现有ARM程序集文件进行重大更改。

There are numerous limitations on writing ARM assembly for Windows RT / Windows Phone, and the calling convention differences are not the only ones. Windows RT / Windows Phone requires Thumb-2, VFPv3, Little-Endian, ARM-NEON, and specialized unwinding information (similar to how x64 assembly works for Windows x64). As such, you have to make significant changes to existing ARM assembly files coming from most other platforms.

当然,更好的答案可能是将该程序集中的功能重写为内在函数,即更容易整合。请参阅

DirectXMath
,以获取使用ARM内在函数的示例。

Of course, a better answer is likely to rewrite the functionality in that assembly as intrinsics which is much easier to integrate. See DirectXMath for examples of using ARM intrinsics.


这篇关于ARM窗口的VFP调用约定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆