[libre-riscv-dev] [Bug 272] functions needed in POWER simulator which match 3.0B spec
    bugzilla-daemon at libre-riscv.org 
    bugzilla-daemon at libre-riscv.org
       
    Mon Mar 30 20:24:31 BST 2020
    
    
  
http://bugs.libre-riscv.org/show_bug.cgi?id=272
--- Comment #2 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Michael Nolan from comment #1)
> Would this be in power_pseudo.py? Or the POC simulator I wrote?
in the simulator, as a base "convenience" class of some kind.
basically, right now, code like this (which is extswsli)
    n  <- sh[5] || sh[0:4]
    r  <- ROTL64(EXTS64(RS[32:63]), n)
    m  <- MASK(0, 63-n)
    RA <- r & m
currently gets turned into this:
    n  = sh[5] + sh[0:5] # these are lists so they get concatenated
    r  = ROTL64(EXTS64(RS[32:64]), n)
    m  = MASK(0, 63-n)
    RA = r & m
however what is *actually* needed is:
    n  = sh[5] + sh[0:5] # these are lists so they get concatenated
    r  = self.helperfns.ROTL64(self.helperfns.EXTS64(RS[32:64]), n)
    m  = self.helperfns.MASK(0, 63-n)
    RA = r & m
and some other small changes.
remember, the code that's being executed will be *in* the simulator.
it's only generated *by* the compiler (power_pseudo.py).
welcome to compilers, they're a bit of a mind-bender :)
-- 
You are receiving this mail because:
You are on the CC list for the bug.
    
    
More information about the libre-riscv-dev
mailing list