Git Product home page Git Product logo

Comments (3)

jhjourdan avatar jhjourdan commented on June 16, 2024

x87 floating point arithmetic has a major problem: it uses a precision of 80 bits (64 bits mantissa, 15 bits exponent, 1 bit sign, if I am not misleading). It is very complex to emulate double precision arithmetic from 80bits arithmetic.

This is the reason for one of the oldest bug of GCC : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323.

from compcert.

 avatar commented on June 16, 2024

Indeed, for a moment I thought that maybe FPU registers "seen as" MMX could avoid that, but in fact there are no floating-point MMX instructions.
I guess that's pretty much a killer feature there! Certainly more trouble than I was expecting. Thank you for clarifying that!

from compcert.

xavierleroy avatar xavierleroy commented on June 16, 2024

Right, as jhjourdan wrote, the x87 FP stack is a poor match for CompCert. The issue with extended precision (80 bits) can be addressed to some extent by configuring the x87 in 53-bit mantissa mode. But the exponent range is still larger than that of IEEE binary64 format, so we'd need to store every intermediate result to the stack to force binary64 normalization of the exponent... That's neither pretty nor efficient!

from compcert.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.