Use r12 instead of r0 as temporary register when storing context
Correctly set the NG bit in translation tables