conversion of assembly

Posted by lego69 on Stack Overflow See other posts from Stack Overflow or by lego69
Published on 2010-05-23T05:57:47Z Indexed on 2010/05/23 6:00 UTC
Read the original article Hit count: 489

Filed under:

hello, can somebody please explain is it possible to convert this snippet of the code to assembly of pdp11?

movq    %rdi, -8(%rbp)
    movl    %esi, -12(%rbp)
    movl    %edx, -16(%rbp)
    movl    -16(%rbp), %eax
    cltq
    leaq    0(,%rax,4), %rdi
    movq    -8(%rbp), %r8
    movl    -12(%rbp), %eax
    cltq
    leaq    0(,%rax,4), %rcx
    movq    -8(%rbp), %rsi
    movl    -16(%rbp), %eax
    cltq
    leaq    0(,%rax,4), %rdx
    movq    -8(%rbp), %rax
    movl    (%rdx,%rax), %eax
    addl    (%rcx,%rsi), %eax
    movl    %eax, (%rdi,%r8)
    movl    -12(%rbp), %eax
    cltq
    leaq    0(,%rax,4), %rdi
    movq    -8(%rbp), %r8
    movl    -16(%rbp), %eax
    cltq
    leaq    0(,%rax,4), %rcx
    movq    -8(%rbp), %rsi
    movl    -12(%rbp), %eax
    cltq
    leaq    0(,%rax,4), %rdx
    movq    -8(%rbp), %rax
    movl    (%rdx,%rax), %edx
    movl    (%rcx,%rsi), %eax
    subl    %edx, %eax
    movl    %eax, (%rdi,%r8)
    movl    -16(%rbp), %eax
    cltq
    leaq    0(,%rax,4), %rdi
    movq    -8(%rbp), %r8
    movl    -16(%rbp), %eax
    cltq
    leaq    0(,%rax,4), %rcx
    movq    -8(%rbp), %rsi
    movl    -12(%rbp), %eax
    cltq
    leaq    0(,%rax,4), %rdx
    movq    -8(%rbp), %rax
    movl    (%rdx,%rax), %edx
    movl    (%rcx,%rsi), %eax
    subl    %edx, %eax
    movl    %eax, (%rdi,%r8)
    leave
    ret

it is only small part of all code that I have...

© Stack Overflow or respective owner

Related posts about assembly