What is the defference between movd and movss?

Posted on 2004-11-09
Last Modified: 2012-06-21
Dear all,

movd is to move 32-bit interger to xmm register.
movss is to to 32-bit floating float instead.

however, would:

movd  xmm0, DWORD PTR[eax]
movss  xmm0, DWORD PTR[eax]

be the same? Or this there a difference in speed?

Thank you.
Question by:hengck23
    LVL 11

    Expert Comment

    These are same commands according to Intel spec:
    MOVD instruction when destination operand is XMM register:
    DEST[31-0] ←SRC;
    DEST[127-32] ←000000000000000000000000H;

    MOVSS instruction when source operand is memory location and destination operand is XMM register:
    DEST[31-0] ←SRC;
    DEST[127-32] ←000000000000000000000000H;

    However they have different C/C++ Intel Compiler Intrinsics...
    Despite I think there is no speed difference, I would suggest to use movss as special SSE command.

    LVL 11

    Accepted Solution

    &#8592; supposes to mean <-
    LVL 2

    Expert Comment

    no-         movd moves 64 bit data not 32 bit
    movss is not there in 80x86 instruction set.     movs is there but it's used for moving string. i thought, i'm correct?

    byte                               (MOVB 8 bits),
    word                              (MOVW 16 bits),
    longword                        (MOVL 32 bits),
    quadword                       (MOVQ 64 bits),
    octaword                        (MOVQ 128 bits),
    single precision floating    (MOVF 32 bits),
    double precision floating   (MOVD 64 bits),
    G floating                        (MOVG 64 bits), or
    H floating                        (MOVH 128 bits)

    LVL 61

    Expert Comment

    No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

    I will leave the following recommendation for this question in the Cleanup topic area:
        Accept: dimitry {http:#12547124}

    Any objections should be posted here in the next 4 days. After that time, the question will be closed.

    EE Cleanup Volunteer

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    This paper addresses the security of Sennheiser DECT Contact Center and Office (CC&O) headsets. It describes the DECT security chain comprised of “Pairing”, “Per Call Authentication” and “Encryption”, which are all part of the standard DECT protocol.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now