summaryrefslogtreecommitdiff
path: root/tests/devel/try.c
diff options
context:
space:
mode:
authorMarco Bodrato <bodrato@mail.dm.unipi.it>2009-12-08 08:48:57 +0100
committerMarco Bodrato <bodrato@mail.dm.unipi.it>2009-12-08 08:48:57 +0100
commitdba4f9a8f33fcf0b3ecf4dbdf4180e96fbbc3a3b (patch)
tree05e6c4fb33d59f29193526169fe890658e1b2629 /tests/devel/try.c
parent3cac2fc788dcbc1d4c0c4277df5907c9cce37324 (diff)
downloadgmp-dba4f9a8f33fcf0b3ecf4dbdf4180e96fbbc3a3b.tar.gz
Tests for mpn_{add,sub}lsh_n, and mpn_addlsh2_n.
Diffstat (limited to 'tests/devel/try.c')
-rw-r--r--tests/devel/try.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/tests/devel/try.c b/tests/devel/try.c
index ef09e151c..516915f53 100644
--- a/tests/devel/try.c
+++ b/tests/devel/try.c
@@ -592,7 +592,10 @@ validate_sqrtrem (void)
#define TYPE_COM_N 28
#define TYPE_ADDLSH1_N 30
+#define TYPE_ADDLSH2_N 48
+#define TYPE_ADDLSH_N 49
#define TYPE_SUBLSH1_N 31
+#define TYPE_SUBLSH_N 130
#define TYPE_RSBLSH1_N 34
#define TYPE_RSBLSH2_N 46
#define TYPE_RSBLSH_N 47
@@ -894,10 +897,23 @@ param_init (void)
COPY (TYPE_ADD_N);
REFERENCE (refmpn_addlsh1_n);
+ p = &param[TYPE_ADDLSH2_N];
+ COPY (TYPE_ADD_N);
+ REFERENCE (refmpn_addlsh2_n);
+
+ p = &param[TYPE_ADDLSH_N];
+ COPY (TYPE_ADD_N);
+ p->shift = 1;
+ REFERENCE (refmpn_addlsh_n);
+
p = &param[TYPE_SUBLSH1_N];
COPY (TYPE_ADD_N);
REFERENCE (refmpn_sublsh1_n);
+ p = &param[TYPE_SUBLSH_N];
+ COPY (TYPE_ADDLSH_N);
+ REFERENCE (refmpn_sublsh_n);
+
p = &param[TYPE_RSBLSH1_N];
COPY (TYPE_ADD_N);
REFERENCE (refmpn_rsblsh1_n);
@@ -907,7 +923,7 @@ param_init (void)
REFERENCE (refmpn_rsblsh2_n);
p = &param[TYPE_RSBLSH_N];
- COPY (TYPE_ADD_N);
+ COPY (TYPE_ADDLSH_N);
REFERENCE (refmpn_rsblsh_n);
p = &param[TYPE_RSH1ADD_N];
@@ -1446,9 +1462,18 @@ const struct choice_t choice_array[] = {
#if HAVE_NATIVE_mpn_addlsh1_n
{ TRY(mpn_addlsh1_n), TYPE_ADDLSH1_N },
#endif
+#if HAVE_NATIVE_mpn_addlsh2_n
+ { TRY(mpn_addlsh2_n), TYPE_ADDLSH2_N },
+#endif
+#if HAVE_NATIVE_mpn_addlsh_n
+ { TRY(mpn_addlsh_n), TYPE_ADDLSH_N },
+#endif
#if HAVE_NATIVE_mpn_sublsh1_n
{ TRY(mpn_sublsh1_n), TYPE_SUBLSH1_N },
#endif
+#if HAVE_NATIVE_mpn_sublsh_n
+ { TRY(mpn_sublsh_n), TYPE_SUBLSH_N },
+#endif
#if HAVE_NATIVE_mpn_rsblsh1_n
{ TRY(mpn_rsblsh1_n), TYPE_RSBLSH1_N },
#endif
@@ -2020,6 +2045,7 @@ call (struct each_t *e, tryfun_t function)
case TYPE_ADD_N:
case TYPE_SUB_N:
case TYPE_ADDLSH1_N:
+ case TYPE_ADDLSH2_N:
case TYPE_SUBLSH1_N:
case TYPE_RSBLSH1_N:
case TYPE_RSBLSH2_N:
@@ -2028,6 +2054,8 @@ call (struct each_t *e, tryfun_t function)
e->retval = CALLING_CONVENTIONS (function)
(e->d[0].p, e->s[0].p, e->s[1].p, size);
break;
+ case TYPE_ADDLSH_N:
+ case TYPE_SUBLSH_N:
case TYPE_RSBLSH_N:
e->retval = CALLING_CONVENTIONS (function)
(e->d[0].p, e->s[0].p, e->s[1].p, size, shift);