www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Inline Assembler bug fixes

reply Walter Bright <newshound2 digitalmars.com> writes:
The inline assembler is a surprisingly compact piece of code for what it does, 
but is overly complex. It's also not used that much, so it has tended to be 
neglected, and bug reports have slowly accumulated for it. Some were 10 years
old.

But, once one figures out how it works, might as well go through the bug list 
for iasm and see what can be done about them.

I'm happy to report that it has been whittled down to 3:

https://issues.dlang.org/show_bug.cgi?id=12635 - the description is a little 
vague and I can't determine what the issue actually is

https://issues.dlang.org/show_bug.cgi?id=12878 - this one is a bit complicated 
to fix, but fortunately isn't critical

https://issues.dlang.org/show_bug.cgi?id=15242 - an enhancement request, not a
bug

The list:

https://issues.dlang.org/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&keywords=iasm&keywords_type=allwords&list_id=232881&query_format=advanced

My apologies to those who have been suffering waiting for these fixes.

Happy Assembling!
Aug 28 2020
next sibling parent Nils Lankila <NilsLankila gmx.us> writes:
On Saturday, 29 August 2020 at 06:36:03 UTC, Walter Bright wrote:
 The inline assembler is a surprisingly compact piece of code 
 for what it does, but is overly complex. It's also not used 
 that much, so it has tended to be neglected, and bug reports 
 have slowly accumulated for it. Some were 10 years old.

 But, once one figures out how it works, might as well go 
 through the bug list for iasm and see what can be done about 
 them.

 I'm happy to report that it has been whittled down to 3:

 https://issues.dlang.org/show_bug.cgi?id=12635 - the 
 description is a little vague and I can't determine what the 
 issue actually is

 https://issues.dlang.org/show_bug.cgi?id=12878 - this one is a 
 bit complicated to fix, but fortunately isn't critical

 https://issues.dlang.org/show_bug.cgi?id=15242 - an enhancement 
 request, not a bug

 The list:

 https://issues.dlang.org/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&keywords=iasm&keywords_type=allwords&list_id=232881&query_format=advanced

 My apologies to those who have been suffering waiting for these 
 fixes.

 Happy Assembling!
Thanks, that was a nice initiative. There's another remaining one actually : https://issues.dlang.org/show_bug.cgi?id=16045. It's about accessing global variable with -fPIC enabled. I believe this should work using RIP (https://godbolt.org/z/a18vnj) but this is not the case.
Aug 29 2020
prev sibling next sibling parent rikki cattermole <rikki cattermole.co.nz> writes:
Nice!
Aug 29 2020
prev sibling next sibling parent Stefan Koch <uplink.coder googlemail.com> writes:
On Saturday, 29 August 2020 at 06:36:03 UTC, Walter Bright wrote:
 The inline assembler is a surprisingly compact piece of code 
 for what it does, but is overly complex. It's also not used 
 that much, so it has tended to be neglected, and bug reports 
 have slowly accumulated for it. Some were 10 years old.

 [...]
Please fix this one as well: https://issues.dlang.org/show_bug.cgi?id=18826
Aug 29 2020
prev sibling next sibling parent tsbockman <thomas.bockman gmail.com> writes:
On Saturday, 29 August 2020 at 06:36:03 UTC, Walter Bright wrote:
 But, once one figures out how it works, might as well go 
 through the bug list for iasm and see what can be done about 
 them.

 I'm happy to report that it has been whittled down to 3:

 https://issues.dlang.org/show_bug.cgi?id=12635 - the 
 description is a little vague and I can't determine what the 
 issue actually is

 https://issues.dlang.org/show_bug.cgi?id=12878 - this one is a 
 bit complicated to fix, but fortunately isn't critical

 https://issues.dlang.org/show_bug.cgi?id=15242 - an enhancement 
 request, not a bug

 The list:

 https://issues.dlang.org/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&keywords=iasm&keywords_type=allwords&list_id=232881&query_format=advanced
I discovered that the VCVTPS2PH instruction is broken a while back, but didn't know to tag my issue "iasm" so it didn't show up in your search: https://issues.dlang.org/show_bug.cgi?id=20111
Aug 29 2020
prev sibling next sibling parent reply Avrina <avrina12309412342 gmail.com> writes:
On Saturday, 29 August 2020 at 06:36:03 UTC, Walter Bright wrote:
 I'm happy to report that it has been whittled down to 3:

 ...

 https://issues.dlang.org/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&keywords=iasm&keywords_type=allwords&list_id=232881&query_format=advanced

 My apologies to those who have been suffering waiting for these 
 fixes.

 Happy Assembling!
I count 13. What'd you say about Bugzilla not being a problem before? That if someone wanted to they could easily find the issues they were looking for? I hope the irony isn't lost on you.
Aug 30 2020
next sibling parent reply Nils Lankila <NilsLankila gmx.us> writes:
On Sunday, 30 August 2020 at 12:39:10 UTC, Avrina wrote:
 On Saturday, 29 August 2020 at 06:36:03 UTC, Walter Bright 
 wrote:
 I'm happy to report that it has been whittled down to 3:

 ...

 https://issues.dlang.org/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&keywords=iasm&keywords_type=allwords&list_id=232881&query_format=advanced

 My apologies to those who have been suffering waiting for 
 these fixes.

 Happy Assembling!
I count 13. What'd you say about Bugzilla not being a problem before? That if someone wanted to they could easily find the issues they were looking for? I hope the irony isn't lost on you.
There was indeed only 3 when he wrote his announce... but bugs are not always reviewed after their creation so often the keywords are missing. For the 10 news, the keyword has been added after the announce.
Aug 30 2020
parent Walter Bright <newshound2 digitalmars.com> writes:
On 8/30/2020 5:54 AM, Nils Lankila wrote:
 There was indeed only 3 when he wrote his announce... but bugs are not always 
 reviewed after their creation so often the keywords are missing. For the 10 
 news, the keyword has been added after the announce.
I knew this would happen, it was part of my reason for making the post. Better use of the keywords helps a lot. Related bugs often provide valuable clues to fixing problems, and the keywords find related bugs.
Aug 30 2020
prev sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 8/30/2020 5:39 AM, Avrina wrote:
 https://issues.dlang.org/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&keywords=iasm&keywords_type=allwords&list_id=232881&q
ery_format=advanced 
I count 13.
That's because people have responded to my post by reclassifying unclassified bugs as iasm bugs. Take a look at the URL above, it only counts bugs with the 'iasm' keyword. Properly classifying bugs when posting them works well.
Aug 30 2020
prev sibling next sibling parent Guillaume Piolat <first.name gmail.com> writes:
On Saturday, 29 August 2020 at 06:36:03 UTC, Walter Bright wrote:
 https://issues.dlang.org/show_bug.cgi?id=15242 - an enhancement 
 request, not a bug
FWIW this can be closed, I've needed this in the past but since `intel-intrinsics` the amount of assembly code I maintain has reduced (but wasn't totally eliminated).
Aug 30 2020
prev sibling parent reply Mathias LANG <geod24 gmail.com> writes:
On Saturday, 29 August 2020 at 06:36:03 UTC, Walter Bright wrote:
 The inline assembler is a surprisingly compact piece of code 
 for what it does, but is overly complex. It's also not used 
 that much, so it has tended to be neglected, and bug reports 
 have slowly accumulated for it. Some were 10 years old.

 [...]

 My apologies to those who have been suffering waiting for these 
 fixes.

 Happy Assembling!
Thanks Walter. This kind of targeted work aiming to plug all holes in one feature / part of the language is really useful!
Aug 30 2020
parent Walter Bright <newshound2 digitalmars.com> writes:
On 8/30/2020 7:58 AM, Mathias LANG wrote:
 Thanks Walter. This kind of targeted work aiming to plug all holes in one 
 feature / part of the language is really useful!
I agree. It's also much more efficient to fix bugs this way. I don't use much the inline assembler anymore, but there is another great use for it - learning assembly language! Iasm helps because you can concentrate on learning the instructions while not being concerned about all the boilerplate needed to create a functioning program. The Intel assembler syntax (which DMD's iasm uses) is also much easier to read than the syntax used by others, in large part because it matches Intel's documentation.
Aug 30 2020