Linux上_emit的等价物是什么?

Linux上_emit的等价物是什么?,第1张

概述我正在尝试将一些用Visual Studio编写的汇编代码移植到 Linux上的GNU内联汇编中.原始代码使用 _emit,MSDN将其描述为伪指令,并解释为: The _emit pseudoinstruction is similar to the DB directive of MASM. You use _emit to define a single immediate byte at 我正在尝试将一些用Visual Studio编写的汇编代码移植到 Linux上的GNU内联汇编中.原始代码使用 _emit,MSDN将其描述为伪指令,并解释为:

The _emit pseudoinstruction is similar to the DB directive of MASM. You use _emit to define a single immediate byte at the current location in the current text segment. However,_emit can define only one byte at a time,and it can only define bytes in the text segment. It uses the same Syntax as the INT instruction.

我怎样才能在linux上做同样的事情?

解决方法 要发出字节0x12(例如),请执行:
asm __volatile__ (".byte 0x12");

虽然,启用优化后可能会得到令人惊讶的结果.

总结

以上是内存溢出为你收集整理的Linux上_emit的等价物是什么?全部内容,希望文章能够帮你解决Linux上_emit的等价物是什么?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/1033429.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存