flat assembler
Message board for the users of flat assembler.

Index > Main > How add two short floats numbers ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1796
Roman 25 Apr 2023, 10:40
I know exist short float(16 bits) numbers.
How add two short floats ?
How many asm commands it takes ?

Another word what do simple ? Add sse two floats or two short floats ?
Code:
mov   eax,5.0
movd  xmm1,eax
addss xmm1,xmm1
;how do this for short float ?
    
Post 25 Apr 2023, 10:40
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20343
Location: In your JS exploiting you and your system
revolution 25 Apr 2023, 10:50
F16 is a storage format, not intended to be a computation format.

So you need to convert from F16 to F32 (or F64), do the computation (add, mul, div, etc.), then convert and store again as F16.
Post 25 Apr 2023, 10:50
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1796
Roman 25 Apr 2023, 11:03
Another forum one man say, on arm easy add two short floats for one tick cup.
Post 25 Apr 2023, 11:03
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20343
Location: In your JS exploiting you and your system
revolution 25 Apr 2023, 11:15
x86 != ARM
Code:
        mov     eax,'x86'
        mov     ebx,'ARM'
        cmp     eax,ebx
        je      all_cpus_are_the_same
        jne     things_work_differently_on_different_cpus    
Smile
Post 25 Apr 2023, 11:15
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.