[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[COMMITTED] pkl: Fix codegen of map operator
From: |
Mohammad-Reza Nabipoor |
Subject: |
[COMMITTED] pkl: Fix codegen of map operator |
Date: |
Thu, 16 Sep 2021 09:46:45 +0430 |
Bug reported by Guillermo E. Martine.
2021-09-16 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
* libpoke/pkl-gen.c (pkl_gen_pr_map): Use `PUSHIOS` instruction to
get the current IOS, instead of using `PVM_NULL`.
And also remove the old (incorrect) comment.
---
Hi, Guillermo.
Actually this was due to a bug in codegen. It used `PVM_NULL` instead of
using the current IOS (that's why it poked the first IOS).
Thanks for reporting this!
Regards,
Mohammad-Reza
ChangeLog | 6 ++++++
libpoke/pkl-gen.c | 3 +--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5c614688..9fec1231 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-09-16 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
+
+ * libpoke/pkl-gen.c (pkl_gen_pr_map): Use `PUSHIOS` instruction to
+ get the current IOS, instead of using `PVM_NULL`.
+ And also remove the old (incorrect) comment.
+
2021-09-10 Guillermo E. Martinez <guillermo.e.martinez@oracle.com>
* doc/poke.texi (Weird Integers): Fix typo.
diff --git a/libpoke/pkl-gen.c b/libpoke/pkl-gen.c
index cfd95ae1..945d2cf8 100644
--- a/libpoke/pkl-gen.c
+++ b/libpoke/pkl-gen.c
@@ -2447,7 +2447,7 @@ PKL_PHASE_BEGIN_HANDLER (pkl_gen_pr_map)
PKL_GEN_POP_CONTEXT;
}
else
- pkl_asm_insn (PKL_GEN_ASM, PKL_INSN_PUSH, PVM_NULL);
+ pkl_asm_insn (PKL_GEN_ASM, PKL_INSN_PUSHIOS);
PKL_GEN_DUP_CONTEXT;
PKL_GEN_CLEAR_CONTEXT (PKL_GEN_CTX_IN_LVALUE);
@@ -2466,7 +2466,6 @@ PKL_PHASE_BEGIN_HANDLER (pkl_gen_pr_map)
if (map_ios)
PKL_PASS_SUBPASS (map_ios);
else
- /* PVM_NULL means use the current IO space, if any. */
pkl_asm_insn (PKL_GEN_ASM, PKL_INSN_PUSHIOS);
/* Push the offset of the map and convert to a bit-offset. Note
--
2.33.0