What is the bit width of the integer on the windowsXP_64?

Discussion in 'Windows 64bit' started by Guest, Jan 13, 2006.

  1. Guest

    Guest Guest

    Now I am interesting in the X64 oprating system, and compared the EMT64 and
    A64 to find the meaning of the 64-bit.
    the question is that on the 64-biit windows XP oerating system, what is the
    bit width of an integer, 32 bit or 64 bit?
    I think that depends on the compiler, and i want to know the which one the
    next generation compiler such as VS 2005 will choose.
    thanks very much
    Guest, Jan 13, 2006
    1. Advertisements

  2. Guest

    Rick Guest

    You can get technical documentation from the respective webs sites.
    Here is an extract about the AMD Athlon 64 CPU:

    AMD64 Technology
    – AMD64 technology instruction set extensions
    – 64-bit integer registers, 48-bit virtual addresses, 40-
    bit physical addresses
    – Eight new 64-bit integer registers (16 total)
    – Eight new 128-bit SSE/SSE2 registers (16 total)
    Rick, Jan 13, 2006
    1. Advertisements

  3. Guest

    Guest Guest

    but it mentioned that "interger register" not the integer .
    I think that the integer should be determined by the compler not the CPUs.
    is there some MS compiler on the 64-bit platform and what is the bit width
    it use?
    Guest, Jan 13, 2006
  4. Guest

    Rick Guest

    If you take the time to go to the respective web sites and look around a
    bit, there is technical data sheets for programming information, also.
    At least there is on the AMD webs site. www.amd.com
    Rick, Jan 13, 2006
  5. Guest

    Guest Guest

    Yes, I checked the EM64 (intel) developer's guide, and it describes the asm
    instruction set clearly, but no such integer description .
    So I think it should be determined by the combiler, not the CPUs.
    Guest, Jan 13, 2006
  6. No, no. The compiler has to be tuned to the CPU's registers - compiler
    'switches' can tune the output to comply with different CPU's. It is the
    registers that determine the Byte size, but, naturally, a compiler built to
    comply only up to 32 bits, cannot compile to 64 bits.

    Tony. . .
    Tony Sperling, Jan 13, 2006
  7. Guest

    Rick Guest

    Rick, Jan 13, 2006
  8. Guest

    Bo Persson Guest

    It is. VS2005 has chosen to keep both int and long at 32 bits, even
    for Windows x64.

    Some *nix implementations have chosen otherwise, like having a 32 bit
    int and a 64 bit long.

    Bo Persson
    Bo Persson, Jan 13, 2006
  9. Guest

    jacob navia Guest

    Tianbing a écrit :
    Under windows 64 bits:

    char --> 8 bits
    short --> 16 bits
    int --> 32 bits
    long --> 32 bits
    void * --> 64 bits
    __int64 64 bits

    float 32 bits
    double 64 bits

    The lcc-win64 compiler implements too:

    int128 128 bits
    long double 80 bits
    qfloat 352 bits floating point (100 digits precision)

    Note that windows 64 differs from linux 64 by making long 32 bits,
    instead of long 64 bits under linux
    jacob navia, Jan 13, 2006
  10. Guest

    Rob Stow Guest

    A compiler can be made to work with numbers - whether integers or
    reals - of *any* arbitrary length.

    For speed and efficiency, it is of course nice when the numbers
    are small enough to fit into the CPU's adders, multipiers,
    shifters, etc - but it is not an absolute necessity.

    For example, mid-level encryption methods commonly used on x86
    processors 256 bit integer math. A x86-32 processor needs to
    break those big integers up into eight 32 bit chunks in order to
    work with them - while an x86-64 processor has to deal with four
    64 bit chunks.
    Rob Stow, Jan 14, 2006
  11. Yes, I completely agree to that - I also shouldn't have answered this post
    in such an 'off hand' way. If anyone demands that I eat my hat, I will
    retire in contemplation on how to prepare it!

    But I still maintain that it is not the compiler that enforces the size of
    the INT, the compiler is in submission to the layout of the target CPU, and
    inserting special math libraries doesn't really change the generic INT that
    the machine expects the compiler to deliver, or?

    Tony. . .
    Tony Sperling, Jan 14, 2006
  12. Guest

    Bo Persson Guest

    The x64 architecture is somewhat special, in that it handles both 32
    bit and 64 bit ints equally well. So here it really is a software
    choice what size to use.

    The reasons for having all integers 32 bit in a 64 bit system, seems
    to be primarilly backwards compatibility, and an attempt to save
    memory space. The CPU hardware can cope with either choice.

    Bo Persson
    Bo Persson, Jan 14, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.