United States |
|
|
||
6.2.1.26 Convert G_Floating to Quadword ( __CVTGQ)The __CVTGQ function rounds a double-precision, VAX floating-point number to a 64-bit integer value and returns the result. This function has the following format:
6.2.1.27 Convert IEEE T_Floating to IEEE S_Floating Chopped ( __CVTTS_C)The __CVTTS_C function converts a double-precision, IEEE T_floating-point number to a single-precision, IEEE S_floating-point number. This conversion chops to single-precision; then the 8-bit exponent range is checked for overflow or underflow. This function has the following format:
6.2.1.28 Convert IEEE T_Floating to Quadword ( __CVTTQ)The __CVTTQ function rounds a double-precision, IEEE T_floating-point number to a 64-bit integer value and returns the result. This function has the following format:
6.2.1.29 Convert X_Floating to Quadword ( __CVTXQ)The __CVTXQ function converts an X_floating-point number to a 64-bit integer value and returns the result. This function has the following format:
6.2.1.30 Convert X_Floating to IEEE T_Floating Chopped ( __CVTXT_C)The __CVTXT_C function converts an X_floating-point number to an IEEE T_floating-point number and returns the result. This function has the following format:
6.2.1.31 Copy Sign Built-in FunctionsBuilt-in functions are provided to copy selected portions of single- and double-precision, floating-point numbers. These built-in functions have the following format:
The copy sign built-ins (__CPYSF and __CPYS) fetch the sign bit in operand1, concatenate it with the exponent and fraction bits from operand2, and return the result. The copy sign negate built-ins (__CPYSNF and __CPYSN) fetch the sign bit in operand1, complement it, concatenate it with the exponent and fraction bits from operand2, and return the result.
The copy sign exponent built-ins (__CPYSEF and __CPYSE) fetch the sign
and exponent bits from operand1, concatenate them with the
fraction bits from operand2, and return the result.
The __COS built-in function is functionally equivalent to its counterpart, cos , in the standard header file <math.h> . Its format is also the same:
This built-in offers performance improvements because there is less call overhead associated with its use.
If you include
<math.h>
, the built-in is automatically used for all occurrences of
cos
. To disable the built-in, use
#undef cos
.
The following built-in functions provide double-precision, floating-point chopped arithmetic:
They have the following format:
Where op is one of ADD, SUB, MUL, DIV, and {G,T} represents VAX or IEEE floating-point arithmetic, respectively.
The result of the arithmetic operation is returned.
The __FABS built-in function is functionally equivalent to its counterpart, fabs , in the standard header file <math.h> . Its format is also the same:
This built-in offers performance improvements because there is no call overhead associated with its use.
If you include
<math.h>
, the built-in is automatically used for all occurrences of
fab
. To disable the built-in, use
#undef fab
.
The _LEADZ built-in function returns the number of leading zeroes (starting at the most significant bit position) in its argument. For example, _LEADZ(1) returns 63, and _LEADZ(0) returns 64. This function has the following format:
The following built-in functions provide long double-precision, floating-point chopped arithmetic:
They have the following format:
Where op is one of ADD, SUB, MUL, DIV.
The result of the arithmetic operation is returned.
The __LABS built-in is functionally equivalent to its counterpart, labs , in the standard header file <stdlib.h> . Its format is also the same:
This built-in offers performance improvements because there is less call overhead associated with its use.
If you include
<stdlib.h>
, the built-in is automatically used for all occurrences of
labs
. To disable the built-in, use
#undef labs
.
The __LOCK_LONG and __UNLOCK_LONG functions provide a binary spinlock capability based on the low-order bit of a longword. The __LOCK_LONG function executes in a loop waiting for the bit to be cleared and then sets it within a load-locked/store-conditional sequence; it then issues a memory barrier. The __UNLOCK_LONG function issues a memory barrier and then zeroes the longword. The __LOCK_LONG_RETRY function returns 1 if the lock was acquired in the specified number of retries and 0 if the lock was not acquired. The __LOCK_LONG function has one of the following formats:
The __UNLOCK_LONG function has the following format:
6.2.1.39 Memory Barrier ( __MB)The __MB function directs the compiler to generate a memory barrier instruction. This function has the following format:
The __MEMCPY, __MEMMOVE, and __MEMSET built-ins are functionally equivalent to their run-time routine counterparts in the standard header file <string.h> . Their format is also the same:
These built-ins offer performance improvements because there is less call overhead associated with their use.
If you include
<string.h>
, the built-ins are automatically used for all occurrences of
memcpy
,
memmove
, and
memset
. To disable the built-ins, use
#undef memcpy
,
#undef memmove
, and
#undef memset
.
The __OR_ATOMIC_LONG function performs a bit-wise or arithmetic OR of the specified expression with the aligned longword pointed to by the address parameter within a load-locked/store-conditional code sequence. This function has the following format:
6.2.1.42 OR Atomic Quadword ( __OR_ATOMIC_QUAD)The __OR_ATOMIC_QUAD function performs a bit-wise or arithmetic OR of the specified expression with the aligned quadword pointed to by the address parameter within a load-locked/store-conditional code sequence. This function has the following format:
6.2.1.43 Privileged Architecture Library Code Instructions
The following sections describe the Privileged Architecture Library
Code (PALcode) instructions that are available as built-in functions.
This function is provided for program debugging. It switches the processor to kernel mode and pushes registers R2 through R7, the updated PC, and PS onto the kernel stack. It then dispatches to the address in the breakpoint vector, which is stored in a control block. This function has the following format:
This function is provided for error reporting. It switches the processor to kernel mode and pushes registers R2 through R7, the updated PC, and PS onto the kernel stack. It then dispatches to the address in the bugcheck vector, which is stored in a control block. This function has the following format:
This function flushes at least the entire physical page specified by the page frame number value from any data caches associated with the current processor. After a CFLUSH is done, the first subsequent load on the same processor to an arbitrary address in the target page is fetched from physical memory. This function has the following format:
6.2.1.47 __PAL_CHMEThis function allows a process to change its mode to Executive in a controlled manner. The change in mode also results in a change of stack pointers: the old pointer is saved and the new pointer is loaded. Registers R2 through R7, PS, and PC are pushed onto the selected stack. The saved PC addresses the instruction following the CHME instruction. This function has the following format:
This function allows a process to change its mode to kernel in a controlled manner. The change in mode also results in a change of stack pointers: the old pointer is saved and the new pointer is loaded. Registers R2 through R7, PS, and PC are pushed onto the kernel stack. The saved PC addresses the instruction following the CHMK instruction. This function has the following format:
This function allows a process to change its mode to Supervisor in a controlled manner. The change in mode also results in a change of stack pointers: the old pointer is saved and the new pointer is loaded. Registers R2 through R7, PS, and PC are pushed onto the selected stack. The saved PC addresses the instruction following the CHMS instruction. This function has the following format:
This function allows a process to call a routine using the change mode mechanism. Registers R2 through R7, PS, and PC are pushed onto the current stack. The saved PC addresses the instruction following the CHMU instruction. This function has the following format:
This function stalls instruction issuing until all prior instructions are guaranteed to complete without incurring aborts. This function has the following format:
This function is used for reporting run-time software conditions. This function has the following format:
6.2.1.53 __PAL_HALTThis function halts the processor when executed by a process running in kernel mode. This is a privileged function. This function has the following format:
This function inserts an entry at the front of a longword queue in an indivisible manner. This operation is interlocked against similar operations by other processors or devices in the system. This function must have write access to header and queue entries. The pointers to head and new_entry must not be equal. This function has the following format:
There are three possible return values:
| |
privacy statement and legal notices |