Jonathan Roelofs
2014-Dec-16 14:27 UTC
[LLVMdev] Newbee question: LLVM backend regression tests for thumb1 targets on simulator possible?
On 12/16/14 3:53 AM, Kristof Beyls wrote:> I've been wondering too about how to get better ARM v6m compile-and-execute > testing going. > > As you say Jon, the non-execution-based regression tests are surprisingly > good at catching issues; but they're no full substitute for executing the > code produced by the backend for a reasonably-sized test suite. > > If somehow it would be possible to compile and run the LLVM test-suite > for v6m, I think that would be a good step forward. It would also allow > to get a buildbot going without too much effort continuously checking > basic correctness of v6m code generation. > > My guess is that the biggest hurdle would be to get linux or a similar > operating system going on a v6m/thumb1 simulator. Does anyone have an idea > if this is feasible or completely impossible?I'm working on a baremetal cross toolchain, and I would like to set up such a buildbot. There are several pieces needed before that can happen though, and the important one is remote testing support in LIT (which I'm working on)... in due time :) Jon -- Jon Roelofs jonathan at codesourcery.com CodeSourcery / Mentor Embedded
Jonathan Roelofs
2014-Dec-16 16:40 UTC
[LLVMdev] Newbee question: LLVM backend regression tests for thumb1 targets on simulator possible?
On 12/16/14 9:32 AM, Bjoern Haase wrote:> Am 16.12.2014 15:27, schrieb Jonathan Roelofs: >> I'm working on a baremetal cross toolchain, and I would like to set up such a >> buildbot. There are several pieces needed before that can happen though, and >> the important one is remote testing support in LIT (which I'm working on)... >> in due time :) >> >> Jon > This would be perfect. > > Actually, you suggested to use > > > $qemu-system-arm -semihosting -M integratorcp -cpu cortex-m0 -kernel a.out > > You have some special version of qemu? My default distribution's qemu package > did not have a cortex-M0 nor has qemu head freshly taken from git:Oh, maybe I'm thinking of an internal build of qemu. Sorry about that.> > $ qemu-arm -cpu ? > Available CPUs: > arm926 arm946 arm1026 arm1136 arm1136-r2 arm1176 arm11mpcore cortex-m3 > cortex-a8 > cortex-a8-r2 cortex-a9 cortex-a15 ti925t pxa250 sa1100 sa1110 pxa255 pxa260 > pxa261 pxa262 pxa270 pxa270-a0 pxa270-a1 pxa270-b0 pxa270-b1 xa270-c0 > pxa270-c5 any > > Still your procedure will work, just by using the m3 instead :-).Yeah, that should work for the most part, unless you emit thumb2 instructions (which will work on cortex-m3, but not m0). The list of them is pretty small though IIRC, so maybe you can write a script that disassembles & checks for them.> > Yours, > > Björn.-- Jon Roelofs jonathan at codesourcery.com CodeSourcery / Mentor Embedded
Tim Northover
2014-Dec-18 04:02 UTC
[LLVMdev] Newbee question: LLVM backend regression tests for thumb1 targets on simulator possible?
> You have some special version of qemu? My default distribution's qemu > package did not have a cortex-M0 nor has qemu head freshly taken from git:The trouble with Cortex-M0 (from a virtualised testing perspective) is that it doesn't have an MMU, so any "real" operating system environment will be far more artificial than we'd like, and probably very low down on qemu's list of priorities to boot. Testing a Thumb1 CPU with an MMU (I'm sure there are ARM11* CPUs with MMU but before Thumb2, but would need to dig into which is closest to v6m) would cover *most* issues, but obviously not the ways in which Cortex-M0 is closer to v7 than v6. Tim.