Fixed sub codegen problem
Fixed some problems with code gen and regalloc