codegen: use gen_frame_target for bit operations