Delphi支持所有MMX/SSE指令吗?

发布于 2024-11-16 11:39:56 字数 520 浏览 6 评论 0原文

我有这段代码:

@combinerows:
    mov esi,eax
    and edi,Row1Mask
    and ebx,Row2Mask
    or ebx,edi
    //NewQ:= (Row1 and Row1Mask) or (Row2 and Row2Mask);

  //Result:= NewQ xor q;
  PUNPCKDQ mm4,mm5   <-- I get an error here
  //mov eax,[eax].q
  movd eax,mm4

  //q:= NewQ;
  mov [esi].q,ebx
  xor eax,ebx  //Return difference.

我收到此错误:

[Pascal 错误] SDIMAIN.pas(718): E2003 未声明的标识符:'PUNPCKDQ'

我做错了什么吗,或者 Delphi 2007 不支持全套 MMX/SSE 指令吗?

I have this snippet of code:

@combinerows:
    mov esi,eax
    and edi,Row1Mask
    and ebx,Row2Mask
    or ebx,edi
    //NewQ:= (Row1 and Row1Mask) or (Row2 and Row2Mask);

  //Result:= NewQ xor q;
  PUNPCKDQ mm4,mm5   <-- I get an error here
  //mov eax,[eax].q
  movd eax,mm4

  //q:= NewQ;
  mov [esi].q,ebx
  xor eax,ebx  //Return difference.

I get this error:

[Pascal Error] SDIMAIN.pas(718): E2003 Undeclared identifier: 'PUNPCKDQ'

Am I doing something wrong, or does Delphi 2007 not support a full set of MMX/SSE instructions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

物价感观 2024-11-23 11:39:56

Delphi 2007支持MMX和SSE指令集。当然,Delphi 2010和XE最高支持SSE4.2指令集(但目前还不支持AVX)。

但是,Delphi 抱怨您的“PUNPCKDQ”指令是正确的:如果您搜索 英特尔® 64 和 IA-32 架构软件开发人员手册(特别是第 2A 卷和第 2B 卷相关),您将找不到该名称的指令。也就是说,这是你的错误,而不是Delphi缺乏对该指令的支持。

Delphi 2007 supports the MMX and SSE instruction sets. Certainly, Delphi 2010 and XE support up to the SSE4.2 instruction sets (but so far no support for AVX).

However, Delphi is correct to complain about your "PUNPCKDQ" instruction: If you search the Intel® 64 and IA-32 Architectures Software Developer’s Manual (especially Volumes 2A and 2B would be relevant), you will NOT find an instruction by that name. I.e., it is your mistake, not Delphi's lack of support for this instruction.

花桑 2024-11-23 11:39:56

快速的 Google 会提供有关 PUNPCKLDQ 而不是 PUNPCKDQ 的信息。

D2007 接受 PUNPCKLDQ
更好的是,它还支持 PUNPCKHDQ,它可以让您将高位双字传输到低位双字,从而将其加载到通用寄存器中。

A quick Google gives information on a PUNPCKLDQ rather than PUNPCKDQ.

D2007 accepts PUNPCKLDQ
and even better it also supports PUNPCKHDQ, which lets you transfer a high order dword to a low dword enabling you to load it into a general purpose register.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文