Beispiel #1
0
void uasm_i_pref(u32 **buf, unsigned int a, signed int b,
			    unsigned int c)
{
	if (CAVIUM_OCTEON_DCACHE_PREFETCH_WAR && a <= 24 && a != 5)
		/*
		 * As per erratum Core-14449, replace prefetches 0-4,
		 * 6-24 with 'pref 28'.
		 */
		build_insn(buf, insn_pref, c, 28, b);
	else
		build_insn(buf, insn_pref, c, a, b);
}
Beispiel #2
0
static PyObject *do_decode(uint8_t *rawmem, Py_ssize_t sz, Py_ssize_t *tsz)
{
	uint16_t *nextmem, mem[32];
	int i;
	m68k_insn_t insn;

	for (i=0; i<32 && i<sz; i++) {
		mem[i] = rawmem[0] << 8 | rawmem[1];
		rawmem += 2;
	}

	nextmem = m68k_decode(&insn, mem);
	*tsz = 2 * (nextmem - mem);

	return build_insn(&insn, *tsz);
}