ISACaller: implement real_addr pseudo-code helper
authorJacob Lifshay <programmerjake@gmail.com>
Mon, 4 Dec 2023 08:18:10 +0000 (00:18 -0800)
committerJacob Lifshay <programmerjake@gmail.com>
Mon, 4 Dec 2023 08:18:10 +0000 (00:18 -0800)
openpower/isa/fixedsync.mdwn
src/openpower/decoder/isa/caller.py

index 44a6b02271cc8a2ecc7a285e88fa98244b1a3c9a..979a6074988aba99fbadb12f4810cbb21b1c9f52 100644 (file)
@@ -58,7 +58,7 @@ Pseudo-code:
     EA <- (RA|0) + (RB)
     RESERVE <- 1
     RESERVE_LENGTH <- 4
-    RESERVE_ADDR <- EA # real_addr(EA)
+    RESERVE_ADDR <- real_addr(EA)
     RT <- [0]*32 || MEM(EA, 4)
 
 Special Registers Altered:
index 6a452f0a8cdda36ccc3a0653190d614018170de3..7806ccd2c574a6d6af1ac2baaaa4e2e61856ba7c 100644 (file)
@@ -1505,6 +1505,14 @@ class ISACaller(ISACallerHelper, ISAFPHelpers, StepLoop):
     def REAL_PAGE_SIZE(self):
         return self.real_page_size
 
+    def real_addr(self, EA):
+        """ get the "real address to which `EA` maps"
+
+        Specified in PowerISA v3.1B Book II Section 1.7.2.1 page 1049 (1075)
+        """
+        # FIXME: translate EA to a physical address
+        return EA
+
     @property
     def FPSCR(self):
         return self.fpscr