【发布时间】:2016-11-01 00:48:14
【问题描述】:
在 xcode 8.0 中,我有一个 s 文件,其中包含我编写的 arm 程序集代码块。我想从我的 Swift 代码中调用这个 asm 函数并传递一个指针。我该怎么做?
下面是我在objective-c中是如何做同样事情的:
void my_asm_function(int *myptr); //this is prototype in my h-file
my_asm_function(&myIntVar); // this is how i call the function from my obj-c code
【问题讨论】:
-
用汇编实现的调用函数应该和调用任何C函数一样。