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 8867709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:06:27+00:00 2026-06-14T17:06:27+00:00

I am suprised to discover that under MSVS2012 with x64 plateform as target under

  • 0

I am suprised to discover that under MSVS2012 with x64 plateform as target under debug mode with optimization turn off, a long long initialization can’t be done in one instruction :

; long long l1 = 1;

    mov DWORD PTR _l1$[ebp], 1
    mov DWORD PTR _l1$[ebp+4], 0

As register are 8 bytes, I expected a instruction capable of doing it… is there one ?

  • 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-14T17:06:28+00:00Added an answer on June 14, 2026 at 5:06 pm

    Trying this in a quick console mode project that targets x64 and looking in the Disassembly window:

        long long l1 = 1;
    000000013F151035  mov         qword ptr [rsp],1
    

    Same code when targeting x86:

        long long l1 = 1;
    010213EE  mov         dword ptr [l1],1  
    010213F5  mov         dword ptr [ebp-8],0  
    

    Slam dunk, you are not actually looking at the x64 build of your program. Use Build + Configuration Manager to fix this.

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

Sidebar

Related Questions

I was quite suprised today to discover that I can't do the following. public
Was a bit suprised today to discover that my auto-increment primary key still gets
My database background is with Oracle, so I was surprised to discover that Postgres
I'm really suprised I haven't run into this problem before, but it seems that
I was suprised to see FxCop complaining that I wasn't specifying a CultureInfo in
I had been programming under the assumption that, when calling a method in C#
I'm be suprised with that include stdint.h works but include cstdint not. $ aCC
I was suprised when found that the following code throws exception at runtime: class
After using batch files for many years I was surprised to discover that the
I was surprised recently to discover that the compiler is apparently not strict about

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.