Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7859515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:55:31+00:00 2026-06-02T21:55:31+00:00

When using Microsoft Visual C++ (not CLI, just standard native C++) does inline assembly

  • 0

When using Microsoft Visual C++ (not CLI, just standard native C++) does inline assembly cause optimisation to be disabled for the function?

When I checked using IDA, some of the function code outside the block does seem to change, but I’m not sure what the cause is. The function is (relatively) simple, containing bit manipulation and some math, but no external calls.

Other possible causes I could think of are:

  • Extra provisioning to enable debugging in inline assembly.
  • Alterations to exception handling (doesn’t really look like this, though)
  • Partial inlining of something else due to some unknown compiler logic.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T21:55:31+00:00Added an answer on June 2, 2026 at 9:55 pm

    Yes. See the MSDN articles: Optimizing Inline Assembly as well as Advantages of Inline Assembly

    From the article:

    The presence of an __asm block in a function affects optimization in several ways. First, the compiler doesn’t try to optimize the __asm block itself. What you write in assembly language is exactly what you get. Second, the presence of an __asm block affects register variable storage. The compiler avoids enregistering variables across an __asm block if the register’s contents would be changed by the __asm block. Finally, some other function-wide optimizations will be affected by the inclusion of assembly language in a function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Microsoft Visual C# 2010 Express. I did not have access to
In Microsoft Visual C++ (VS 2008/2010) using a number of Standard Template Library containers
I developed a website using Microsoft Visual Web Developer 2010. I'm not a serious
I just want to ask: How do you get an application, using Microsoft Visual
Using Microsoft Visual Studio 2010: Can I write this type of macro in C?
Using: Microsoft SQL Server 2008 Microsoft Visual Studio 2010 C# .NET 4.0 WinForms Ok
I'm using Microsoft Visual C# 2008 Express. In my main form, there's that X
I am using a makefile system with the pvcs compiler (using Microsoft Visual C++,
I'm trying to write a dll plugin for Winamp. I'm using Microsoft Visual Studio
Thanks for taking some time to help me out. Using: Microsoft Visual C# 2010

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.