diff --git a/s/cpnanopass.ss b/s/cpnanopass.ss index c91d1056ad..bd38f64418 100644 --- a/s/cpnanopass.ss +++ b/s/cpnanopass.ss @@ -13670,7 +13670,7 @@ ,(constant-case architecture [(x86_64) `(seq - (set! ,%rax (inline ,(make-info-inline) ,%popcount ,%rdi)) + (set! ,%rax (inline ,(make-info-inline) ,%popcount ,%rcx)) (asm-c-return ,null-info ,%rax))] [else ;; Generate anything, since this should not get called diff --git a/s/x86_64.ss b/s/x86_64.ss index 5c187b9915..9cb5b3e869 100644 --- a/s/x86_64.ss +++ b/s/x86_64.ss @@ -1642,9 +1642,9 @@ (asm-helper-call code* target dest-rax)] [else ;; Used for the body of `popcount-slow`. - ;; This is the sequence generated by LLVM's __builtin_popcountl() - ;; __builtin_popcountl() intrinsic, but with pushes and pops - ;; to save used registers other than the result register %rax. + ;; This is the sequence generated by LLVM's __builtin_popcountl(), + ;; but with pushes and pops to save used registers other than the + ;; result register %rax. (emit-literal-code (op dest-rax src-rcx code*) 51 ; pushq %rcx 57 ; pushq %rdi