This is an archive of the discontinued LLVM Phabricator instance.

Fix TestRegisterVariables.py on Windows
ClosedPublic

Authored by amccarth on Apr 26 2016, 11:29 AM.

Details

Summary

32-bit Windows calling conventions, by default, don't pass arguments in registers, but this test expects at least one of them to be.

By adding attribute((regparm(x))) to the functions, we can get the compiler to enregister some of the parameters, and the test passes.

I don't think this should have a negative impact on other platforms, but I haven't tried.

Diff Detail

Repository
rL LLVM

Event Timeline

amccarth updated this revision to Diff 55050.Apr 26 2016, 11:29 AM
amccarth retitled this revision from to Fix TestRegisterVariables.py on Windows.
amccarth updated this object.
amccarth added a reviewer: tfiala.
amccarth added a subscriber: lldb-commits.
tfiala accepted this revision.Apr 26 2016, 2:53 PM
tfiala edited edge metadata.

Seems reasonable. We can revert and fix if this breaks something.

This revision is now accepted and ready to land.Apr 26 2016, 2:53 PM
This revision was automatically updated to reflect the committed changes.