strength-reduction Questions

1

Solved

Say %edi contains x and I want to end up with 37*x using only 2 consecutive leal instructions, how would I go about this? For example to get 45x you would do leal (%edi, %edi, 8), %edi leal (%...
Alleen asked 29/9, 2017 at 1:44

2

Consider the following, simple program (adapted from this question): #include <cstdlib> int main(int argc, char** argv) { int mul1[10] = { 4, 1, 8, 6, 3, 2, 5, 8, 6, 7 }; // sum = 50 int ...
Johnjohna asked 10/6, 2015 at 8:28

2

I need to perform some integer divisions in the hot path of my code. I've already determined via profiling and cycle counting that the integer divisions are costing me. I'm hoping there's something...
Unfruitful asked 25/10, 2010 at 17:32

5

Solved

I know that add is faster as compared to mul function. I want to know how to go about using add instead of mul in the following code in order to make it more efficient. Sample code: mov eax, [e...
Ecumenicity asked 14/9, 2010 at 5:15
1

© 2022 - 2024 — McMap. All rights reserved.