ARM's MULA instruction

382 views
Skip to first unread message

cherry

unread,
Apr 28, 2017, 10:06:30 AM4/28/17
to golang-dev, Ben Shi
Hello,

As seen in https://golang.org/issue/19141, ARM's MULA instruction (multiply and add) is assembled with its third operand as destination, and fourth operand as addend. This doesn't follow the convention that the destination is the last operand. Given that other flavors of multiply-and-add instructions (MULAWB, MULAWT, etc.) all follow the convention, this is an annoying inconsistency.

Ben has a CL https://go-review.googlesource.com/c/42028/ that fixes it. However, this change may break existing assembly code.

The uses of MULA in the standard library all have its third and fourth operands same, so they will not be affected by this change. I also searched Go Corpus and found no uses will be affected. Let me know if you have/know some code that will be affected.

Any objection on this change?

Thank you.


David Chase

unread,
Apr 28, 2017, 10:35:09 AM4/28/17
to cherry, golang-dev, Ben Shi
I approve, it will only hurt more later, and this counts as a bug.

--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Russ Cox

unread,
Apr 28, 2017, 12:08:03 PM4/28/17
to David Chase, cherry, golang-dev, Ben Shi
Yes, because all the uses we can find are unaffected (they don't set the two differently), please fix it.

cherry

unread,
May 5, 2017, 10:11:17 PM5/5/17
to Russ Cox, David Chase, golang-dev, Ben Shi
The CL is now submitted.

Reply all
Reply to author
Forward
0 new messages