}
static inline long
-ecall_idargs(struct core_t const *cpu, long arguments[6]) {
+ecall_fetch(struct core_t const *cpu, long arguments[6]) {
arguments[0] = cpu->reg[10].l;
arguments[1] = cpu->reg[11].l;
arguments[2] = cpu->reg[12].l;
return cpu->reg[17].l;
}
+
+static inline void
+ecall_store(long const arguments[6], struct core_t *cpu)
+{
+ cpu->reg[10].l = arguments[0];
+ cpu->reg[11].l = arguments[1];
+ cpu->reg[12].l = arguments[2];
+ cpu->reg[13].l = arguments[3];
+ cpu->reg[14].l = arguments[4];
+ cpu->reg[15].l = arguments[5];
+}