Skip to content
Snippets Groups Projects
Commit 061da11b authored by Yuanzhe Zhou's avatar Yuanzhe Zhou
Browse files

Q8 done

parent 4faa69eb
Branches
Tags
2 merge requests!10Tp1,!5WIP: Tp1
# Empty dependencies file for axpy.
# This may be replaced when dependencies are built.
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
CMakeFiles/axpy.dir/tests/axpy.cpp.o: ../src/utils.hpp
CMakeFiles/axpy.dir/tests/axpy.cpp.o: ../tests/axpy.cpp
......@@ -14,7 +14,24 @@ extern "C" long int axpy(const long int* vec0, const long int* vec1,
__asm__(
".global axpy \n"
"axpy: \n"
"ret;\n"
"testq %rdx, %rdx \n"
"jle .L4 \n"
"leaq 0(,%rdx,8), %rcx \n"
"xorl %eax, %eax \n"
"xorl %r8d, %r8d \n"
".L3: \n"
"movq (%rdi,%rax), %rdx \n"
"imulq (%rsi,%rax), %rdx \n"
"addq $8, %rax \n"
"addq %rdx, %r8 \n"
"cmpq %rax, %rcx \n"
"jne .L3 \n"
"movq %r8, %rax \n"
"ret \n"
".L4: \n"
"xorl %r8d, %r8d \n"
"movq %r8, %rax \n"
"ret; \n"
);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment