Thread overview |
---|
February 25, 2020 iasm, lzcnt and tznct are not recognized | ||||
---|---|---|---|---|
| ||||
lzcnt and tznct are not recognized. DMD accept them. |
February 26, 2020 Re: iasm, lzcnt and tznct are not recognized | ||||
---|---|---|---|---|
| ||||
Posted in reply to Basile B. | On Tuesday, 25 February 2020 at 21:18:48 UTC, Basile B. wrote: > lzcnt and tznct are not recognized. > DMD accept them. I guess you mean in DMD-style inline asm; that part doesn't see much love. LDC-style __asm provides all of them, at least as long as using appropriate -mcpu/-mattr switches. Looks like you're trying to manually optimize bsf/bsr; I'd advise against that, standard core.bitop generates exactly these 2 instructions: https://d.godbolt.org/z/PG8GiU |
February 26, 2020 Re: iasm, lzcnt and tznct are not recognized | ||||
---|---|---|---|---|
| ||||
Posted in reply to kinke | On Wednesday, 26 February 2020 at 03:07:22 UTC, kinke wrote:
> On Tuesday, 25 February 2020 at 21:18:48 UTC, Basile B. wrote:
>> lzcnt and tznct are not recognized.
>> DMD accept them.
>
> I guess you mean in DMD-style inline asm; that part doesn't see much love. LDC-style __asm provides all of them, at least as long as using appropriate -mcpu/-mattr switches.
>
> Looks like you're trying to manually optimize bsf/bsr; I'd advise against that, standard core.bitop generates exactly these 2 instructions: https://d.godbolt.org/z/PG8GiU
indeed -mcpu solves the problem.
|
Copyright © 1999-2021 by the D Language Foundation