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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sat Jan 13 20:17:39 GMT 2024


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

--- Comment #91 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Dmitry Selyutin from comment #87)

>     /* a[0:(XLEN / 2)] <- ([0] * (XLEN / 2)) */
>     oppc_range_subscript_assign(
>         &a,
>         /* 0 */
>         &(struct oppc_int){
>             .count = ctx->XLEN,
>             .array = {0},
>         },

blech! :)

it's actually understandable / readable.

implementation:

oppc_range_subscript_assign(oppc_int *a,  ...) {
    a->ok = true;
}

and then the caller can check the result->ok flag and
if true write to the regfile.

do you have time to write one function (oppc_add) or more as a demo /
unit test?

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


More information about the libre-soc-bugs mailing list