Project Description

Valgrind currently lacks support for 80-bit extended precision floating point arithmetic on x86_64 (long double). The current implementation uses 64-bit arithmetic instead, which means that programs running on x86_64 with "long double" give different results when running under Valgrind and natively. People were asking for support for this since like forever, but to date nobody went on implementing it. It's a project for a year, unless somebody has time to work on it full time, but one has to start somewhere. :-)

Goal for this Hackweek

  • figure out what needs to be changed in the current implementation
  • figure out what are the possibilities of testing it
  • compile a list of instructions to be implemented
  • write a test program exercising every instruction to be implemented individually
    • must demonstrate no loss of accuracy
    • example: none/tests/amd64/sse4-64.c
  • clone valgrind repo and start commiting

The result of the hackweek should be the test case and some writeup on what else needs to happen.

Resources

  • https://bugs.kde.org/show_bug.cgi?id=197915
  • https://sourceware.org/git/?p=valgrind.git
  • https://en.wikipedia.org/wiki/X87
  • https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-1-manual.pdf
  • https://refspecs.linuxbase.org/elf/x86_64-SysV-psABI.pdf
  • https://valgrind.org/docs/manual/manual-core.html#manual-core.limits
  • https://en.wikibooks.org/wiki/X86Assembly/FloatingPoint

Looking for hackers with the skills:

c x86_64 valgrind assembly floating-point x86

This project is part of:

Hack Week 23

Activity

  • about 1 year ago: mbrugger liked this project.
  • about 1 year ago: dfaggioli liked this project.
  • about 1 year ago: mschreiner liked this project.
  • about 1 year ago: mschreiner joined this project.
  • about 1 year ago: wfrisch liked this project.
  • about 1 year ago: e_bischoff liked this project.
  • about 1 year ago: mfranc started this project.
  • about 1 year ago: mfranc added keyword "x86" to this project.
  • about 1 year ago: mfranc added keyword "floating-point" to this project.
  • about 1 year ago: mfranc removed keyword floatingpointarithmetic from this project.
  • about 1 year ago: mfranc added keyword "floatingpointarithmetic" to this project.
  • about 1 year ago: mfranc added keyword "assembly" to this project.
  • about 1 year ago: mfranc added keyword "valgrind" to this project.
  • about 1 year ago: mfranc added keyword "x86_64" to this project.
  • about 1 year ago: mfranc added keyword "c" to this project.
  • about 1 year ago: mfranc originated this project.

  • Comments

    Be the first to comment!

    Similar Projects

    FizzBuzz OS by mssola

    Project Description

    FizzBuzz OS (or just fbos) is an idea I've had in order to better grasp the fundamentals of the low level of a RISC-V machine. In practice, I'd like to build a small Operating System kernel that is able to launch three processes: one that simply prints "Fizz", another that prints "Buzz", and the third which prints "FizzBuzz". These processes are unaware of each other and it's up to the kernel to schedule them by using the timer interrupts as given on openSBI (fizz on % 3 seconds, buzz on % 5 seconds, and fizzbuzz on % 15 seconds).

    This kernel provides just one system call, write, which allows any program to pass the string to be written into stdout.

    This project is free software and you can find it here.

    Goal for this Hackweek

    • Better understand the RISC-V SBI interface.
    • Better understand RISC-V in privileged mode.
    • Have fun.

    Resources


    Add a machine-readable output to dmidecode by jdelvare

    Description

    There have been repeated requests for a machine-friendly dmidecode output over the last decade. During Hack Week 19, 5 years ago, I prepared the code to support alternative output formats, but didn't have the time to go further. Last year, Jiri Hnidek from Red Hat Linux posted a proof-of-concept implementation to add JSON output support. This is a fairly large pull request which needs to be carefully reviewed and tested.

    Goals

    Review Jiri's work and provide constructive feedback. Merge the code if acceptable. Evaluate the costs and benefits of using a library such as json-c.


    FizzBuzz OS by mssola

    Project Description

    FizzBuzz OS (or just fbos) is an idea I've had in order to better grasp the fundamentals of the low level of a RISC-V machine. In practice, I'd like to build a small Operating System kernel that is able to launch three processes: one that simply prints "Fizz", another that prints "Buzz", and the third which prints "FizzBuzz". These processes are unaware of each other and it's up to the kernel to schedule them by using the timer interrupts as given on openSBI (fizz on % 3 seconds, buzz on % 5 seconds, and fizzbuzz on % 15 seconds).

    This kernel provides just one system call, write, which allows any program to pass the string to be written into stdout.

    This project is free software and you can find it here.

    Goal for this Hackweek

    • Better understand the RISC-V SBI interface.
    • Better understand RISC-V in privileged mode.
    • Have fun.

    Resources


    Symbol Relations by hli

    Description

    There are tools to build function call graphs based on parsing source code, for example, cscope.

    This project aims to achieve a similar goal by directly parsing the disasembly (i.e. objdump) of a compiled binary. The assembly code is what the CPU sees, therefore more "direct". This may be useful in certain scenarios, such as gdb/crash debugging.

    Detailed description and Demos can be found in the README file:

    Supports x86 for now (because my customers only use x86 machines), but support for other architectures can be added easily.

    Tested with python3.6

    Goals

    Any comments are welcome.

    Resources

    https://github.com/lhb-cafe/SymbolRelations

    symrellib.py: mplements the symbol relation graph and the disassembly parser

    symrel_tracer*.py: implements tracing (-t option)

    symrel.py: "cli parser"