MUDA の LLVM IR のバックエンドを書いていて float の即値のあつかいでハマりました. float の値によってはアセンブラ(llvm-as)がエラーを出す. なぜかと思って、LLVM IR のドキュメント(LangLef.html)を見たことろ、 Floating point constants use standard decimal notation (e.g. 123.421), exponential notation (e.g. 1.23421e+2), or a more precise hexadecimal notation (see below). The assembler requires the exact decimal value of a floating-point constant. For example, the assembler accepts 1.25 but rejects 1.3 because 1.3 is a repeating [...]

Comments are closed.