Return T1 * T2, but diagnose any overflow and exit. */
| 4094 | /* Return T1 + T2, but diagnose any overflow and exit. |
| 4095 | This is like oadd, except the result must fit in min_time..max_time range, |
| 4096 | which on oddball machines can be a smaller range than ZIC_MIN..ZIC_MAX. */ |
| 4097 | ATTRIBUTE_PURE_114833_HACK |
| 4098 | static zic_t |
| 4099 | tadd(zic_t t1, zic_t t2) |
| 4100 | { |
| 4101 | zic_t sum = oadd(t1, t2); |
| 4102 | if (min_time <= sum && sum <= max_time) |
| 4103 | return sum; |
| 4104 | time_overflow(); |
| 4105 | } |
| 4106 | |
| 4107 | /* Return T1 * T2, but diagnose any overflow and exit. */ |
| 4108 | ATTRIBUTE_PURE_114833_HACK |
| 4109 | static zic_t |
| 4110 | omul(zic_t t1, zic_t t2) |
| 4111 | { |
| 4112 | #ifdef ckd_mul |
| 4113 | zic_t product; |
| 4114 | if (!ckd_mul(&product, t1, t2)) |
no test coverage detected