x86_64: fix popcount without POPCNT
Commit 68b2f597ec moved the argument from RDI to RCX, but the `popcount-slow` function wasn't updated. Related to racket/racket#3150 original commit: 80ffa4eea197a885cd647fcfb76dda720b64781d
This commit is contained in:
parent
c7f4261611
commit
0d225f5505
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user