From 1ace4055f79f304750839d73c46bbcaeb994f1b5 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 17 Jun 2011 20:17:05 +0000 Subject: Implement mulo4 for use in signed overflow checking. Fixes rdar://9219742 and rdar://9218244 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@133284 91177308-0d34-0410-b5e6-96231b3b80d8 --- README.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'README.txt') diff --git a/README.txt b/README.txt index cbeb10cf9..b37c0aecd 100644 --- a/README.txt +++ b/README.txt @@ -106,6 +106,15 @@ si_int __mulvsi3(si_int a, si_int b); // a * b di_int __mulvdi3(di_int a, di_int b); // a * b ti_int __mulvti3(ti_int a, ti_int b); // a * b + +// Integral arithmetic which returns if overflow + +si_int __mulosi4(si_int a, si_int b, int* overflow); // a * b, overflow set to one if result not in signed range +di_int __mulodi4(di_int a, di_int b, int* overflow); // a * b, overflow set to one if result not in signed range +ti_int __muloti4(ti_int a, ti_int b, int* overflow); // a * b, overflow set to + one if result not in signed range + + // Integral comparison: a < b -> 0 // a == b -> 1 // a > b -> 2 -- cgit v1.2.3