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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:41:42+00:00 2026-06-16T02:41:42+00:00

I have found that CIL compiller allows type native float . However, CLR doesn’t

  • 0

I have found that CIL compiller allows type native float. However, CLR doesn’t allow it. Has it any uses? What is its size? Is there a corresponding .NET type? I tried to implement it as a pseudo-primitive type:

.class public sequential ansi serializable sealed beforefieldinit NativeFloat
  extends System.ValueType
{
  .field assembly native float m_value
}

However, this type isn’t supported by CLR. Thank you for your help.

Edit: If you’re insterested, its CorElementType is 26 (0x1a, R).

  • 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-16T02:41:44+00:00Added an answer on June 16, 2026 at 2:41 am

    From the CIL ECMA spec, I.12.1.1 Native size: native int, native unsigned int, O and &:

    The native-size types (native int, native unsigned int, O, and &) are
    a mechanism in the CLI for deferring the choice of a value’s size.
    These data types exist as CIL types; however, the CLI maps each to the
    native size for a specific processor. (For example, data type I would
    map to int32 on a Pentium processor, but to int64 on an IA64
    processor.) So, the choice of size is deferred until JIT compilation
    or runtime, when the CLI has been initialized and the architecture is
    known. This implies that field and stack frame offsets are also not
    known at compile time.

    Now, having said that, native float (as opposed to native int) is not mentioned a single time in the ECMA spec. The only evidence I can find of it is in some open source CIL assemblers, where they throw an exception stating that they cannot generate an opcode for native float.

    If Microsoft’s CIL compiler does in fact accept this type, I would imagine that this was a feature Microsoft intended to implement but did not eventually end up putting into MSIL (CIL’s predecessor). Additionally, if the assembler does in fact produce an opcode instead of an error message, I could conceivably imagine (though again, this is speculation) that there may be variant’s of Microsoft’s CLR (perhaps .NET Micro Framework or a particular version of Silverlight, or something) that supports the opcode.

    Also note that in the spec above, the CLI is mentioned. The CLR is merely Microsoft’s implementation of the CLI.

    The ECMA spec does mention a native floating point type, but it isn’t native float:

    F, a floating point value (float32, float64, or other representation
    supported by the underlying hardware)

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

Sidebar

Related Questions

I have found that: When I type the following on terminal: php -i |
I have found that firefox has excellent support for showing unicode text correctly. But
I have found that ultramysql meets my requirement. But it has no document, and
I have found that changing the pixel format in a SurfaceView has a large
i have found that WebBrowser control (both Winforms and WPF) has certain javascript constructs
I have found that Scala always has a natural explanation to anything. Always something
I have found that there is related topic.However, there are some difference because the
I have found that there is generally a singe type or namespace that takes
I have found that I have no problem using require to load something like
I have found that call stack helps in finding the line number of a

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.