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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:02:49+00:00 2026-06-15T04:02:49+00:00

Due to optimization reasons I thought about calling directly (with inline assembler) to the

  • 0

Due to optimization reasons I thought about calling directly (with inline assembler)
to the functions “fldl” and “fist”. Sadly I don’t get how to run it since i’m not that god in assembler.

i didn’t get further than this:

double* input;         
long long output;

__asm fldl input;      
__asm fist output;
  • 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-15T04:02:50+00:00Added an answer on June 15, 2026 at 4:02 am

    __asm fld input will actually attempt to read your pointer value as if it were a floating-point value. If you want to read a floating-point value pointed by a pointer, you have to go through a two-step process: read the address into a register and then read the data using the address in the register. On a 32-bit platform it will be something along the lines of

    __asm {
      mov eax, input
      fld qword ptr [eax]
      fistp output
    }
    

    I just tried it in VS2005 and it works. (Note that as other people stated in the comments, fist does not support storing to 64-bit long long, while fistp does. But you probably need fistp anyway, i.e. a popping store.)

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

Sidebar

Related Questions

Due to legacy reasons a lot of our data is stored encoded in standard
Due to a number of constraints that I won't get into, I have to
I have a feeling this is due to some sort of rendering optimization or
Due to a sad situation I receive HTML like this: <p>Perform the following commands:
Due to an incident a few months prior, thousands of author_ids have been deleted
Due to a bug in my javascript click handling, multiple Location objects are posted
Due to some css limitations between IE and the rest of the world I
Due to a harddrive crash, I lost my SQL server database files for a
Due to the lack of documentation for this on MSDN, I am forced to
Due to politics at the very large finanial institution for which I work, I

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.