这段代码中使用的%rip是什么?

时间:2015-07-20 11:51:48

标签: assembly x86-64 gas

我反汇编了一个简单的c程序,试图学习如何加载xmm寄存器。有人可以解释这句话movdqa .LC0(%rip), %xmm0的内容。为什么不只是这个movdqa .LC0, %xmm0? %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

0 个答案:

没有答案