NASM:为什么必须将__float32 __(1.5)用作浮点字面量而不是1.5? [英] NASM: why must __float32__(1.5) be used for floating point literals instead of just 1.5?

查看:95
本文介绍了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:

这是因为@dd是与mov分开处理的指令(内部有两个标记器).我们真的希望有一天能将它们统一起来,但是由于缺乏人力,它仍然没有得到实施.

That's because @dd is a directive handled separately from mov (we have two tokenizers inside). We really hope to unify them one day but due to lack of manpower it still has not been implemented.

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

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

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆