[Libre-soc-bugs] [Bug 980] Implement C-based Power ISA pseudocode compiler
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Sun Jan 14 20:18:11 GMT 2024
https://bugs.libre-soc.org/show_bug.cgi?id=980
--- Comment #109 from Dmitry Selyutin <ghostmansd at gmail.com> ---
...now with (GPR|0) support!
x <- (RA|0)
{
struct oppc_value x;
struct oppc_value RA;
oppc_assign(
&RA,
oppc_transient(&(struct oppc_value){}, UINT64_C(0), 5)
);
oppc_subscript_assign(
&RA,
oppc_transient(&(struct oppc_value){}, 0, (uint8_t)OPPC_XLEN),
oppc_subscript(
insn,
oppc_transient(&(struct oppc_value){}, 11, (uint8_t)OPPC_XLEN)
)
);
oppc_subscript_assign(
&RA,
oppc_transient(&(struct oppc_value){}, 1, (uint8_t)OPPC_XLEN),
oppc_subscript(
insn,
oppc_transient(&(struct oppc_value){}, 12, (uint8_t)OPPC_XLEN)
)
);
oppc_subscript_assign(
&RA,
oppc_transient(&(struct oppc_value){}, 2, (uint8_t)OPPC_XLEN),
oppc_subscript(
insn,
oppc_transient(&(struct oppc_value){}, 13, (uint8_t)OPPC_XLEN)
)
);
oppc_subscript_assign(
&RA,
oppc_transient(&(struct oppc_value){}, 3, (uint8_t)OPPC_XLEN),
oppc_subscript(
insn,
oppc_transient(&(struct oppc_value){}, 14, (uint8_t)OPPC_XLEN)
)
);
oppc_subscript_assign(
&RA,
oppc_transient(&(struct oppc_value){}, 4, (uint8_t)OPPC_XLEN),
oppc_subscript(
insn,
oppc_transient(&(struct oppc_value){}, 15, (uint8_t)OPPC_XLEN)
)
);
/* x <- (RA|0) */
oppc_assign(
/* x */
&x,
(
oppc_bool(
&RA
)
?
&OPPC_GPR[OPPC_GPR_RA]
:
oppc_transient(&(struct oppc_value){}, UINT64_C(0),
(uint8_t)OPPC_XLEN)
)
);
}
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list