This file contains hidden or 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
| // SPDX-FileCopyrightText: © 2022 Phillip Trudeau-Tavara <pmttavara@protonmail.com> | |
| // SPDX-License-Identifier: 0BSD | |
| // https://hero.handmade.network/forums/code-discussion/t/7485-queryperformancefrequency_returning_10mhz_bug/2 | |
| // https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/tlfs/timers#partition-reference-tsc-mechanism | |
| #include <stdbool.h> | |
| #include <stdint.h> | |
| #define WIN32_LEAN_AND_MEAN |
This file contains hidden or 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
| #include <stdio.h> | |
| #define STR2(x) #x | |
| #define STR(x) STR2(x) | |
| #ifdef _WIN32 | |
| #define INCBIN_SECTION ".rdata, \"dr\"" | |
| #else | |
| #define INCBIN_SECTION ".rodata" | |
| #endif |
This file contains hidden or 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
| memcmp Cld | |
| Mov r10, rdi ; save | |
| Mov r11, rsi ; save | |
| Mov rdi, rcx | |
| Mov rsi, rdx | |
| Mov rcx, r8 | |
| Mov rdx, r8 | |
| Xor eax, eax | |
| Cmpsb |
This file contains hidden or 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
| memcmp Cld | |
| Mov r10, rdi ; save | |
| Mov r11, rsi ; save | |
| Mov rdi, rcx | |
| Mov rsi, rdx | |
| Mov rcx, r8 | |
| Mov rdx, r8 | |
| Xor eax, eax | |
| Cmpsb |
This file contains hidden or 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
| sed -i '/x86_64-\*-elf\*)/a \\ttmake_file=\"\${tmake_file\} i386/t-x86_64-elf\"' gcc-8.1.0/gcc/config.gcc |
This file contains hidden or 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
| #include "dynamicarray.h" | |
| using namespace std; | |
| DynamicArray::DynamicArray() { | |
| DynamicArray::DynamicArray(5); | |
| } | |
| DynamicArray::DynamicArray(int initSize) { | |
| size = initSize; |