Explorar o código

* fixed the support for infinity and nan float literal values in the webassembly
llvm-mc asm writer

git-svn-id: trunk@49213 -

nickysn %!s(int64=4) %!d(string=hai) anos
pai
achega
4f828929a3
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      compiler/wasm32/agllvmmc.pas

+ 2 - 2
compiler/wasm32/agllvmmc.pas

@@ -210,11 +210,11 @@ implementation
         if (exponent=(1 shl exponent_bits)-1) then
         if (exponent=(1 shl exponent_bits)-1) then
           begin
           begin
             if fraction=0 then
             if fraction=0 then
-              result:=result+'inf'
+              result:=result+'infinity'
             else
             else
               begin
               begin
                 result:=result+'nan';
                 result:=result+'nan';
-                if fraction<>((int64(1) shl fraction_bits)-1) then
+                if fraction<>(int64(1) shl (fraction_bits-1)) then
                   result:=result+':0x'+HexStr(fraction,fraction_hexdigits);
                   result:=result+':0x'+HexStr(fraction,fraction_hexdigits);
               end;
               end;
           end
           end