Describe the bug
The c1_c0_2 register in arm raises an Invalid argument (UC_ERR_ARG) error when writing to it.
This was tested with qiling version 1.4.6 and unicorn version 2.1.1
Sample Code
Run the example hello_arm_linux_debug.py or the following code:
ql = Qiling(code=bytes(1000), archtype=QL_ARCH.ARM, ostype=QL_OS.LINUX)
This will call the enable_vfp function from QlArchARM which will attempt to write to c1_c0_2 and raise the error.
Screenshots

Additional context
This is caused because of this unicorn commit which changed the default return value of reg_write function from UC_ERR_OK to UC_ERR_ARG.

Furthermore, the switch case handling register UC_ARM_REG_C1_C0_2 in the reg_write function is commented out as shown here which causes the function to return the default return value.

and the register UC_ARM_REG_C1_C0_2 is commented as depreciated and should be replaced with UC_ARM_REG_CP_REG here.
Describe the bug
The
c1_c0_2register in arm raises anInvalid argument (UC_ERR_ARG)error when writing to it.This was tested with qiling version 1.4.6 and unicorn version 2.1.1
Sample Code
Run the example
hello_arm_linux_debug.pyor the following code:This will call the
enable_vfpfunction fromQlArchARMwhich will attempt to write toc1_c0_2and raise the error.Screenshots

Additional context

This is caused because of this unicorn commit which changed the default return value of
reg_writefunction fromUC_ERR_OKtoUC_ERR_ARG.Furthermore, the switch case handling register

UC_ARM_REG_C1_C0_2in thereg_writefunction is commented out as shown here which causes the function to return the default return value.and the register
UC_ARM_REG_C1_C0_2is commented as depreciated and should be replaced withUC_ARM_REG_CP_REGhere.