update cgen to my personal standards

also:
- check canonical target and friends in expect/testsuite
- a few minor tweaks for opcodes

Change-Id: I176e5994ea369de6689003003d7682322c9ba6aa