Share

SoftWire

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

Floats and Intrinsic?

You are viewing a single message from this topic. View all messages.

  1. 2005-10-14 17:28:03 UTC
    Hi TKF15H,

    First of all sorry for the very late reply, I don't check this forum often any more.

    The reason why you can't assign a floating-point constant directly is because x86 doesn't have an instruction to do this. All constants are loaded from memory. You'll have to use the SSE instructions like this:

    Float f;
    static float c = 0.5f;
    movss(f, dword_ptr [&c]);

    It seems a bit convoluted at first but makes good sense from the assembly point of view.

    I hope this helps!
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.