Skip to main content

I was wondering if you can write inline assembly in Swift.

I know that in Objective-C you could use something like this:

inline void assemblyFunc() { __asm__(/*Assembly*/Assembly); } 

But in Swift it seems that you can't use __asm__(/*Assembly*/Assembly).

Does anyone know how to use __asm__() if its even possible. I haven't found anything about it, so I thought it would be a good question to ask.

I was wondering if you can write inline assembly in Swift.

I know that in Objective-C you could use something like this:

inline void assemblyFunc() { __asm__(//Assembly); } 

But in Swift it seems that you can't use __asm__(//Assembly).

Does anyone know how to use __asm__() if its even possible. I haven't found anything about it, so I thought it would be a good question to ask.

I was wondering if you can write inline assembly in Swift.

I know that in Objective-C you could use something like this:

inline void assemblyFunc() { __asm__(/*Assembly*/); } 

But in Swift it seems that you can't use __asm__(/*Assembly*/).

Does anyone know how to use __asm__() if its even possible. I haven't found anything about it, so I thought it would be a good question to ask.

Source Link
Bas
  • 4.6k
  • 8
  • 40
  • 54

Is it possible to write inline assembly in Swift?

I was wondering if you can write inline assembly in Swift.

I know that in Objective-C you could use something like this:

inline void assemblyFunc() { __asm__(//Assembly); } 

But in Swift it seems that you can't use __asm__(//Assembly).

Does anyone know how to use __asm__() if its even possible. I haven't found anything about it, so I thought it would be a good question to ask.