Thread: Translating tydedef from c++ to masm

  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    2

    Translating tydedef from c++ to masm

    hello,
    I have asked the c++ to translate for me the size of an existing typedef:
    typedef long long __m128
    answer in a 32 bits processor 8 bytes , 64 bits
    for a tydedef long ,4 bytes
    By the name of the variable , something say me that the answer for a 64 bits processor couldn't be the same ?

    If someone could confirm, ToutEnMasm
    Last edited by Salem; 03-06-2010 at 10:31 AM. Reason: snip fake sig - are you really here to learn, or just spam?

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    long long is 8 bytes. The size of long depends on your OS. in Windows, it's 4 bytes for x64, and in Linux, I believe it's 8 bytes for x64.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    __m128 is a 128-bit SSE register type. It is most certainly NOT 64 bits in size. Why are you attempting to "translate" this into assembly? It's an SSE register (XMM0 through XMM7), that's all.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Masm Help!
    By anirban in forum Tech Board
    Replies: 3
    Last Post: 05-30-2007, 12:05 PM
  2. VC++ 6 & MASM (eek)
    By cboard_member in forum C++ Programming
    Replies: 2
    Last Post: 07-16-2005, 10:00 AM
  3. Having trouble translating psudeo-code to real-code.
    By Lithorien in forum C++ Programming
    Replies: 13
    Last Post: 10-05-2004, 07:51 PM
  4. Translating Java to C. Mergesorting linked list.
    By Mikro in forum C Programming
    Replies: 10
    Last Post: 06-22-2004, 11:34 AM
  5. MASM 7, wont compile.
    By Xei in forum Windows Programming
    Replies: 3
    Last Post: 01-16-2003, 04:23 PM