-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
81 changed files
with
13,250 additions
and
1,808 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 |
---|---|---|
|
@@ -19,6 +19,9 @@ | |
out* | ||
*temp* | ||
|
||
data/data.cc | ||
!data/pattern.dat | ||
|
||
*.dot | ||
optimize/*.png | ||
optimize/*/*.png | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/** @file asm.h | ||
* @brief This file includes some macros for inline assembly. | ||
*/ | ||
|
||
#ifndef ASM_H | ||
#define ASM_H | ||
|
||
#define asm_rol(brd,val) \ | ||
asm volatile( \ | ||
"rol %1, %0;" \ | ||
: "+r"(brd) \ | ||
: "c"(char(val)) \ | ||
) | ||
|
||
#define asm_ror(brd,val) \ | ||
asm volatile( \ | ||
"ror %1, %0;" \ | ||
: "+r"(brd) \ | ||
: "c"(char(val)) \ | ||
) | ||
|
||
#define asm_bswap(brd) \ | ||
asm volatile( \ | ||
"bswap %0;" \ | ||
: "+r"(brd) \ | ||
) | ||
|
||
#define asm_popcnt(brd,result) \ | ||
asm volatile( \ | ||
"popcnt %1, %0;" \ | ||
: "=r"(result) \ | ||
: "r"(brd) \ | ||
) | ||
|
||
#define asm_tzcnt(brd,result) \ | ||
asm volatile( \ | ||
"tzcnt %1, %0;" \ | ||
:"=r"(result) \ | ||
:"r"(brd) \ | ||
) | ||
|
||
#define asm_pext(brd, mask, result) \ | ||
asm volatile( \ | ||
"pext %1, %2, %0;" \ | ||
: "=r"(result) \ | ||
: "r"(mask), "r"(brd) \ | ||
) | ||
|
||
#define asm_pdep(brd, mask, result) \ | ||
asm volatile( \ | ||
"pdep %1, %2, %0;" \ | ||
: "=r"(result) \ | ||
: "r"(mask), "r"(brd) \ | ||
) | ||
|
||
#endif //ASM_H |
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.