test r3_pattern_to_opcode