.cfi_startproc作用是什么
void *fxcg_memset(void *dest, int c, unsigned int n) {char* d = (char*)dest;
while (n-- > 0) { *d++ = (char)c; }
return dest;
}
下面是gcc生成的汇编代码:
__Z11fxcg_memsetPvij: .LFB0: .cfi_startproc tst r6,r6 bt .L6 sts.l pr,@-r15 .cfi_def_cfa_offset 4 .cfi_offset 17, -4 mov.l .L10,r0 jsr @r0 exts.b r5,r5 lds.l @r15+,pr .cfi_restore 17 .cfi_def_cfa_offset 0 rts nop .align 1 .L6: rts mov r4,r0 .L11: .align 2 .L10: .long _memset .cfi_endproc .LFE0: .size __Z11fxcg_memsetPvij, .-__Z11fxcg_memsetPvij .section .text.startup.main,"ax",@progbits .align 1 .align 2 .global _main .type _main, @function
对于汇编我并不熟悉,as汇编也缺乏资料。比如.cfi_startproc .cfi_endproc作用是什么?它们总是用在函数里