fix a buf of GET_LOCTBL_M.SH, and some improvements