Skip to content

interpret floating point binop instructions#46

Merged
can-lehmann merged 13 commits into
mainfrom
can-float-interp
Jun 10, 2026
Merged

interpret floating point binop instructions#46
can-lehmann merged 13 commits into
mainfrom
can-float-interp

Conversation

@can-lehmann

Copy link
Copy Markdown
Owner

No description provided.

@can-lehmann can-lehmann changed the title interpret floating point instructions interpret floating point binop instructions Jun 10, 2026
@github-actions

Copy link
Copy Markdown

Coverage

File Lines Functions Regions Branches
genext.hpp 🔴 54.42% 🟡 83.33% 🟡 76.14% 🟡 76.81%
jitir.hpp 🔴 51.20% 🔴 61.44% 🔴 55.81% 🔴 54.97%
jitir_llvmapi.hpp 🔴 56.19% 🔴 66.67% 🟢 92.98% 🔴 66.67%
llvmgen.hpp 🔴 64.40% 🟡 70.00% 🟡 83.71% 🟡 83.90%
lowerllvm.hpp 🔴 63.60% 🟡 75.00% 🔴 41.32% 🔴 56.49%
x86gen.hpp 🟡 74.12% 🟡 81.82% 🟡 75.78% 🟡 83.30%
x86insts.inc.hpp - - - -
TOTAL 🔴 56.21% 🔴 65.73% 🔴 64.26% 🔴 65.46%
Diff Coverage

Diff Coverage

Diff: origin/main...HEAD, staged and unstaged changes

  • jitir.hpp (87.5%): Missing lines 293,6316,6321,6323-6324
  • llvmgen.hpp (100%)

Summary

  • Total: 50 lines
  • Missing: 5 lines
  • Coverage: 90%

jitir.hpp

Lines 289-297

  289   }
  290 
  291   inline Type int_type_of_size(size_t size) {
  292     return int_type_of_width(size * 8);
! 293   }
  294 
  295   template <class T, class S>
  296   inline T bit_cast(S value) {
  297     static_assert(sizeof(T) == sizeof(S));

Lines 6312-6328

  6312             case Type::Float32: { \
  6313               float32_t a = bit_cast<float32_t>((uint32_t) _a); \
  6314               float32_t b = bit_cast<float32_t>((uint32_t) _b); \
  6315               return Bits::constant(expr); \
! 6316             } \
  6317             case Type::Float64: { \
  6318               float64_t a = bit_cast<float64_t>(_a); \
  6319               float64_t b = bit_cast<float64_t>(_b); \
  6320               return Bits::constant(expr); \
! 6321             } \
  6322             default: \
! 6323               assert(false && "Unsupported type"); \
! 6324               return Bits::constant(type, 0); \
  6325           } \
  6326         }
  6327       
  6328       float_binop(add_f, a + b)

@can-lehmann
can-lehmann marked this pull request as ready for review June 10, 2026 00:21
@can-lehmann
can-lehmann merged commit 216c573 into main Jun 10, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant