title: ARM Current Program Status Register (SPSR) read-modify-write strategy practice
body: <blockquote>
    <p>The bits that Figure 2-10 identifies as Do Not Modify (DNM), Read As
    Zero (RAZ), must not     be modified by software. These bits are:</p>
    
    <p>• Readable, to enable the processor state to be preserved, for example,
    during process context switches</p>
    
    <p>• Writable, to enable the processor
    state to be restored. To maintain compatibility with future ARM
    processors, and <strong>as good practice, you are strongly advised to use a
    read-modify-write strategy when changing the CPSR</strong>.</p>
  </blockquote>
  
  <p>But with bitwise operations, you can already clearly define which bits you want to alter, without modifying any unexpected values, and it avoids wasting extra cycles. What's the reason of this recommendation?</p>