synchronization (test-and-set)
Synchronization based on test-and-set requires a shared data storage location that all the involved threads can read and modify.  Your shared register is a shared data storage location.

The reason synchronizing on a register when the threads are running on different CPUs is that the register would not be shared (not be visible) to one of the threads.  You should think of registers as memory locations with some features removed to make them faster.

In fact, something similar to your scenario was possible on SPARC processors.  The SPARC had a large register file (something like 64 or 128 registers) with 8 registers that were always visible and then 24 register "windows" into the rest of the register file.  Usually these windows were used to implement fast stack frames, but there were several experimental runtime systems that used the windows to support multiple threads.