gcc version 5.1.0 (tdm-1)(32bit) 不能内联 SSE 指令集汇编?

jdgdf566 2018-09-12 12:27:39
想对2个128bit的数据进行按位与运算,主要几句汇编怎么写?
...全文
183 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2018-09-12
  • 打赏
  • 举报
回复
《The Intel 64 and IA-32 Architectures Software Developer's Manual》
赵4老师 2018-09-12
  • 打赏
  • 举报
回复

The _emit Pseudoinstruction
Home | Overview | How Do I

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.

The following fragment places the given bytes into the code:

#define randasm __asm _emit 0x4A __asm _emit 0x43 __asm _emit 0x4B
.
.
.
__asm {
randasm
}
不知道gcc汇编有没有类似关键字。
  • 打赏
  • 举报
回复
#include <intrin.h>

__m128i a, b;

__asm(
"movdqa %0,%%xmm0\n\t"
"por %1,%%xmm0\n\t"
"movdqa %%xmm0,%0\n\t"
:
:"m"(a), "m"(b)
);

69,371

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧