poke-devel
[Top][All Lists]
Advanced

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

[PATCH] pkl: Fix bit-offset of mapped integral struct


From: Mohammad-Reza Nabipoor
Subject: [PATCH] pkl: Fix bit-offset of mapped integral struct
Date: Thu, 28 Jan 2021 02:44:40 +0330

2021-01-28  Mohammad-Reza Nabipoor  <m.nabipoor@yahoo.com>

        * libpoke/pkl-gen.pks (struct_writer): Fix bit-offset of mapped
        integral struct to use the real offset, not zero.
---

Hi, Jose.

Fix with no test!
I was unable to convince DejaGNU to run my tests :(


Regards,
Mohammad-Reza


 ChangeLog           | 5 +++++
 libpoke/pkl-gen.pks | 7 ++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1b84a5da..87f22258 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-28  Mohammad-Reza Nabipoor  <m.nabipoor@yahoo.com>
+
+       * libpoke/pkl-gen.pks (struct_writer): Fix bit-offset of mapped
+       integral struct.
+
 2021-01-26  Jose E. Marchesi  <jemarch@gnu.org>
 
        * libpoke/pkl-env.c (get_registered): The empty string is never
diff --git a/libpoke/pkl-gen.pks b/libpoke/pkl-gen.pks
index 7b050be0..1adab82e 100644
--- a/libpoke/pkl-gen.pks
+++ b/libpoke/pkl-gen.pks
@@ -1624,9 +1624,10 @@
  .c {
         pushvar $sct            ; SCT
         mgetios                 ; SCT IOS
-        nip                     ; IOS
-        push ulong<64>0         ; IOS 0UL
-        pushvar $ivalue         ; IOS 0UL IVAL
+        swap                    ; IOS SCT
+        mgeto                   ; IOS SCT BOFF
+        nip                     ; IOS BOFF
+        pushvar $ivalue         ; IOS BOFF IVAL
  .c     PKL_PASS_SUBPASS (@struct_itype);
  .c }
         popf 1
-- 
2.30.0



reply via email to

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