7.5.3 CP0 Access Macros
When the CP0 register definitions header file is included from a C file, CP0 access macros are defined. Each CP0 register may have up to six different access macros defined:
_CP0_GET_register_name () |
Returns the value for register, register_name . |
_CP0_SET_register_name (val) |
Sets the register, register_name , to
val , and returns void . Only defined for
registers that contain a writable field. |
_CP0_XCH_register_name (val) |
Sets the register, register_name , to
val , and returns the previous register value. Only defined
for registers that contain a writable field. |
_CP0_BIS_register_name (set) |
Sets the register, register_name , to
(reg |= set ), and returns the previous register value. Only
defined for registers that contain writable bit fields. |
_CP0_BIC_register_name (clr) |
Sets the register, register_name , to
(reg &= ~clr ), and returns the previous register value.
Only defined for registers that contain writable bit fields. |
_CP0_BCS_register_name (clr, set) |
Sets the register, register_name , to
(reg = (reg & ~clr) | set ), and returns the previous
register value. Only defined for registers that contain writable bit
fields. |