-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#EDITS: broken dgemm implementation for x86 SSE2
- Loading branch information
1 parent
2131d54
commit 97926a0
Showing
5 changed files
with
4,718 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
.globl asm_function | ||
asm_function: | ||
// Assembly code to add two integers | ||
// Parameters are passed in registers: a in %edi, b in %esi | ||
// Result is stored in %eax | ||
// Load a into %eax | ||
mov %edi, %eax | ||
|
||
// a + b + c - d - e + f + g - h | ||
// Parameters are passed in registers: a in %rdi, b in %rsi | ||
// Result is stored in %rax | ||
// Load a into %rax | ||
mov %rdi, %rax | ||
|
||
// Add b to %eax | ||
add %esi, %eax | ||
// Add b to %rax | ||
add %rsi, %rax | ||
|
||
// Add c to %eax | ||
add %edx, %eax | ||
// Add c to %rax | ||
add %rdx, %rax | ||
|
||
// Subtract d from %eax | ||
sub %ecx, %eax | ||
// Subtract d from %rax | ||
sub %rcx, %rax | ||
|
||
// subtract e from %rax | ||
sub %r8, %rax | ||
|
||
ret // Return | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.