Binary floating-Point instructions

These functions are intended to generate binary floating-point instructions. These instructions will only be generated if the FLOAT(IEEE) option is in effect. For more information about the instructions themselves, see the topic of z/Architecture Principles of Operation.

If you want to use any of the following functions, your program must include builtins.h and be compiled with either the LANGLVL(EXTENDED) option or the LANGLVL(LIBEXT) and FLOAT(IEEE) options.

Table 1. Binary floating-point instruction prototypes
PROTOTYPE and Notes Sample Pseudo Assembly MIN ARCH
int __cfdbr(int *Op1, int M3, double Op2)

The return value is the condition code.

CFDBR R2,M3,Op2
LR   *Op3,R2
ARCH(3)
int __cfebr(int *Op1, int M3, float Op2)

The return value is the condition code.

CFEBR R2,M3,Op2
LR   *Op3,R2
ARCH(3)
int __cfxbr(int *Op1, int M3, long double Op2)

The return value is the condition code.

CFXBR R2,M3,Op2
LR   *Op3,R2
ARCH(3)
int __efpc(void)
The return value is the z/Architecture FPC.
Note: Also see functions that get and set FPC rounding modes and Definitions that support FPC register-rounding macros.
EFPC R1 ARCH(3)
float __fiebr(int M3, float Op2)

The return value is the result.

FIEBR F1,M3,Op2 ARCH(3)
double __fidbr(int M3, double Op2)

The return value is the result.

FIDBR F1,M3,Op2 ARCH(3)
long double __fixbr(int M3, long double Op2)

The return value is the result.

FIXBR F1,M3,Op2 ARCH(3)
int __didbr(double *rem, double *quotient,
          double Op3, double Op4 int M4)

The return value is the condition code.

LDR    F1,Op3
DIDBR  F1,F3,Op4,M4
LDR    *rem,F1
LDR    *quotient,F3
ARCH(3)
int __lndbr(double *Op1, double Op2)

The return value is the condition code.

LDR   F1,*Op1
LNDBR F1,Op2
LDR   *Op1,F1
ARCH(3)
int __lnxbr(long double *Op1, long double Op2)

The return value is the condition code.

LDR   F1,*Op1
LNXBR F1,Op2
LDR   *Op1,F1
ARCH(3)
int __lpdbr(double *Op1, double Op2)

The return value is the condition code.

LDR   F1,*Op1
LPDBR F1,Op2
LDR   *Op1,F1
ARCH(3)
int __lpxbr(long double *Op1, long double Op2)

The return value is the condition code.

LDR   F1,*Op1
LPXBR F1,Op2
LDR   *Op1,F1
ARCH(3)
int __diebr(float *rem, float *quotient,
            float Op3, float Op4, int M4)

The return value is the condition code.

LER    F1,Op3
DIEBR  F1,F3,Op4,M4
LER    *rem,F1
LER    *quotient,F3
ARCH(3)
int __lnebr(float *Op1, float Op2)

The return value is the condition code.

LER   F1,*Op1
LNEBR F1,Op2
LER   *Op1,F1
ARCH(3)
int __lpebr(float *Op1, float Op2)

The return value is the condition code.

LER   F1,*Op1
LPEBR F1,Op2
LER   *Op1,F1
ARCH(3)
double __madbr(double Op1, double Op2,
               double Op3)            

The return value is the result.

MADBR Op1,Op3,Op2 ARCH(3)
float __maebr(float Op1, float Op2, float Op3)

The return value is the result.

MAEBR Op1,Op3,Op2 ARCH(3)
double __msdbr(double Op1, double Op2,
               double Op3)            

The return value is the condition code.

MSDBR Op1,Op3,Op2 ARCH(3)
float __msebr(float Op1, float Op2, float Op3)

The return value is the result.

MSEBR Op1,Op3,Op2 ARCH(3)
void __sfpc(int Op1)
Only a constant literal can be passed to this built-in function.
SFPC Op1 ARCH(3)
float __sqebr(float Op2)

The return value is the square root.

SQEBR F1,Op2 ARCH(3)
double __sqdbr(double Op2)

The return value is the square root.

SQDBR F1,Op2 ARCH(3)
long double __sqxbr(long double Op2)

The return value is the square root.

SQXBR F1,Op2 ARCH(3)
void __srnm(int Op1)
SRNM Op1 ARCH(3)
int  __tceb(float Op1, int Op2)

The return value is the condition code.

TCEB Op1,Op2(0,0) ARCH(3)
int  __tcdb(double Op1, int Op2)

The return value is the condition code.

TCDB Op1,Op2(0,0) ARCH(3)
int  __tcxb(long double Op1, int Op2)

The return value is the condition code.

TCXB Op1,Op2(0,0) ARCH(3)