This is an archive of the discontinued LLVM Phabricator instance.

Disable forcing -marm (A32 instruction set) while running testsuite on arm targets.
ClosedPublic

Authored by omjavaid on Nov 19 2015, 8:20 AM.

Details

Summary

This patch disables forcing -marm (A32 instruction set) while running lldb testsuite on arm targets.

gcc uses -marm and -mthumb flag to choose between A32 and T32 instruction sets. For most processors A32 (arm mode) code is generated by default but many modern cpus also use T32 code generation as the default or a mix of both.

If we do not provide a flag then compiler decides the best possible code generation for the target which is most commonly used configuration.

Thats why i have removed this flag from out testing so that we can have a clarity on what is working when compiler selects both A32/T32 and T16 instructions interchangeably.

Diff Detail

Repository
rL LLVM

Event Timeline

omjavaid updated this revision to Diff 40652.Nov 19 2015, 8:20 AM
omjavaid retitled this revision from to Disable forcing -marm (A32 instruction set) while running testsuite on arm targets..
omjavaid updated this object.
omjavaid added reviewers: tberghammer, clayborg.
omjavaid added a subscriber: lldb-commits.
tberghammer edited edge metadata.Nov 19 2015, 9:20 AM

Can we create a setup where the test suit is capable of running in all 3 mode (arm/thumb/mixed)?

I think we should introduce a new architecture called "arm-thumb" (open for better name suggestions) what run the test suit in mixed mode while running the test suit with "-A arm" or "-A thumb" should still force the architecture to the specified one.

clayborg accepted this revision.Nov 19 2015, 9:51 AM
clayborg edited edge metadata.
This revision is now accepted and ready to land.Nov 19 2015, 9:51 AM

-mthumb and -marm are compiler flags so we can put these into our CXX or CFLAGS if we need to run those configurations.

I agree that it can be specified by CFALGS and CXXFLAGS but we will need some way in the test suit to xfail a test based on the instruction set and sometime we also need different test expectations based on it. Doing these based on C(XX)FALGS is a bit problematic so this is why I suggesting to represent them as different architectures. An other valid solution would be to add a new argument to the test system where we can specify the instruction set but it is more work and I am not sure if it worth the effort.

I agree with you on having multiple configuration options to help identify failures in different configurations.

What I mean is that we should keep clarity on architecture that is to use arm or aarch32 for 32bit and aarch64 for 64bit. With that we should run tests in default configurations which compiler is offering that means not to use any -m(arch) flag. This will help us Xfail based on architecture in default configuration.

Additional config option that we ll add later can take up values to test some additional flags specifying ABI and ISA features like thumb, nothumb, interwork, vfp, neon, soft float, hard float etc. We can then xfail if something fails based on these additional feature.

tberghammer accepted this revision.Nov 23 2015, 7:39 AM
tberghammer edited edge metadata.

I agree with your suggestion to make this the default config and then add a new option where we can specify additional target specific options and then skip/xfail tests based on that.

This revision was automatically updated to reflect the committed changes.