modified test and more proto

This commit is contained in:
Hane 2024-01-17 23:59:50 +01:00
commit d1343ff90c
3 changed files with 28 additions and 21 deletions

View file

@ -1 +1 @@
clang++ -DDEBUG src\proto\proto.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
clang++ -DDEBUG src\proto\proto.cpp -o build\ayo.exe -Wall -Wextra -Wpedantic -std=c++11 -g -gcodeview -Wl,-pdb= -L C:\capybara\libclang\x86_64-w64-mingw32\bin -static-libstdc++ -static --verbose

View file

@ -1,7 +1,3 @@
<<<<<<< Updated upstream
=======
//si, bueno, testx
>>>>>>> Stashed changes
/*
* THREADIN THE LINUS: https://linux.die.net/man/2/sched_setaffinity
*/
@ -29,7 +25,7 @@ Intel(R) 64 and IA-32 Architectures Software Developer's Manual Volume 3 (3A, 3B
//TSC is incremented by the base multiplier once every reference clock, so on my Xeon E5-2680 (Sandy Bridge EP) this is an increment of 27 every 10 ns
//https://github.com/jdmccalpin/low-overhead-timers/issues/1
#ifdef _WIN64
//#include <Windows.h>
@ -45,7 +41,7 @@ Intel(R) 64 and IA-32 Architectures Software Developer's Manual Volume 3 (3A, 3B
#include <stringapiset.h>
#include <synchapi.h>
#endif
#ifdef NOMESELDELINUS
#ifdef LOwOnus
//hilitos y tal
#endif
@ -53,6 +49,17 @@ Intel(R) 64 and IA-32 Architectures Software Developer's Manual Volume 3 (3A, 3B
#include <iostream>
#include "../debug.h"
uint64_t checksatr(){ //Generic
uint64_t rcx;
asm volatile (".intel_syntax noprefix\t\n" \
"mov eax, 0x80000007\t\n" \
// 080000007h\t\n"
"cpuid\t\n" : "=c" (rcx) );
//bool iTSC = rcx & (1<<6);
//"and edx, 10000000\n")
return rcx;
}
bool checkInvariantTSC(){ //Generic
uint64_t rdx;
asm volatile (".intel_syntax noprefix\t\n" \
@ -96,10 +103,11 @@ EDX Bits 31-00: Reserved = 0.
*/
char* AMDMeCagoEnTusPutosMuertos () {
char* AMDTest() {
/*
* Extended name on AMD systems when using 8000_002-4. 8000_0000 for Extpagequant/vendor. Hijos de puta.
* Now parsing 0H for standard brand name
* https://github.com/jdmccalpin/low-overhead-timers/issues/1
*/
char* palabritas = (char*)malloc(sizeof(char) * 13);
uint8_t siguienteLetra = 0;
@ -119,8 +127,8 @@ char* AMDMeCagoEnTusPutosMuertos () {
return palabritas;
}
//GMET on??????????? jfc wtf
bool AMDJoderMET(){
//GMET on??????????? Zenbros...
bool AMDGMET(){
uint64_t rdx;
asm volatile ( ".intel_syntax noprefix\t\n" \
"mov eax, 0x8000000A\t\n" \
@ -248,7 +256,7 @@ uint64_t estimandoFreq(){
valLen = MAX_VALUE_NAME;
//data NULL + len NON_NULL to get dataBufLen;
//data allocated (NON-NULL) + len NON-NULL with previous value for dataLen
//JFC MS WHY. that why we defaultin to biggis. cos not worky. ewe
//MS WHY. that why we defaultin to biggis. cos not worky. ewe
dataLen = sizeof(REG_QWORD) * (longestDataSize);
status = RegEnumValueW(key,
i,
@ -278,9 +286,7 @@ uint64_t estimandoFreq(){
)
) {
//dataLen = dataLen * 2lu;
/* BROS YO ES QUE ME VOY A CAGAR EN SUS PUTOS MUERTOS
* AS&iacute; QUE PIDES DOS VECES, UNA TAMA&nacute;O, OTRA A TOPE PRESISO, EH
* PUTA BASURA DE API
/* We do be usin' well designed APIs......
* status = RegEnumValueW(key,
* i,
* valName,
@ -312,14 +318,15 @@ uint64_t estimandoFreq(){
int main(int argc, char** argv){
//AMD Momento
char* opiniones = AMDMeCagoEnTusPutosMuertos();
bool w11 = AMDJoderMET();
char* opiniones = AMDTest();
bool w11 = AMDGMET();
for (int i = 0; i < 3; i++) {
uint64_t isItActually32GHz = estimandoFreq();
log_debugcpp("ayo we found " << isItActually32GHz << " flash knuckle");
}
int64_t juas = getFreqFromReg();
log_debugcpp("JODER " << juas);
log_debugcpp("satr " << checksatr());
log_debugcpp("Invariant " << checkInvariantTSC());
//iwintewel
//Cordura

View file

@ -53,7 +53,7 @@ int main(int argc, char** argv){
if(timer == nullptr)
return -2;
uint64_t wfr = getQPCFrequency();
int64_t fr = timer->getBaseFrequency();
int64_t fr = 3193999000;//timer->getBaseFrequency();
uint64_t wt1 = getQPCTicks();