Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing bsr64 for MathLib #492

Merged
merged 3 commits into from
Jun 4, 2024
Merged

Conversation

kuqin12
Copy link
Contributor

@kuqin12 kuqin12 commented Jun 4, 2024

Preface

Please ensure you have read the contribution docs prior
to submitting the pull request. In particular,
pull request guidelines.

Description

When using GCC(-like) compilers to build MathLib, the sqrt_d function will use built-in functions for bit scan reverse. However, the calculation for 64 bit BSR is incorrectly using the built-in function specifically for unsigned long, which is 32-bit for CLANGPDB and cause the unit test to fail.

This change fixed the built-in function usage.

For each item, place an "x" in between [ and ] if true. Example: [x].
(you can also check items in the GitHub UI)

  • Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • Impacts security?
    • Security - Does the change have a direct security impact on an application,
      flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter
      validation improvement, ...
  • Breaking change?
    • Breaking change - Will anyone consuming this change experience a break
      in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call
      a function in a new library class in a pre-existing module, ...
  • Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • Includes documentation?
    • Documentation - Does the change contain explicit documentation additions
      outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation
      on an a separate Web page, ...

How This Was Tested

Unit test passed on QEMU SBSA platform built with CLANGPDB.

Integration Instructions

N/A

@kuqin12 kuqin12 added the type:bug Something isn't working label Jun 4, 2024
@kuqin12 kuqin12 requested review from spbrogan and os-d June 4, 2024 07:53
@kuqin12 kuqin12 enabled auto-merge (squash) June 4, 2024 16:37
@kuqin12 kuqin12 merged commit 8da8aa7 into microsoft:release/202311 Jun 4, 2024
27 of 28 checks passed
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.86%. Comparing base (3709a53) to head (99befa5).
Report is 1 commits behind head on release/202311.

Additional details and impacted files
@@               Coverage Diff               @@
##           release/202311     #492   +/-   ##
===============================================
  Coverage           10.86%   10.86%           
===============================================
  Files                 142      142           
  Lines               22379    22379           
  Branches             1808     1808           
===============================================
  Hits                 2431     2431           
  Misses              19916    19916           
  Partials               32       32           
Flag Coverage Δ
MsCorePkg 1.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kuqin12 kuqin12 deleted the fix_match branch June 4, 2024 17:11
ProjectMuBot referenced this pull request in microsoft/mu_tiano_platforms Jun 6, 2024
Introduces 8 new commits in [Common/MU](https://github.com/microsoft/mu_plus.git).

<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/microsoft/mu_plus/commit/0b2315b5f35930943382bf9aeb3712bc60753fa6">0b2315</a> pip: bump regex from 2024.5.10 to 2024.5.15 (<a href="https://github.com/microsoft/mu_plus/pull/489">#489</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/ab1129bd24b051e2f9068bb2fe7e71bb300c5283">ab1129</a> Update MorLockTestApp to fix errors with new standard return values (<a href="https://github.com/microsoft/mu_plus/pull/488">#488</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/8213f0ef0d88f9129bf82323debae78774f8da47">8213f0</a> Repo File Sync: synced file(s) with microsoft/mu_devops (<a href="https://github.com/microsoft/mu_plus/pull/490">#490</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/3709a53fb5670158f2a40b3f477730d6c0993f2c">3709a5</a> pip: bump edk2-pytool-extensions from 0.27.4 to 0.27.5 (<a href="https://github.com/microsoft/mu_plus/pull/491">#491</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/8da8aa73144066cfaf5fd404161560e63eb8bbd3">8da8aa</a> Fixing bsr64 for MathLib  (<a href="https://github.com/microsoft/mu_plus/pull/492">#492</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/33b0a0580a3b6f9221cf0620b924617c93fe4d7a">33b0a0</a> pip: bump edk2-pytool-library from 0.21.5 to 0.21.6 (<a href="https://github.com/microsoft/mu_plus/pull/493">#493</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/01651e452dcac06182a43df99e66f48402063875">01651e</a> Fix GCC Build of AdvLoggerOsConnectorPRM (<a href="https://github.com/microsoft/mu_plus/pull/494">#494</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/0a1ce577e8c8f151f33d239ff52a80d4bc652e44">0a1ce5</a> Fixing uninitialized variable used in AdvLoggerOsConnectorPrmConfigLib (<a href="https://github.com/microsoft/mu_plus/pull/495">#495</a>)</li>
</ul>
</details>

Signed-off-by: Project Mu Bot <mubot@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants