[feature] global.h to xg.h