poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[COMMITTED] pvm: Fix pretty-printer for {,U}LONGs


From: Mohammad-Reza Nabipoor
Subject: [COMMITTED] pvm: Fix pretty-printer for {,U}LONGs
Date: Sat, 8 Jan 2022 21:24:58 +0330

2022-01-08  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>

        * libpoke/pvm-val.c (pvm_print_val_1): Add `0x` prefix to
        `{,u}long_fmt`.
        * testsuite/poke.pkl/bconc-4.pk: Fix the test.
---
 ChangeLog                     | 6 ++++++
 libpoke/pvm-val.c             | 4 ++--
 testsuite/poke.pkl/bconc-4.pk | 4 ++--
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 106268f3..e2d27f4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-01-08  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
+
+       * libpoke/pvm-val.c (pvm_print_val_1): Add `0x` prefix to
+       `{,u}long_fmt`.
+       * testsuite/poke.pkl/bconc-4.pk: Fix the test.
+
 2022-01-08  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
 
        * libpoke/pkl-insn.def (PKL_INSN_LUTOLU): Fix to use `lutolu`
diff --git a/libpoke/pvm-val.c b/libpoke/pvm-val.c
index 964d5ce2..68ce272c 100644
--- a/libpoke/pvm-val.c
+++ b/libpoke/pvm-val.c
@@ -1086,9 +1086,9 @@ pvm_print_val_1 (pvm vm, int depth, int mode, int base, 
int indent,
       break;
     case 16:
       long64_fmt = "0x%" PRIx64 "L";
-      long_fmt = "(int<%d>) %" PRIx64;
+      long_fmt = "(int<%d>) 0x%" PRIx64;
       ulong64_fmt = "0x%" PRIx64 "UL";
-      ulong_fmt = "(uint<%d>) %" PRIx64;
+      ulong_fmt = "(uint<%d>) 0x%" PRIx64;
       int32_fmt = "0x%" PRIx32;
       int16_fmt = "0x%" PRIx32 "H";
       int8_fmt = "0x%" PRIx32 "B";
diff --git a/testsuite/poke.pkl/bconc-4.pk b/testsuite/poke.pkl/bconc-4.pk
index 3199a6d3..38b374c5 100644
--- a/testsuite/poke.pkl/bconc-4.pk
+++ b/testsuite/poke.pkl/bconc-4.pk
@@ -5,8 +5,8 @@ var x = 0xcdUH;
 /* { dg-command { .set obase 16 } } */
 
 /* { dg-command { x:::0xab } } */
-/* { dg-output "\\(uint<48>\\) cd000000ab" } */
+/* { dg-output "\\(uint<48>\\) 0xcd000000ab" } */
 
 /* For constant folding:  */
 /* { dg-command { 0xcdUH:::0xab } } */
-/* { dg-output "\n\\(uint<48>\\) cd000000ab" } */
+/* { dg-output "\n\\(uint<48>\\) 0xcd000000ab" } */
-- 
2.34.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]