{
SCF_VAR_I8,
SCF_VAR_CHAR,
+ SCF_VAR_BIT,
SCF_VAR_U8,
SCF_VAR_I16,
static scf_type_cast_t base_type_casts[] =
{
{"char", -1, SCF_VAR_CHAR, scf_cast_to_u8},
+ {"bit", -1, SCF_VAR_BIT, scf_cast_to_u8},
{"u8", -1, SCF_VAR_U8, scf_cast_to_u8},
{"u16", -1, SCF_VAR_U16, scf_cast_to_u16},
{"u32", -1, SCF_VAR_U32, scf_cast_to_u32},
if (!c->srcs || c->srcs->size != 1)
return -EINVAL;
- scf_risc_context_t* risc = ctx->priv;
+ scf_risc_context_t* risc = ctx->priv;
scf_function_t* f = risc->f;
scf_3ac_operand_t* src = c->srcs->data[0];
scf_3ac_operand_t* dst = c->dsts->data[0];
return -ENOMEM;
}
- scf_register_t* rd = NULL;
- scf_register_t* rs = NULL;
scf_instruction_t* inst = NULL;
+ scf_register_t* rd = NULL;
+ scf_register_t* rs = NULL;
scf_dag_node_t* s = src->dag_node;
scf_dag_node_t* d = dst->dag_node;
}
RISC_SELECT_REG_CHECK(&rd, d, c, f, 0);
- RISC_SELECT_REG_CHECK(&rn, d, c, f, 1);
+ RISC_SELECT_REG_CHECK(&rn, s0, c, f, 1);
if (0 == s1->color) {
{
RISC_INST_OP3_CHECK()
- scf_register_t* rm = NULL;
- scf_register_t* rn = NULL;
- scf_register_t* rd = NULL;
scf_instruction_t* inst = NULL;
+ scf_register_t* rm = NULL;
+ scf_register_t* rn = NULL;
+ scf_register_t* rd = NULL;
scf_dag_node_t* d = dst ->dag_node;
scf_dag_node_t* s0 = src0->dag_node;
scf_dag_node_t* s1 = src1->dag_node;
}
RISC_SELECT_REG_CHECK(&rd, d, c, f, 0);
- RISC_SELECT_REG_CHECK(&rn, d, c, f, 1);
+ RISC_SELECT_REG_CHECK(&rn, s0, c, f, 1);
if (0 == s1->color) {