diff options
author | Tristan Gingold <tgingold@free.fr> | 2015-05-20 21:55:21 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2015-05-20 21:55:21 +0200 |
commit | 06c4e6e0ba10149b272b0c49869152a50c732ae5 (patch) | |
tree | 6488ea1108733631b3e9b5ad000a2d4f8cadfc8c /src/grt/grt-images.adb | |
parent | 7abaf412c73a0f00f812ee05d7bf5a304e83549c (diff) | |
download | ghdl-06c4e6e0ba10149b272b0c49869152a50c732ae5.tar.gz ghdl-06c4e6e0ba10149b272b0c49869152a50c732ae5.tar.bz2 ghdl-06c4e6e0ba10149b272b0c49869152a50c732ae5.zip |
Handle to_string for i64 numbers.
Fix ticket 76
Diffstat (limited to 'src/grt/grt-images.adb')
-rw-r--r-- | src/grt/grt-images.adb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/grt/grt-images.adb b/src/grt/grt-images.adb index 272c42352..e56c8354b 100644 --- a/src/grt/grt-images.adb +++ b/src/grt/grt-images.adb @@ -100,6 +100,16 @@ package body Grt.Images is Return_String (Res, Str (First .. Str'Last)); end Ghdl_Image_I32; + procedure Ghdl_Image_I64 (Res : Std_String_Ptr; Val : Ghdl_I64) + is + -- biggest number is: 18446744073709551615 (20 digits) + Str : String (1 .. 21); + First : Natural; + begin + To_String (Str, First, Val); + Return_String (Res, Str (First .. Str'Last)); + end Ghdl_Image_I64; + procedure Ghdl_Image_P64 (Res : Std_String_Ptr; Val : Ghdl_I64; Rti : Ghdl_Rti_Access) is @@ -159,6 +169,8 @@ package body Grt.Images is procedure Ghdl_To_String_I32 (Res : Std_String_Ptr; Val : Ghdl_I32) renames Ghdl_Image_I32; + procedure Ghdl_To_String_I64 (Res : Std_String_Ptr; Val : Ghdl_I64) + renames Ghdl_Image_I64; procedure Ghdl_To_String_F64 (Res : Std_String_Ptr; Val : Ghdl_F64) renames Ghdl_Image_F64; |