ieg2mips(3F)
IEG2MIPS, MIPS2IEG - Converts generic IEEE data to MIPS IEEE data and vice versa
Showing IRIX 6.5.30 (default release). Last changed in IRIX 6.5.19.
NAME IEG2MIPS, MIPS2IEG - Converts generic IEEE data to MIPS IEEE data and vice versa SYNOPSIS INTEGER IEG2MIPS, MIPS2IEG ierr = IEG2MIPS(type, num, foreign, bitoff, native, stride, natlen, forlen[,nativech]) ierr = MIPS2IEG(type, num, foreign, bitoff, native, stride, natlen, forlen[,nativech]) DESCRIPTION IEG2MIPS converts generic IEEE data types (indicated as "IEEE" in the following text) to data for systems that use MIPS IEEE data types (abbreviated as "MIPS" in the following text). MIPS2IEG converts MIPS IEEE data types to IEEE data types. All arguments must be of default kind unless documented otherwise. On IRIX systems, the default kind is KIND=4. The following is a list of valid parameters for this routine. type An integer giving the data type code, as follows. Code Description 1 Typeless (no translation; natlen and forlen must be equal and must be 8-, 16-, 32-, 64-, 128-, or 256-bits.) 2 Integer IEEE: 64-, 32-, 16, or 8-bit twos complement MIPS: 64-, 32-, 16, or 8-bit twos complement 3 Real IEEE: 32-, 64-, or 128-bit IEEE floating-point MIPS: 32-, 64-, or 128-bit MIPS IEEE floating-point 4 Complex IEEE: 2 x 32-, 64-, or 128-bit IEEE floating-point MIPS: 2 x 32-, 64-, or 128-bit MIPS IEEE floating-point 5 Logical IEEE: 64-, 32-, 16-, or 8-bit zero/nonzero logical MIPS: 64-, 32-, 16-, or 8-bit zero/nonzero logical 6 Character ASCII to ASCII; no translation. The natlen and forlen parameters select the size of the data. num Number of data items to convert. Type integer variable, expression, or constant. foreign Variable or array of any noncharacter type or length to contain data which is not native to the current system. bitoff Integer variable, expression, or constant giving the bit offset within the foreign data variable or array to begin the conversion. bitoff must be at least 0 and no more than 63. native Variable or array of any noncharacter type or length to contain data which is native to the current system. This variable or array should be of a type that corresponds to type. If type=6, use a dummy integer variable and the nativech parameter (see description of nativech). stride Integer variable or constant giving the memory increment for loading or storing data to the native array. For two and four-word items (complex and double-precision), this is a stride of items, not of words. For typeless, stride is always in words. This parameter is ignored for CHARACTER (type = 6). Data in the foreign array is loaded or stored in a continuous bit stream regardless of this parameter. natlen Native storage length of an item, in bits. For COMPLEX data, natlen counts the total size of the real and imaginary component. forlen Foreign storage length of an item, in bits. For COMPLEX data, forlen counts the total size of the real and imaginary components. nativech Optional character parameter specifying native target variable if it is of type character (type = 6). This parameter is ignored if type is not character. CAUTION The foreign and native variables should not be associated (aliased to each other). RETURN VALUES The returned function values are as follows: <0 Parameter error; no translation performed. -1 Parameter error; too few arguments or nativech not specified with type = 6. This error is not returned on IRIX systems. -2 Parameter error; invalid type. -3 Parameter error; invalid num. -4 Parameter error; invalid bitoff. -5 Parameter error; invalid natlen. -6 Parameter error; invalid forlen. -7 Unable to malloc() memory for translation. -8 Combination of natlen and forlen is invalid. -9 native must be 64-bit word-aligned. -10 foreign must be 64-bit word-aligned. 0 Translation complete; no errors. >0 Translation complete; return value is the number of integer or real values that completely overflowed during conversion. Overflows and NaNs which exist before conversion are not included.