2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr21291.c
blobb597509854b26f6994add789d4090b0afcf28354
1 /* The asm has 2 "r" in/out operands, 1 earlyclobber "r" output, 1 "r"
2 input and 2 fixed "r" clobbers (eax and edx), so there are a total of
3 6 registers that must not conflict. Add to that the PIC register,
4 the frame pointer, and the stack pointer, and we've run out of
5 registers on 32-bit targets. */
6 /* { dg-do compile } */
7 /* { dg-options "-O" } */
9 typedef unsigned long bngdigit;
10 typedef bngdigit *bng;
11 typedef unsigned int bngcarry;
12 typedef unsigned long bngsize;
14 bngdigit
15 bng_ia32_mult_sub_digit (bng a, bngsize alen, bng b, bngsize blen, bngdigit d)
17 bngdigit out, tmp;
18 bngcarry carry;
19 bngdigit a11;
21 alen -= blen;
22 out = 0;
23 asm (""
24 : "+r" (a), "+r" (b), "+mr" (blen), "+mr" (out), "=&r" (tmp)
25 : "mr" (d)
26 : "eax", "edx");
27 if (alen == 0)
29 a11 = out;
30 goto t;
33 a11 = 1;
35 return a11;