poke-devel
[Top][All Lists]
Advanced

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

[COMMITTED 1/2] pkl: Fix incorrect invocations of pvm_make_integral_type


From: Mohammad-Reza Nabipoor
Subject: [COMMITTED 1/2] pkl: Fix incorrect invocations of pvm_make_integral_type
Date: Wed, 1 Sep 2021 00:52:29 +0430

2021-08-30  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>

        * libpoke/pkl-gen.c (pkl_gen_ps_type_integral): Fix argument of
        MKTYI instruction to be signed integer.
        * libpoke/pvm-val.c (pvm_make_exception): Fix args of
        `pvm_make_integral_type` invocation.
        * libpoke/pvm.jitter (time): Likewise.
---
 ChangeLog          | 8 ++++++++
 libpoke/pkl-gen.c  | 4 ++--
 libpoke/pvm-val.c  | 3 ++-
 libpoke/pvm.jitter | 5 +++--
 4 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 67694cca..ef1829be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2021-08-30  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
+
+       * libpoke/pkl-gen.c (pkl_gen_ps_type_integral): Fix argument of
+       MKTYI instruction to be signed integer.
+       * libpoke/pvm-val.c (pvm_make_exception): Fix args of
+       `pvm_make_integral_type` invocation.
+       * libpoke/pvm.jitter (time): Likewise.
+
 2021-08-26  Kostas Chasialis  <koschasialis@gmail.com>
 
        * etc/hacking.org: Email change.
diff --git a/libpoke/pkl-gen.c b/libpoke/pkl-gen.c
index 8e03ffe3..cfd95ae1 100644
--- a/libpoke/pkl-gen.c
+++ b/libpoke/pkl-gen.c
@@ -2941,8 +2941,8 @@ PKL_PHASE_BEGIN_HANDLER (pkl_gen_ps_type_integral)
                                     64));
 
       pkl_asm_insn (pasm, PKL_INSN_PUSH,
-                    pvm_make_uint (PKL_AST_TYPE_I_SIGNED_P (integral_type),
-                                   32));
+                    pvm_make_int (PKL_AST_TYPE_I_SIGNED_P (integral_type),
+                                  32));
 
       pkl_asm_insn (pasm, PKL_INSN_MKTYI);
     }
diff --git a/libpoke/pvm-val.c b/libpoke/pvm-val.c
index b938c3ea..ffe0c5c8 100644
--- a/libpoke/pvm-val.c
+++ b/libpoke/pvm-val.c
@@ -1667,7 +1667,8 @@ pvm_make_exception (int code, char *message, int 
exit_status)
   pvm_allocate_struct_attrs (nfields, &field_names, &field_types);
 
   field_names[0] = code_name;
-  field_types[0] = pvm_make_integral_type (32, 1);
+  field_types[0] = pvm_make_integral_type (pvm_make_ulong (32, 64),
+                                           PVM_MAKE_INT (1, 32));
 
   field_names[1] = msg_name;
   field_types[1] = pvm_make_string_type ();
diff --git a/libpoke/pvm.jitter b/libpoke/pvm.jitter
index 722104e5..976df1eb 100644
--- a/libpoke/pvm.jitter
+++ b/libpoke/pvm.jitter
@@ -6212,8 +6212,9 @@ end
 instruction time ()
   code
     struct timespec ts;
-    pvm_val arr = pvm_make_array (PVM_MAKE_ULONG (2, 64),
-                                  pvm_make_integral_type (64, 1));
+    pvm_val arr = pvm_make_array (
+      PVM_MAKE_ULONG (2, 64),
+      pvm_make_integral_type (PVM_MAKE_ULONG (64, 64), PVM_MAKE_INT (1, 32)));
 
     gettime (&ts);
     (void) pvm_array_insert (arr, PVM_MAKE_LONG (0, 64),
-- 
2.33.0




reply via email to

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