Skip to content

Instantly share code, notes, and snippets.

@cyring
Created January 23, 2024 22:02
Show Gist options
  • Save cyring/4aedee2c1ab76f15fefe00527338cd85 to your computer and use it in GitHub Desktop.
Save cyring/4aedee2c1ab76f15fefe00527338cd85 to your computer and use it in GitHub Desktop.
CoreFreq Source
@cyring
Copy link
Author

cyring commented Jan 23, 2024

make -j OPTIM_LVL=1
error: ‘asmoperand has impossible constraints
diff --git a/x86_64/corefreqk.h b/x86_64/corefreqk.h
index 527473d..b0f0907 100644
--- a/x86_64/corefreqk.h
+++ b/x86_64/corefreqk.h
@@ -435,7 +435,7 @@ ASM_COUNTERx4(r10, r11, r12, r13, r14, ASM_RDTSC, mem_tsc, __VA_ARGS__)
 ASM_COUNTERx4(r10, r11, r12, r13, r14, ASM_RDTSCP, mem_tsc, __VA_ARGS__)
 
 
-#if defined(OPTIM_LVL) && OPTIM_LVL == 0
+#if defined(OPTIM_LVL) && (OPTIM_LVL == 0 || OPTIM_LVL == 1)
 
 #define RDTSC_COUNTERx5(mem_tsc, ...) \
 ASM_COUNTERx5_STACK(r12, r13, r14, r15, ASM_RDTSC, mem_tsc, __VA_ARGS__)
@@ -456,7 +456,7 @@ ASM_COUNTERx7_STACK(r13, r14, r15, ASM_RDTSC, mem_tsc, __VA_ARGS__)
 ASM_COUNTERx7_STACK(r13, r14, r15, ASM_RDTSCP, mem_tsc, __VA_ARGS__)
 
 #else
-/*     #warning "Optimization"                                         */
+/*     #warning "Optimization"                                         */
 
 #define RDTSC_COUNTERx5(mem_tsc, ...) \
 ASM_COUNTERx5(r10, r11, r12, r13, r14, r15, ASM_RDTSC, mem_tsc, __VA_ARGS__)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment