fp_cpusync Subroutine
Purpose
Queries or changes the floating-point exception enable (FE) bit in the Machine Status register (MSR).
Library
Standard C Library (libc.a)
Syntax
#include <fptrap.h>
int Flag;
Description
The fp_cpusync subroutine is a service routine used to query, set, or reset the Machine Status Register (MSR) floating-point exception enable (FE) bit. The MSR FE bit determines whether a processor runs in pipeline or serial mode. Floating-point traps can only be generated by the hardware when the processor is in synchronous mode.
The fp_cpusync subroutine changes only the MSR FE bit. It is a service routine for use in developing custom floating-point exception-handling software. If you are using the fp_enable or fp_enable_all subroutine or the fp_sh_trap_info or fp_sh_set_stat subroutine, you must use the fp_trap subroutine to place the process in serial mode.
Parameters
Item | Description |
---|---|
Flag | Specifies to query or modify the MSR FE bit:
|
If called with any other value, the fp_cpusync subroutine returns FP_SYNC_ERROR.
Return Values
If called with the FP_SYNC_OFF or FP_SYNC_ON flag, the fp_cpusync subroutine returns a value indicating which flag was in the previous state of the process.
If called with the FP_SYNC _QUERY flag, the fp_cpusync subroutine returns a value indicating the current state of the process, either the FP_SYNC_OFF or FP_SYNC_ON flag.
Error Codes
If the fp_cpusync subroutine is called with an invalid parameter, the subroutine returns FP_SYNC_ERROR. No other errors are reported.