Skip to content

[X86][clang] 128bit floating-point operations in x86 machines #77401

@CoTinker

Description

@CoTinker

testcase:

#include <fenv.h>
#include <stdlib.h>
#include <stdio.h>

int main (void)
{
  volatile __float128 a = 0x0.fffp-16382q, b = 0x0.fffp0q, c;
  c = a / b;
  if (fetestexcept (FE_UNDERFLOW | FE_INEXACT))
    printf("Fail1\n");
  if (c != 0x1p-16382q)
    printf("Fail2\n");
  exit (0);
}

compile command:

% clang test.c -o test -lm -m32
% ./test
Fail1
Fail2

compile in x86_64 will return normally, but x86 output Fail.
https://godbolt.org/z/vhdsMhd8d

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions