Page MenuHomePhabricator

[x86] Fix getAddressFromInstr
Needs ReviewPublic

Authored by mlemay-intel on Nov 28 2016, 9:46 AM.



Fix getAddressFromInstr so that it copies displacements of global variable

Event Timeline

mlemay-intel retitled this revision from to [x86] Fix getAddressFromInstr.
mlemay-intel updated this object.
mlemay-intel added a subscriber: llvm-commits.
qcolombet edited edge metadata.Jan 25 2017, 10:50 AM


Do you have a test case to go along this?



Could you describe what is missing?

I don't have a test case yet, since I have only encountered this issue while developing a pass that I have not yet open-sourced. However, I'll look for where else this routine is used and I'll see if I can generate a test based on that.

mlemay-intel added inline comments.Jan 27 2017, 11:59 AM

I'm not familiar with all of the different types of memory operands, but I'm concerned that additional types may not be handled properly here given this issue with handling global address operands. Just to pick one more example, perhaps external symbol operands need special handling, but I'm not sure. Maybe I should revise my comment to "FIXME: Special handling may be required for additional types of operands below."

Added test.