tci: Rewrite from scratch

Signed-off-by: Richard Henderson <rth@twiddle.net>
cleanup remaining 8 regs
fixup mem accesses