| 1103 | |
| 1104 | |
| 1105 | static int cmp(Bigint *a, Bigint *b) |
| 1106 | { |
| 1107 | ULong *xa, *xa0, *xb, *xb0; |
| 1108 | int i, j; |
| 1109 | |
| 1110 | i= a->wds; |
| 1111 | j= b->wds; |
| 1112 | if (i-= j) |
| 1113 | return i; |
| 1114 | xa0= a->p.x; |
| 1115 | xa= xa0 + j; |
| 1116 | xb0= b->p.x; |
| 1117 | xb= xb0 + j; |
| 1118 | for (;;) |
| 1119 | { |
| 1120 | if (*--xa != *--xb) |
| 1121 | return *xa < *xb ? -1 : 1; |
| 1122 | if (xa <= xa0) |
| 1123 | break; |
| 1124 | } |
| 1125 | return 0; |
| 1126 | } |
| 1127 | |
| 1128 | |
| 1129 | static Bigint *diff(Bigint *a, Bigint *b, Stack_alloc *alloc) |
no outgoing calls
no test coverage detected