insn->opcode = orc_opcode_find_by_name (name);
if (!insn->opcode) {
ORC_ERROR ("unknown opcode: %s", name);
+ orc_program_set_error (program, "unknown opcode");
+ return;
}
insn->dest_args[0] = arg0;
insn->src_args[0] = arg1;
insn->opcode = orc_opcode_find_by_name (name);
if (!insn->opcode) {
ORC_ERROR ("unknown opcode: %s", name);
+ orc_program_set_error (program, "unknown opcode");
+ return;
}
insn->dest_args[0] = arg0;
insn->src_args[0] = arg1;
insn->opcode = orc_opcode_find_by_name (name);
if (!insn->opcode) {
ORC_ERROR ("unknown opcode: %s", name);
+ orc_program_set_error (program, "unknown opcode");
+ return;
}
+
insn->flags = flags;
args[0] = arg0;
args[1] = arg1;
insn->flags = flags;
i = 0;
insn->dest_args[0] = args[i++];
- if (insn->opcode) {
- if (insn->opcode->dest_size[1] != 0) {
- insn->dest_args[1] = args[i++];
- }
- if (insn->opcode->src_size[0] != 0) {
- insn->src_args[0] = args[i++];
- }
- if (insn->opcode->src_size[1] != 0) {
- insn->src_args[1] = args[i++];
- }
- if (insn->opcode->src_size[2] != 0) {
- insn->src_args[2] = args[i++];
- }
+ if (insn->opcode->dest_size[1] != 0) {
+ insn->dest_args[1] = args[i++];
+ }
+ if (insn->opcode->src_size[0] != 0) {
+ insn->src_args[0] = args[i++];
}
+ if (insn->opcode->src_size[1] != 0) {
+ insn->src_args[1] = args[i++];
+ }
+ if (insn->opcode->src_size[2] != 0) {
+ insn->src_args[2] = args[i++];
+ }
+
program->n_insns++;
}
insn->opcode = orc_opcode_find_by_name (name);
if (!insn->opcode) {
ORC_ERROR ("unknown opcode: %s", name);
+ orc_program_set_error (program, "unknown opcode");
return;
}
insn->dest_args[0] = orc_program_find_var_by_name (program, arg1);
insn->opcode = orc_opcode_find_by_name (name);
if (!insn->opcode) {
ORC_ERROR ("unknown opcode: %s at line %d", name, insn->line);
+ orc_program_set_error (program, "unknown opcode");
+ return;
}
+
args[0] = orc_program_find_var_by_name (program, arg1);
args[1] = orc_program_find_var_by_name (program, arg2);
args[2] = orc_program_find_var_by_name (program, arg3);
insn->flags = flags;
i = 0;
insn->dest_args[0] = args[i++];
- if (insn->opcode) {
- if (insn->opcode->dest_size[1] != 0) {
- insn->dest_args[1] = args[i++];
- }
- if (insn->opcode->src_size[0] != 0) {
- insn->src_args[0] = args[i++];
- }
- if (insn->opcode->src_size[1] != 0) {
- insn->src_args[1] = args[i++];
- }
- if (insn->opcode->src_size[2] != 0) {
- insn->src_args[2] = args[i++];
- }
+ if (insn->opcode->dest_size[1] != 0) {
+ insn->dest_args[1] = args[i++];
+ }
+ if (insn->opcode->src_size[0] != 0) {
+ insn->src_args[0] = args[i++];
+ }
+ if (insn->opcode->src_size[1] != 0) {
+ insn->src_args[1] = args[i++];
+ }
+ if (insn->opcode->src_size[2] != 0) {
+ insn->src_args[2] = args[i++];
}
program->n_insns++;
}
insn->opcode = orc_opcode_find_by_name (name);
if (!insn->opcode) {
ORC_ERROR ("unknown opcode: %s", name);
+ orc_program_set_error (program, "unknown opcode");
+ return;
}
insn->dest_args[0] = orc_program_find_var_by_name (program, arg1);
insn->src_args[0] = orc_program_find_var_by_name (program, arg2);
insn->opcode = orc_opcode_find_by_name (name);
if (!insn->opcode) {
ORC_ERROR ("unknown opcode: %s", name);
+ orc_program_set_error (program, "unknown opcode");
+ return;
}
insn->dest_args[0] = orc_program_find_var_by_name (program, arg1);
insn->dest_args[1] = orc_program_find_var_by_name (program, arg2);