FIRST-PRINCIPLES INVESTIGATION THE PHASE SEPARATION IN Ca1-xMgxO ALLOYS