Ejemplo n.º 1
0
static inline char * DESCRIBE_SRC_DST(char *s, UINT8 reg, const char *regname, op_src_dst_t src_dst) {
	switch (src_dst) {
	case es5510_device::SRC_DST_REG:
		return DESCRIBE_REG(s, reg, regname);
	case es5510_device::SRC_DST_DELAY:
		return stpcpy_int(s, "Delay");
	case es5510_device::SRC_DST_BOTH:
		s = DESCRIBE_REG(s, reg, regname);
		return stpcpy_int(s, ",Delay");
	}
	// should never happen!
	return s;
}
Ejemplo n.º 2
0
static inline char * DESCRIBE_REG(char *s, UINT8 r, const char *name) {
	if (name && *name) {
		return s + sprintf(s, "%s/%s", REGNAME(r), name);
	} else {
		return stpcpy_int(s, REGNAME(r));
	}
}
Ejemplo n.º 3
0
static inline char * DESCRIBE_REG(char *s, uint8_t r, const char *name) {
	if (name && *name) {
		return s + sprintf(s, "%s/%s", REGNAME(r), name);
	} else {
		return stpcpy_int(s, REGNAME(r));
	}

	// never executed
	//return 0;
}
Ejemplo n.º 4
0
static inline char * DESCRIBE_ALU(char *s, UINT8 opcode, UINT8 aReg, UINT8 bReg, const op_select_t &opSelect) {
	const alu_op_t &op = es5510_device::ALU_OPS[opcode];

	switch (op.operands) {
	case 0:
	return stpcpy_int(s, op.opcode);

	case 1:
	s += sprintf(s, "%s %s >", op.opcode, REGNAME(bReg));
	return DESCRIBE_SRC_DST(s, aReg, opSelect.alu_dst);

	case 2:
	s += sprintf(s, "%s %s,", op.opcode, REGNAME(bReg));
	s = DESCRIBE_SRC_DST(s, aReg, opSelect.alu_src);
	s += sprintf(s, " >");
	return DESCRIBE_SRC_DST(s, aReg, opSelect.alu_dst);
	}
	return s;
}
Ejemplo n.º 5
0
static inline char * DESCRIBE_ALU(char *s, uint8_t opcode, uint8_t aReg, const char *aName, uint8_t bReg, const char *bName, const op_select_t &opSelect) {
	const alu_op_t &op = es5510_device::ALU_OPS[opcode];

	switch (op.operands) {
	case 0:
		return stpcpy_int(s, op.opcode);

	case 1:
		s += sprintf(s, "%s ", op.opcode);
		s = DESCRIBE_SRC_DST(s, bReg, bName, opSelect.alu_src);
		s += sprintf(s, " >");
		return DESCRIBE_SRC_DST(s, aReg, aName, opSelect.alu_dst);

	case 2:
		s += sprintf(s, "%s ", op.opcode);
		s = DESCRIBE_SRC_DST(s, aReg, aName, opSelect.alu_src);
		s += sprintf(s, " ");
		s = DESCRIBE_REG(s, bReg, bName);
		s += sprintf(s, " >");
		return DESCRIBE_SRC_DST(s, aReg, aName, opSelect.alu_dst);
	}
	return s;
}
Ejemplo n.º 6
0
static inline char * DESCRIBE_REG(char *s, UINT8 r) {
	return stpcpy_int(s, REGNAME(r));
}