首页 文章
  • 3 votes
     answers
     views

    将常量值添加到x86中的xmm寄存器

    如何将 1 或 2 添加到寄存器 xmm0 (双)? 我可以这样做,但肯定必须有一个更简单的方法: movsd xmm0, [ecx] xor eax, eax inc eax cvtsi2sd xmm1, eax addsd xmm0, xmm1 movsd [ecx], xmm0 还可以使用浮点x87指令执行此操作吗? 这对我不起作用: fld dword ptr [ecx] fld1 ...
  • 0 votes
     answers
     views

    在Mac OSX上flds指令失败

    flds 指令应将值存储在寄存器 st0 中 . 我正在调试一个我没有代码的共享库 . 有时 flds 指令对 st0 没有任何影响 . 下面是 gdb 输出,用于它工作的情况和失败的情况 . 在破损的情况下, fstat 寄存器是0x2261而不是0x2061 . 0x200 flag 表示什么? Working version: 0x6d9b4f : flds -0x4(%ebp...
  • 0 votes
     answers
     views

    NASM x87 FILD指令

    我正在阅读this并且我注意到他们的示例显示fld将值加载到不同的位置(st0,st1,然后返回到st0),而没有指定加载到何处 . 我'm assuming fild works in a similar fashion as it'只是加载一个整数的方法(或者's my understanding anyway) but I could be wrong. So my question is ...
  • 7 votes
     answers
     views

    在LLVM中调用fsincos指令比调用libc sin / cos函数要慢吗?

    我正在研究用LLVM编译的语言 . 只是为了好玩,我想做一些微基准测试 . 其中一个,我在一个循环中运行了一百万个sin / cos计算 . 在伪代码中,它看起来像这样: var x: Double = 0.0 for (i <- 0 to 100 000 000) x = sin(x)^2 + cos(x)^2 return x.toInteger 如果我使用以下形式使用LLVM I...

热门问题