go-interpreter / wagon

wagon, a WebAssembly-based Go interpreter, for Go.
BSD 3-Clause "New" or "Revised" License
904 stars 148 forks source link

Implement basic 64-bit float operations to amd64 compiler backend. #125

Closed twitchyliquid64 closed 5 years ago

twitchyliquid64 commented 5 years ago

This PR implements a bunch more operations around floats to the amd64 backend. I have not run any benchmarks as we dont have any benches that exercise floating-point operations.

It should be safe to use SSE2 instructions as I am doing, as they will be present on all CPUs that Go supports.

The handling of NaN when performing comparison operations is a bit #yolo, let me know if you have any ideas that dont involve branching.

codecov-io commented 5 years ago

Codecov Report

Merging #125 into master will increase coverage by 0.13%. The diff coverage is 57.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #125      +/-   ##
==========================================
+ Coverage   66.55%   66.68%   +0.13%     
==========================================
  Files          41       41              
  Lines        4246     4392     +146     
==========================================
+ Hits         2826     2929     +103     
- Misses       1149     1192      +43     
  Partials      271      271
Impacted Files Coverage Δ
exec/internal/compile/scanner.go 0% <0%> (ø) :arrow_up:
exec/internal/compile/backend_amd64.go 78.75% <59.88%> (-1.07%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 41ac96a...11e8885. Read the comment docs.

sbinet commented 5 years ago

Just a quick note: I am off the grid (-ish). Will be back on Tuesday. (But sounds interesting!)

twitchyliquid64 commented 5 years ago

No worries at all :) Enjoy going dark ;)