This is an archive of the discontinued LLVM Phabricator instance.

Add kalimba sub-architecture variants to llvm::Triple
ClosedPublic

Authored by mg11 on Aug 29 2014, 2:25 AM.

Details

Reviewers
echristo
Summary

The kalimba architecture currently has 3 important variants. I need to add support to recognise those variants into lldb. This patch adds the required variants as SubArchs and provides the relevant mappings when parsing the architecture part of a Triple string.

Diff Detail

Event Timeline

mg11 updated this revision to Diff 13070.Aug 29 2014, 2:25 AM
mg11 retitled this revision from to Add kalimba sub-architecture variants to llvm::Triple.
mg11 updated this object.
mg11 edited the test plan for this revision. (Show Details)
mg11 added a reviewer: echristo.
echristo edited edge metadata.Sep 3 2014, 10:47 AM

Inline comment.

lib/Support/Triple.cpp
250

Do you have a lot of things that begin with kalimba?

mg11 added a comment.Sep 3 2014, 10:10 PM

"Do you have a lot of things that begin with kalimba?"

We currently have 3 such things: kalimba3, kalimba4 and kalimba5, where those strings are embedded at the front of the triple string passed back over gdb-remote to lldb. E.g. "kalimba4-csr-unknown". The number being reflective of the architecture revision of the kalimba processor.

I had originally chosen the ".Cases" construct to parse my string, however I subsequently changed this to ".StartsWith" to reduce verbosity. Both the ways achieved my goal at the time, so I don't really mind which is used by parseArch.

echristo accepted this revision.Sep 4 2014, 1:23 PM
echristo edited edge metadata.

OK then. Normally I'd suggest we keep it simple and parse each of them separately, but if you expect to have a lot of architectures such that you are going to need to do this for each then go ahead. Otherwise grab each separately. Either way the patch is OK.

-eric

This revision is now accepted and ready to land.Sep 4 2014, 1:23 PM
mg11 added a comment.Sep 5 2014, 12:00 AM

Eric Christopher wrote:

OK then. Normally I'd suggest we keep it simple and parse each of them separately, but if you expect to have a lot of architectures such that you are going to need to do this for each then go ahead. Otherwise grab each separately. Either way the patch is OK.

-eric

http://reviews.llvm.org/D5115

To report this email as spam click https://www.mailcontrol.com/sr/MZbqvYs5QwJvpeaetUwhCQ== .

Thanks Eric

I've rebased my original diff against the trunk and submitted it.

Matt

Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc.
New for 2014, you can now access the wide range of products powered by aptX at www.aptx.com.

Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in r217229.