[Libre-soc-bugs] [Bug 980] Implement C-based Power ISA pseudocode compiler

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Jan 9 19:57:00 GMT 2024


https://bugs.libre-soc.org/show_bug.cgi?id=980

--- Comment #73 from Dmitry Selyutin <ghostmansd at gmail.com> ---
With a local code I have now, we're already able to convert this pseudocode...

src <- [0]*64
src[64-XLEN:63] <- (RS)
result <- [0]*64
do i = 0 to 1
    n <- i * 32
    result[n+0:n+7] <- 0
    result[n+8:n+19] <- DPD_TO_BCD(src[n+12:n+21])
    result[n+20:n+31] <- DPD_TO_BCD(src[n+22:n+31])
RA <- result[64-XLEN:63]


...into declarations:

void
oppc_cdtbcd(void) {
    uint64_t src;
    uint64_t result;
    uint64_t i;
    uint64_t n;
}


I guess all such functions will have some context argument. Notice that
"special" words and registers are not in declarations (because they shouldn't
be).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list