Displaying 3 results from an estimated 3 matches for "__absv".
2015 Oct 25
2
[compiler-rt] Undefined negation in float emulation functions
On 26/10/15 02:54, Joerg Sonnenberger wrote:
> On Sun, Oct 25, 2015 at 06:46:48AM -0400, Steve Canon via llvm-dev wrote:
>> On Oct 24, 2015, at 6:02 PM, Chris Lattner <clattner at apple.com> wrote:
>>>
>>>
>>>> On Oct 23, 2015, at 7:43 PM, Matthew Fernandez via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>>>> On 21/10/15 00:15,
2015 Oct 24
2
[compiler-rt] Undefined negation in float emulation functions
...compiler-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",...
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