Skip to content
Snippets Groups Projects
Commit f7117983 authored by tracer-nju's avatar tracer-nju Committed by guo zling
Browse files

Static hostname: starker-HYM-WXX

       Icon name: computer-laptop
         Chassis: laptop
      Machine ID: 9f936e1bf87b4e7cb0e53e5422bcaf22
         Boot ID: 6807ca8cb19d46b2879623d3aaa1c492
Operating System: Ubuntu 22.04.2 LTS
          Kernel: Linux 5.19.0-45-generic
    Architecture: x86-64
 Hardware Vendor: HONOR
  Hardware Model: HYM-WXX
 16:43:21 up  1:43,  1 user,  load average: 0.46, 0.50, 0.61
parent aff07ffb
No related branches found
No related tags found
No related merge requests found
......@@ -19,12 +19,12 @@ int asm_popcnt(uint64_t x) {
"shrq %[i], %[x] \t\n" //x >>= i
"movq %[x], %[temp] \t\n" //x -> tempx
"andq $1, %[temp] \t\n"
"addl, %[temp], %[s] \t\n" //s+=?1
"addl %[temp], %[s] \t\n" //s+=?1
"shlq %[i], %[x] \t\n"
"addi $1, %[i] \t\n" //循环末尾部分
"addl $1, %[i] \t\n" //循环末尾部分
"cmpl $64, %[i] \t\n"
"blt .Loop \n"
"jlt .Loop \n"
:[s] "+r" (s), [i] "+r" (i), [x] "+r" (x), [temp]"+r"(temp)
);
return s;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment