summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins/addvdi3.c
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/builtins/addvdi3.c')
-rw-r--r--compiler-rt/lib/builtins/addvdi3.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/compiler-rt/lib/builtins/addvdi3.c b/compiler-rt/lib/builtins/addvdi3.c
index c186ecb2042..bdba1f57279 100644
--- a/compiler-rt/lib/builtins/addvdi3.c
+++ b/compiler-rt/lib/builtins/addvdi3.c
@@ -17,19 +17,14 @@
/* Effects: aborts if a + b overflows */
-COMPILER_RT_ABI di_int
-__addvdi3(di_int a, di_int b)
-{
- di_int s = (du_int) a + (du_int) b;
- if (b >= 0)
- {
- if (s < a)
- compilerrt_abort();
- }
- else
- {
- if (s >= a)
- compilerrt_abort();
- }
- return s;
+COMPILER_RT_ABI di_int __addvdi3(di_int a, di_int b) {
+ di_int s = (du_int)a + (du_int)b;
+ if (b >= 0) {
+ if (s < a)
+ compilerrt_abort();
+ } else {
+ if (s >= a)
+ compilerrt_abort();
+ }
+ return s;
}
OpenPOWER on IntegriCloud