What is% rip used in this code?

I parsed a simple c program to try and figure out how to load the xmm register. Can someone please explain what is happening with this statement movdqa .LC0(%rip), %xmm0

. Why not just that movdqa .LC0, %xmm0

? What's the point of% rip?

    .file   "test.c"
    .section    .rodata.str1.1,"aMS",@progbits,1
.LC1:
    .string "%d"
    .text
    .globl  main
    .type   main, @function
main:
.LFB2497:
    .cfi_startproc
    subq    $8, %rsp
    .cfi_def_cfa_offset 16
    movdqa  .LC0(%rip), %xmm0
    movl    $.LC1, %esi
    movl    $1, %edi
    movl    $1, %eax
    call    __printf_chk
    movl    $0, %eax
    addq    $8, %rsp
    .cfi_def_cfa_offset 8
    ret
    .cfi_endproc
.LFE2497:
    .size   main, .-main
    .section    .rodata.cst16,"aM",@progbits,16
    .align 16
.LC0:
    .quad   12884901892
    .quad   4294967298
    .ident  "GCC: (Ubuntu 4.9.2-10ubuntu13) 4.9.2"
    .section    .note.GNU-stack,"",@progbits

      

+3


source to share





All Articles