Is it always equivalent to a same-named 32-bit instruction?
Not always. Some C/Zc instructions compress common 32-bit operations, while others have dedicated stack-frame or table-jump semantics.
Bitwise XOR of rd' and rs2', write to rd'. CA format.
C.XOR (CA format, x8-x15 only) computes bitwise XOR of rd' and rs2', writes to rd'. Expands to xor rd',rd',rs2'.
C.XOR is the 16-bit encoding form for compressed bitwise XOR; its semantics and encodable register/immediate ranges must be read from the official C extension rules.
Understand this scenario with real code like «c.xor x8, x9 # x8 ^= x9».
Understand this scenario with real code like «c.xor x8, x9 # x8 ^= x9».
Understand this scenario with real code like «c.xor x8, x9 # x8 ^= x9».
Not always. Some C/Zc instructions compress common 32-bit operations, while others have dedicated stack-frame or table-jump semantics.
Many 16-bit encodings can represent only a compressed register subset or fixed registers such as sp, ra, a0/a1.