ARM SIMD instruction -- fcvtzs

Floating-point Convert to Signed integer, rounding toward Zero (scalar). This instruction converts the floating-point value in the SIMD&FP source register to a 32-bit or 64-bit signed integer using the Round towards Zero rounding mode, and writes the result to the general-purpose destination register.

浮点转换为带符号整数,四舍五入为零(标量)。此指令使用向零舍入模式将SIMD&FP源寄存器中的浮点值转换为32位或64位有符号整数,并将结果写入通用目标寄存器。

A floating-point exception can be generated by this instruction. Depending on the settings in FPCR, the exception results in either a flag being set in FPSR, or a synchronous exception being generated.

此指令可以生成浮点异常。根据FPCR中的设置,异常会导致在FPSR中设置标志,或生成同步异常。

Half-precision to 32-bit variant

Applies when sf == 0 && type == 11.

FCVTZS <Wd>, <Hn>

Half-precision to 64-bit variant

Applies when sf == 1 && type == 11.

FCVTZS <Xd>, <Hn>

Single-precision to 32-bit variant

Applies when sf == 0 && type == 00.

FCVTZS <Wd>, <Sn>

Single-precision to 64-bit variant

Applies when sf == 1 && type == 00.

FCVTZS <Xd>, <Sn>

Double-precision to 32-bit variant

Applies when sf == 0 && type == 01.

FCVTZS <Wd>, <Dn>

Double-precision to 64-bit variant

Applies when sf == 1 && type == 01.

FCVTZS <Xd>, <Dn>

403dc8: b94012c0 ldr w0, [x22, #16]

403dcc: 910042c1 add x1, x22, #0x10 // x1=0x43c288 + 0x10

403dd0: 34000100 cbz w0, 403df0 <ferror@plt+0x1f10>

403dd4: fd405660 ldr d0, [x19, #168] // d0=4412.67
403dd8: 1e780002 fcvtzs w2, d0 // w2=4412

=> 0x0000000000403dd4: 60 56 40 fd ldr d0, [x19, #168]

(gdb) x/x $x19+168

0x449588: 0x851eb852

=> 0x0000000000403dd8: 02 00 78 1e fcvtzs w2, d0

(gdb) p/f $d0

$7 = {f = 4412.6700000000001, u = 4412.6700000000001, s = 4412.6700000000001}

(gdb) p/d $w2

$8 = 4412

相关推荐
染指11101 天前
35.x64汇编写法(二)
汇编·windows·x64游戏·x64汇编·游戏攻防
Jacen.L2 天前
逆向工程开篇(连载中)
汇编
薛定谔的猫_C8T63 天前
程序人生-Hello’s P2P
c语言·汇编·程序人生·shell·二进制·计算机系统·hello
God_archer3 天前
程序人生-hello’s P2P
linux·c语言·汇编·程序人生
南玖yy3 天前
x86 汇编逻辑运算全解析:从【位操作】到实际应用(AND,OR,NOT,XOR,TEST)
开发语言·汇编·arm开发·后端·架构·策略模式
南玖yy3 天前
深入理解 x86 汇编中的重复前缀:REP、REPZ/REPE、REPNZ/REPNE(进阶详解版)
开发语言·网络·汇编·后端·算法·bochs
Jacen.L4 天前
四、函数调用包含单个参数之Double类型-mmword,movsd,mulsd,addsd指令,总结汇编的数据类型
汇编
网安INF4 天前
深入理解汇编语言中的顺序与分支结构
开发语言·汇编·编程
染指11105 天前
34.x64汇编写法(一)
汇编·x64汇编
廖致君6 天前
打打基础 | 从翻转链表到寄存器、汇编与内存
汇编·数据结构·链表