digitalmars.D.learn - popcnt instruction
- Archibald (4/4) Jun 24 2014 Hello,
- Justin Whear (2/6) Jun 24 2014 D's inline assembler is described here: http://dlang.org/iasm.html
- Rene Zwanenburg (3/11) Jun 24 2014 There's also an intrinsic in core.bitop:
- Archibald (6/19) Jun 24 2014 Thanks for the answers.
- Justin Whear (3/8) Jun 24 2014 DMD 2.065 seems to support it. What compiler are you using and what
- Justin Whear (2/2) Jun 24 2014 Also, see:
- Archibald (5/7) Jun 24 2014 "its not documented on the inline assembler page."
Hello, I need to use the "popcnt" processor instruction in a performance critical section. Is there a way to do this in D?
Jun 24 2014
On Tue, 24 Jun 2014 16:34:42 +0000, Archibald wrote:Hello, I need to use the "popcnt" processor instruction in a performance critical section. Is there a way to do this in D?D's inline assembler is described here: http://dlang.org/iasm.html
Jun 24 2014
On Tuesday, 24 June 2014 at 17:05:24 UTC, Justin Whear wrote:On Tue, 24 Jun 2014 16:34:42 +0000, Archibald wrote:There's also an intrinsic in core.bitop: http://dlang.org/library/core/bitop/popcnt.htmlHello, I need to use the "popcnt" processor instruction in a performance critical section. Is there a way to do this in D?D's inline assembler is described here: http://dlang.org/iasm.html
Jun 24 2014
On Tuesday, 24 June 2014 at 17:27:09 UTC, Rene Zwanenburg wrote:On Tuesday, 24 June 2014 at 17:05:24 UTC, Justin Whear wrote:Thanks for the answers. Unfortunately it seems like popcnt isn't supported by D's inline assembler. What if I import it as an external C function, will I get optimal performance?On Tue, 24 Jun 2014 16:34:42 +0000, Archibald wrote:There's also an intrinsic in core.bitop: http://dlang.org/library/core/bitop/popcnt.htmlHello, I need to use the "popcnt" processor instruction in a performance critical section. Is there a way to do this in D?D's inline assembler is described here: http://dlang.org/iasm.html
Jun 24 2014
On Tue, 24 Jun 2014 19:44:52 +0000, Archibald wrote:Thanks for the answers. Unfortunately it seems like popcnt isn't supported by D's inline assembler. What if I import it as an external C function, will I get optimal performance?DMD 2.065 seems to support it. What compiler are you using and what errors are you getting?
Jun 24 2014
Also, see: http://forum.dlang.org/thread/alirjgygnwpifkijxtjo forum.dlang.org
Jun 24 2014
On Tuesday, 24 June 2014 at 19:56:29 UTC, Justin Whear wrote:Also, see: http://forum.dlang.org/thread/alirjgygnwpifkijxtjo forum.dlang.org"its not documented on the inline assembler page." That's why I thought it wasn't supported, it's not in the list of supported opcodes. Thanks for the help!
Jun 24 2014