diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index e16321d0..a3ecc1dc 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -1755,33 +1755,35 @@ void SourceView::RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t ip auto oit = std::lower_bound( uarch->ops, uarch->ops + uarch->numOps, opid, []( const auto& l, const auto& r ) { return l->id < r; } ); if( oit != uarch->ops + uarch->numOps && (*oit)->id == opid ) { - int selVar = -1; const auto& op = *oit; + std::vector> res; + res.reserve( op->numVariants ); for( int i=0; inumVariants; i++ ) { const auto& var = *op->variant[i]; if( var.descNum == line.params.size() ) { + int penalty = 0; bool match = true; for( int j=0; jvariant[selVar]; + pdqsort_branchless( res.begin(), res.end(), []( const auto& l, const auto& r ) { return l.second < r.second; } ); + const auto& var = *op->variant[res[0].first]; if( m_font ) ImGui::PopFont(); ImGui::BeginTooltip(); TextFocused( "Throughput:", RealToString( var.tp ) ); @@ -1832,10 +1834,10 @@ void SourceView::RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t ip TextDisabledUnformatted( "Operands:" ); ImGui::SameLine(); bool first = true; - for( auto& v : line.params ) + for( int i=0; i