kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

x64_isa_core.s (354B)


      1 // x64 descriptor-backed assembler coverage.
      2 .text
      3 .globl test_main
      4 test_main:
      5     pushq %rbp
      6     movq %rsp, %rbp
      7     movq $4294967296, %rax
      8     movq %rax, -8(%rbp)
      9     movq -8(%rbp), %rcx
     10     leaq -8(%rbp), %rdx
     11     addq %rcx, %rax
     12     subq $1, %rax
     13     imulq $3, %rax, %rax
     14     cmpq %rcx, %rax
     15     sete %sil
     16     movzbl %sil, %eax
     17     popq %rbp
     18     ret