**Motivation**
ZGC currently modify mark-bitmap by a conditional atomic operation (cmpxchg). This way is not optimal, which will retry the loop when cmpxchg fails.
First, This patch-set add an new unconditional atomic operation: Atomic::fetch_and_or, which is implemented in different ways for different CPU architectures:
* Exclusive access: non-nested loop
```
retry:
ll old_val, addr
or new_val, old_val, set_val
sc new_val, addr
beq retry
```
* Atomic access: one instruction
```
ldset old_val, set_val, addr
```
* Generic: fallback to cmpxchg or use c++ __atomic_fetch_or
**Testing**
* jtreg tests
* benchmark tests
Assigned to wangrui.
Thanks,
Leslie ZHai