Nasm除法运算符`/`

问题描述 投票:0回答:1

Nasm具有除法运算符,但它们是整数除法。例如。会5/2 == 2吗?

/ and // are both division operators: / is unsigned division and // is signed division. Similarly, % and %% provide unsigned and signed modulo operators respectively.

assembly x86 x86-64 nasm
1个回答
2
投票

据我观察NASM source code所知,操作数被强制转换为int64_tuint64_t。换句话说:是的,它们是整数除法。


免责声明:我链接到的代码不是NASM的官方存储库,因此您可能想相对于NASM的官方源代码进行交叉检查,以确保100%正确。

© www.soinside.com 2019 - 2024. All rights reserved.