Fast Bit Toggle Using XOR

Easy Assembly Memory
Solve this problem

Write ARM assembly to toggle a specific bit in a register using XOR. The register value is in r0 and bit index in r1.

Constraints

  • Toggle r0^(1<<r1).
  • Return result in r0.
Starter codeAssembly
1.global toggle