Displaying 3 results from an estimated 3 matches for "si_int".
Did you mean:
  is_int
  
2011 Mar 10
1
[LLVMdev] compiler-rt: Infinite loop/stack overflow in __modsi3()
...patch, patterned after the correct implementation in 
umodsi3.c:
diff --git a/lib/compiler-rt/lib/modsi3.c b/lib/compiler-rt/lib/modsi3.c
index 388418a..3759ce0 100644
--- a/lib/compiler-rt/lib/modsi3.c
+++ b/lib/compiler-rt/lib/modsi3.c
@@ -16,8 +16,10 @@
  /* Returns: a % b */
+su_int __divsi3(si_int a, si_int b);
+
  si_int
  __modsi3(si_int a, si_int b)
  {
-    return a - (a / b) * b;
+    return a - __divsi3(a, b) * b;
  }
Best,
Matt
2015 Oct 24
2
[compiler-rt] Undefined negation in float emulation functions
...-rt/test/builtins/Unit/absvti2_test.c:         expected = -expected;
     compiler-rt/test/builtins/Unit/absvdi2_test.c:         expected = -expected;
I confess I don't fully understand the way these tests are written. E.g. compiler-rt/test/builtins/Unit/absvsi2_test.c:
     int test__absvsi2(si_int a)
     {
         si_int x = __absvsi2(a);
         si_int expected = a;
         if (expected < 0)
             expected = -expected;
         if (x != expected || expected < 0)
             printf("error in __absvsi2(0x%X) = %d, expected positive %d\n",
                    a, x,...
2015 Oct 20
2
[compiler-rt] Undefined negation in float emulation functions
Hi,
I recently came across the following in __floatsidf in compiler-rt:
     __floatsidf(int a) {
         ...
         if (a < 0) {
             ...
             a = -a;
In the case where a == INT_MIN, is this negation not undefined behaviour? AIUI this function is used for software 
emulation on targets that have no hardware floating point support. Perhaps there is an in-built assumption