;; SPDX-License-Identifier: BSD-2-Clause
;; Copyright 2010-2020 The NASM Authors - All Rights Reserved

;;
;; fp.mac
;;
;; Floating-point utility macros
;;

USE: fp

%define	Inf		__?Infinity?__
%define NaN		__?QNaN?__
%define QNaN		__?QNaN?__
%define SNaN		__?SNaN?__

%define float8(x)	__?float8?__(x)
%define float16(x)	__?float16?__(x)
%define bfloat16(x)     __?bfloat16?__(x)
%define float32(x)	__?float32?__(x)
%define float64(x)	__?float64?__(x)
%define float80m(x)	__?float80m?__(x)
%define float80e(x)	__?float80e?__(x)
%define float128l(x)	__?float128l?__(x)
%define float128h(x)	__?float128h?__(x)

%imacro bf16 1-*.nolist
  %rep %0
    dw __?bfloat16?__(%1)
    %rotate 1
  %endrep
%endmacro
