In this paper, a bidirectional cognitive cross network using spatial modulation (SM) along with physical-layer network coding (PLNC) is proposed. In our model, a primary user pair located far from each other, exchanges information in the lack of a direct link so that a relay is required for a reliable communication. A secondary user pair shares their relay with the primary user in return for access to the licensed spectrum. Both users exploit SM while the relay also applies PLNC. It is assumed that each user pair can eavesdrop the signal of the other user pair to use these signals as side information and cancel them from the PLNC mapped signal broadcasted by the relay. Optimum power allocation, in which two scenarios are considered, is proposed for sources and the relay. In Scenario I, the optimization is performed by minimizing the bit error probability (REP) of the primary user due to its priority in the licensed band. Scenario 2, which minimizes REP of both users, provides the optimum results for the whole system. A theoretical REP analysis is performed and the results are supported via computer simulation results, which are in perfect match with theoretical findings.