本文介绍了NASM:为什么必须将__float32 __(1.5)用作浮点字面量而不是1.5?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这样做的理由是什么

mov eax, 1.5

无法使用:

expression syntax error

并要求您执行以下操作:

and requiring you to do:

mov eax, __float32__(1.5)

而不是?它适用于dd系列的事实:

instead? The fact that it works for the dd family:

dd 1.5

让我更加好奇.

在这种情况下,是否会与其他某些语言功能存在语法歧义?

Would there be a syntax ambiguity with some other language feature in that case?

不能像我们那样从寄存器大小中推断出大小:

Couldn't the size just be inferred from the register size as when we do:

mov eax, 1

我也已经在他们的bugtracker上发布了,但到目前为止没有任何回复: http://bugzilla.nasm.us/show_bug.cgi?id=3392309

I have also posted on their bugtracker, but no reply so far: http://bugzilla.nasm.us/show_bug.cgi?id=3392309

推荐答案

Cyrill Gorcunov 回答:

Cyrill Gorcunov replied that:

因此,基本上没有冲突,只是历史上的不一致可能有一天会得到解决.

So basically, there is no conflict, it's just historical inconsistency which may get fixed some day.

这篇关于NASM:为什么必须将__float32 __(1.5)用作浮点字面量而不是1.5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 17:24