* Samuel Thibault:

> +asm (
> +"check_redzone:\n"
> +
> +"    movabs  $0x3333333333333333, %rax\n"
> +"    mov     $(128/8), %ecx\n"
> +"    lea     -128(%rsp), %rdi\n"
> +"rep stosq\n"
> +
> +"    movl    $1, startflag(%rip)\n"
> +"wait:\n"
> +"    cmpl    $0, loopflag(%rip)\n"
> +"    jne     wait\n"
> +
> +"    movabs  $0x3333333333333333, %rax\n"
> +"    mov     $(128/8), %ecx\n"
> +"    lea     -128(%rsp), %rdi\n"
> +"repe        scasq\n"
> +"    jne     fail\n"
> +
> +"    xor     %rax,%rax\n"
> +"    ret\n"
> +"fail:\n"
> +"    movq    $1,%rax\n"
> +"    ret\n"
> +);

This should probably use .text at the start and .previous at the end.
Plus .cfi_startproc and .cfi_endproc maybe.

Reply via email to