ISACaller: implement real_addr pseudo-code helper
authorJacob Lifshay <programmerjake@gmail.com>
Mon, 4 Dec 2023 08:18:10 +0000 (00:18 -0800)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 22 Dec 2023 19:26:22 +0000 (19:26 +0000)
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 1b0423813215da1ca664c8f0a6b7a14db67606c6..e500f8a36b7d796b41e7a4e01e5f250c8ede1693 100644 (file)
@@ -1514,6 +1514,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