annotate gcc/testsuite/gcc.c-torture/compile/pr60655-1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1 /* { dg-options "-fdata-sections" { target { { ! { { hppa*-*-hpux* } && { ! lp64 } } } && { ! "nvptx-*-* pdp11-*-*" } } } } */
111
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 typedef unsigned char unit;
kono
parents:
diff changeset
4 typedef unit *unitptr;
kono
parents:
diff changeset
5 extern short global_precision;
kono
parents:
diff changeset
6 typedef __SIZE_TYPE__ size_t;
kono
parents:
diff changeset
7 extern void *memcpy (void *dest, const void *src, size_t n);
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 short mp_compare(const unit* r1, const unit* r2)
kono
parents:
diff changeset
10 {
kono
parents:
diff changeset
11 register short precision;
kono
parents:
diff changeset
12 precision = global_precision;
kono
parents:
diff changeset
13 (r1) = ((r1)+(precision)-1);
kono
parents:
diff changeset
14 (r2) = ((r2)+(precision)-1);
kono
parents:
diff changeset
15 do
kono
parents:
diff changeset
16 { if (*r1 < *r2)
kono
parents:
diff changeset
17 return(-1);
kono
parents:
diff changeset
18 if (*((r1)--) > *((r2)--))
kono
parents:
diff changeset
19 return(1);
kono
parents:
diff changeset
20 } while (--precision);
kono
parents:
diff changeset
21 }
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 static unit modulus[((1280+(2*8))/8)];
kono
parents:
diff changeset
24 static unit d_data[((1280+(2*8))/8)*2];
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 int upton_modmult (unitptr prod, unitptr multiplicand, unitptr multiplier)
kono
parents:
diff changeset
27 {
kono
parents:
diff changeset
28 unitptr d = d_data;
kono
parents:
diff changeset
29 while (mp_compare(d,modulus) > 0)
kono
parents:
diff changeset
30 memcpy((void*)(prod), (const void*)(d), (global_precision));
kono
parents:
diff changeset
31 }