An assembly program to add floating-point numbersΒΆ

    .intel_syntax noprefix

    .text
    .global main
main:   push    rbp
    mov rbp, rsp

    movq    xmm0, [rip + a]
    movq    xmm1, [rip + b]
    addsd   xmm1, xmm0
    movq    [rip + c], xmm1

    mov rax, 0
    pop rbp
    ret

    .data
a:  .double 12.3
b:  .double 45.6

    .bss
c:  .zero   8
You have attempted of activities on this page