1
2/* Compiler implementation of the D programming language
3 * Copyright (C) 2003-2019 by The D Language Foundation, All Rights Reserved
4 * written by Walter Bright
5 * http://www.digitalmars.com
6 * Distributed under the Boost Software License, Version 1.0.
7 * http://www.boost.org/LICENSE_1_0.txt
8 * https://github.com/D-Programming-Language/dmd/blob/master/src/root/checkedint.h
9 */
10
11#include "dsystem.h"
12
13
14int adds(int x, int y, bool& overflow);
15int64_t adds(int64_t x, int64_t y, bool& overflow);
16unsigned addu(unsigned x, unsigned y, bool& overflow);
17uint64_t addu(uint64_t x, uint64_t y, bool& overflow);
18
19int subs(int x, int y, bool& overflow);
20int64_t subs(int64_t x, int64_t y, bool& overflow);
21unsigned subu(unsigned x, unsigned y, bool& overflow);
22uint64_t subu(uint64_t x, uint64_t y, bool& overflow);
23
24int negs(int x, bool& overflow);
25int64_t negs(int64_t x, bool& overflow);
26
27int muls(int x, int y, bool& overflow);
28int64_t muls(int64_t x, int64_t y, bool& overflow);
29unsigned mulu(unsigned x, unsigned y, bool& overflow);
30uint64_t mulu(uint64_t x, uint64_t y, bool& overflow);
31