* soft-fp/quad.h (union _FP_UNION_Q): Add longs structure.
* sysdeps/alpha/Implies: Add alpha/soft-fp.
* sysdeps/alpha/soft-fp/sfp-machine.h: Rewrite for GEM interface.
* sysdeps/alpha/Subdirs, sysdeps/alpha/soft-fp/Makefile,
sysdeps/alpha/soft-fp/Versions, sysdeps/alpha/soft-fp/local-soft-fp.h,
sysdeps/alpha/soft-fp/ots_add.c, sysdeps/alpha/soft-fp/ots_cmp.c,
sysdeps/alpha/soft-fp/ots_cmpe.c, sysdeps/alpha/soft-fp/ots_cvtqux.c,
sysdeps/alpha/soft-fp/ots_cvtqx.c, sysdeps/alpha/soft-fp/ots_cvttx.c,
sysdeps/alpha/soft-fp/ots_cvtxq.c, sysdeps/alpha/soft-fp/ots_cvtxt.c,
sysdeps/alpha/soft-fp/ots_div.c, sysdeps/alpha/soft-fp/ots_mul.c,
sysdeps/alpha/soft-fp/ots_nintxq.c, sysdeps/alpha/soft-fp/ots_sub.c:
New files.
2004-03-06 20:46:23 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <soft-fp.h>
|
|
|
|
#include <quad.h>
|
|
|
|
|
|
|
|
/* Helpers for the Ots functions which receive long double arguments
|
|
|
|
in two integer registers, and return values in $16+$17. */
|
|
|
|
|
2014-11-17 17:20:02 +00:00
|
|
|
#define AXP_UNPACK_RAW_Q(X, val) \
|
|
|
|
do { \
|
|
|
|
union _FP_UNION_Q _flo; \
|
* soft-fp/quad.h (union _FP_UNION_Q): Add longs structure.
* sysdeps/alpha/Implies: Add alpha/soft-fp.
* sysdeps/alpha/soft-fp/sfp-machine.h: Rewrite for GEM interface.
* sysdeps/alpha/Subdirs, sysdeps/alpha/soft-fp/Makefile,
sysdeps/alpha/soft-fp/Versions, sysdeps/alpha/soft-fp/local-soft-fp.h,
sysdeps/alpha/soft-fp/ots_add.c, sysdeps/alpha/soft-fp/ots_cmp.c,
sysdeps/alpha/soft-fp/ots_cmpe.c, sysdeps/alpha/soft-fp/ots_cvtqux.c,
sysdeps/alpha/soft-fp/ots_cvtqx.c, sysdeps/alpha/soft-fp/ots_cvttx.c,
sysdeps/alpha/soft-fp/ots_cvtxq.c, sysdeps/alpha/soft-fp/ots_cvtxt.c,
sysdeps/alpha/soft-fp/ots_div.c, sysdeps/alpha/soft-fp/ots_mul.c,
sysdeps/alpha/soft-fp/ots_nintxq.c, sysdeps/alpha/soft-fp/ots_sub.c:
New files.
2004-03-06 20:46:23 +00:00
|
|
|
_flo.longs.a = val##l; \
|
|
|
|
_flo.longs.b = val##h; \
|
2014-11-17 17:20:02 +00:00
|
|
|
FP_UNPACK_RAW_QP(X, &_flo); \
|
* soft-fp/quad.h (union _FP_UNION_Q): Add longs structure.
* sysdeps/alpha/Implies: Add alpha/soft-fp.
* sysdeps/alpha/soft-fp/sfp-machine.h: Rewrite for GEM interface.
* sysdeps/alpha/Subdirs, sysdeps/alpha/soft-fp/Makefile,
sysdeps/alpha/soft-fp/Versions, sysdeps/alpha/soft-fp/local-soft-fp.h,
sysdeps/alpha/soft-fp/ots_add.c, sysdeps/alpha/soft-fp/ots_cmp.c,
sysdeps/alpha/soft-fp/ots_cmpe.c, sysdeps/alpha/soft-fp/ots_cvtqux.c,
sysdeps/alpha/soft-fp/ots_cvtqx.c, sysdeps/alpha/soft-fp/ots_cvttx.c,
sysdeps/alpha/soft-fp/ots_cvtxq.c, sysdeps/alpha/soft-fp/ots_cvtxt.c,
sysdeps/alpha/soft-fp/ots_div.c, sysdeps/alpha/soft-fp/ots_mul.c,
sysdeps/alpha/soft-fp/ots_nintxq.c, sysdeps/alpha/soft-fp/ots_sub.c:
New files.
2004-03-06 20:46:23 +00:00
|
|
|
} while (0)
|
|
|
|
|
2014-11-17 17:20:02 +00:00
|
|
|
#define AXP_UNPACK_SEMIRAW_Q(X, val) \
|
|
|
|
do { \
|
|
|
|
union _FP_UNION_Q _flo; \
|
|
|
|
_flo.longs.a = val##l; \
|
|
|
|
_flo.longs.b = val##h; \
|
|
|
|
FP_UNPACK_SEMIRAW_QP(X, &_flo); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
#define AXP_UNPACK_Q(X, val) \
|
|
|
|
do { \
|
|
|
|
AXP_UNPACK_RAW_Q(X, val); \
|
|
|
|
_FP_UNPACK_CANONICAL(Q, 2, X); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
#define AXP_PACK_RAW_Q(val, X) FP_PACK_RAW_QP(&val##_flo, X)
|
|
|
|
|
|
|
|
#define AXP_PACK_SEMIRAW_Q(val, X) \
|
|
|
|
do { \
|
|
|
|
_FP_PACK_SEMIRAW(Q, 2, X); \
|
|
|
|
AXP_PACK_RAW_Q(val, X); \
|
* soft-fp/quad.h (union _FP_UNION_Q): Add longs structure.
* sysdeps/alpha/Implies: Add alpha/soft-fp.
* sysdeps/alpha/soft-fp/sfp-machine.h: Rewrite for GEM interface.
* sysdeps/alpha/Subdirs, sysdeps/alpha/soft-fp/Makefile,
sysdeps/alpha/soft-fp/Versions, sysdeps/alpha/soft-fp/local-soft-fp.h,
sysdeps/alpha/soft-fp/ots_add.c, sysdeps/alpha/soft-fp/ots_cmp.c,
sysdeps/alpha/soft-fp/ots_cmpe.c, sysdeps/alpha/soft-fp/ots_cvtqux.c,
sysdeps/alpha/soft-fp/ots_cvtqx.c, sysdeps/alpha/soft-fp/ots_cvttx.c,
sysdeps/alpha/soft-fp/ots_cvtxq.c, sysdeps/alpha/soft-fp/ots_cvtxt.c,
sysdeps/alpha/soft-fp/ots_div.c, sysdeps/alpha/soft-fp/ots_mul.c,
sysdeps/alpha/soft-fp/ots_nintxq.c, sysdeps/alpha/soft-fp/ots_sub.c:
New files.
2004-03-06 20:46:23 +00:00
|
|
|
} while (0)
|
|
|
|
|
2014-11-17 17:20:02 +00:00
|
|
|
#define AXP_PACK_Q(val, X) \
|
|
|
|
do { \
|
|
|
|
_FP_PACK_CANONICAL(Q, 2, X); \
|
|
|
|
AXP_PACK_RAW_Q(val, X); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
#define AXP_DECL_RETURN_Q(X) union _FP_UNION_Q X##_flo
|
* soft-fp/quad.h (union _FP_UNION_Q): Add longs structure.
* sysdeps/alpha/Implies: Add alpha/soft-fp.
* sysdeps/alpha/soft-fp/sfp-machine.h: Rewrite for GEM interface.
* sysdeps/alpha/Subdirs, sysdeps/alpha/soft-fp/Makefile,
sysdeps/alpha/soft-fp/Versions, sysdeps/alpha/soft-fp/local-soft-fp.h,
sysdeps/alpha/soft-fp/ots_add.c, sysdeps/alpha/soft-fp/ots_cmp.c,
sysdeps/alpha/soft-fp/ots_cmpe.c, sysdeps/alpha/soft-fp/ots_cvtqux.c,
sysdeps/alpha/soft-fp/ots_cvtqx.c, sysdeps/alpha/soft-fp/ots_cvttx.c,
sysdeps/alpha/soft-fp/ots_cvtxq.c, sysdeps/alpha/soft-fp/ots_cvtxt.c,
sysdeps/alpha/soft-fp/ots_div.c, sysdeps/alpha/soft-fp/ots_mul.c,
sysdeps/alpha/soft-fp/ots_nintxq.c, sysdeps/alpha/soft-fp/ots_sub.c:
New files.
2004-03-06 20:46:23 +00:00
|
|
|
|
|
|
|
/* ??? We don't have a real way to tell the compiler that we're wanting
|
|
|
|
to return values in $16+$17. Instead use a volatile asm to make sure
|
|
|
|
that the values are live, and just hope that nothing kills the values
|
|
|
|
in between here and the end of the function. */
|
2014-11-17 17:20:02 +00:00
|
|
|
#define AXP_RETURN_Q(X) \
|
|
|
|
do { \
|
|
|
|
register long r16 __asm__("16") = X##_flo.longs.a; \
|
|
|
|
register long r17 __asm__("17") = X##_flo.longs.b; \
|
|
|
|
asm volatile ("" : : "r"(r16), "r"(r17)); \
|
|
|
|
} while (0)
|