ayo we found the asmforce
This commit is contained in:
parent
2e9d3e51cd
commit
4f4abbec47
5 changed files with 50 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
build/
|
||||
1
build.bat
Normal file
1
build.bat
Normal file
|
|
@ -0,0 +1 @@
|
|||
clang++ src\main.cpp -o build\ayo.exe -Wall -Wextra -Wpedantic -std=c++11 -g -gcodeview -Wl,-pdb= -L C:\capybara\libclang\x86_64-w64-mingw32\bin -l c++ -l unwind -static --verbose
|
||||
10
src/debug.h
Normal file
10
src/debug.h
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#if defined (QT_DEBUG) || defined (DEBUG) || defined (_DEBUG)
|
||||
|
||||
#define log_debugcpp(str) do { \
|
||||
std::cout << "[DEBUG]" << "(" << __FILE__ << ":" << __LINE__ << "): " << str << std::endl; \
|
||||
} while (0)
|
||||
#else
|
||||
#define log_debugcpp(str)
|
||||
#endif
|
||||
15
src/global.h
Normal file
15
src/global.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#pragma once
|
||||
|
||||
//TODO enum capullo
|
||||
#define ENDPOINT_MASTER_VOLUME -1
|
||||
#define ENDPOINT_LEFT_CHANNEL_VOLUME 0
|
||||
#define ENDPOINT_RIGHT_CHANNEL_VOLUME 1
|
||||
|
||||
#define STRING_MUTE "Mute"
|
||||
#define STRING_UNMUTE "Unmute"
|
||||
//INIT BACK
|
||||
|
||||
|
||||
class OverseerHandler;
|
||||
extern OverseerHandler *osh;
|
||||
|
||||
23
src/main.cpp
Normal file
23
src/main.cpp
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef DEBUG
|
||||
#define DEBUG
|
||||
#endif
|
||||
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include "debug.h"
|
||||
|
||||
//static inline
|
||||
uint64_t rdtscp()// uint32_t & aux )
|
||||
{
|
||||
uint64_t raxlo,rdxho;
|
||||
asm volatile ( "cpuid\n" \
|
||||
//"rdtscp\n" : "=a" (raxlo), "=d" (rdxho), "=c" (aux) : : );
|
||||
"rdtsc\n" : "=a" (raxlo), "=d" (rdxho));
|
||||
return (rdxho << 32) + raxlo;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv){
|
||||
uint64_t test = rdtscp();
|
||||
log_debugcpp(test);
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue