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

  • Home
  • SEARCH
  • 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 9044683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:02:51+00:00 2026-06-16T11:02:51+00:00

I am trying to compile libsoxr (it is derived from libsox library by Audacity

  • 0

I am trying to compile libsoxr (it is derived from libsox library by Audacity team) library. I can compile osx 32, osx 64 and win32. They use inline asm and Windows x64 platform doesn’t support inline asm. Problematic code piece is this:

#if HAVE_FENV_H
  #include <fenv.h>
#elif defined _MSC_VER
  #define FE_INVALID    1
  #define FE_DIVBYZERO  4
  #define FE_OVERFLOW   8
  #define FE_UNDERFLOW  16
  #define FE_INEXACT    32
  #define FE_ALL_EXCEPT (FE_INEXACT|FE_DIVBYZERO|FE_UNDERFLOW|FE_OVERFLOW|FE_INVALID)
  static __inline int fetestexcept(int excepts)
  {
    short status_word;
    __asm fnstsw status_word
    return status_word & excepts & FE_ALL_EXCEPT;
  }

  static __inline int feclearexcept(int excepts)
  {
    int16_t status[14];
    __asm fnstenv status
    status[2] &= ~(excepts & FE_ALL_EXCEPT);
    __asm fldenv status
    return 0;
  }
#endif

I don’t know what fnstenv and fldenv do. May somebody guide me for making compatible with x64?

  • 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-16T11:02:52+00:00Added an answer on June 16, 2026 at 11:02 am

    Assuming that you are compiling with the Microsoft compiler then you can use RTL functions instead of inline assembly.

    To test for particular floating point status flags call _statusfp. To clear floating point status flags call _clearfp.

    In order to use _statusfp you’ll need to translate from the raw 8087 flags, to the abstract flags used by _statusfp.

    Update

    The code in the question is an implementation of a small part of fenv.h which is part of C99. It’s needed for the MS compiler since it only implements C89. In my view you would be much better off using a real C99 compiler. That would come with an implementation of fenv.h.

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

Sidebar

Related Questions

Im trying to compile a simple class library project,its from Source Safe. However,when i
I'm trying to compile a third party library for use in c++ (gmp). I
I'm trying to compile my code and I can't figure out what I'm doing
I'm trying to compile MAGMA libraries on Ubuntu 10.04, and I'm stuck. From the
When trying to compile a project with TeamCity, I am getting an error from
When trying to compile the most recent CUDA SDK from Nvidia (version 4.1.28) for
Trying to compile the example hello_world.c from the zeromq tutorial: http://zguide.zeromq.org/page:all#Ask-and-Ye-Shall-Receive Pretty sure I
While trying to compile wxWidgets-2.9.1 from source with c++0x flags using gcc-4.6 . I
I'm trying to compile a C++ file which uses the Boost library on Mac
Was trying to compile some code from this SO question and run into this

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.