Archive for April, 2009

Using clobber in machine descriptions

Thursday, April 23rd, 2009

‘clobber’ ensures that the register is free before entering and after exiting an instruction. Therefore you can’t use it to say a register is used then destoryed by an instruction such as LOADACC, (X+) on X.

Took a while to figure this out

Extreme optimisation

Thursday, April 16th, 2009

GCC is crazy.  It recognises a printf(’foo\n’) and turns it into the equivalent puts(’foo’) instead.

builtins.c has all types of similar transformations including printf(’%c’, v) to a putch(v) and printf(’%s’, v) to fputs().

Canterbury innovation incubator

Saturday, April 4th, 2009

The Cii seems interesting. It needs more publicity - this is the first time I’ve heard of it in my fifteen years in Christchurch.