This is an archive of the discontinued LLVM Phabricator instance.

Handle ARMv6KZ naming
ClosedPublic

Authored by tyomitch on Nov 11 2015, 3:51 AM.

Details

Summary
  • ARMv6KZ is the "canonical" name, given in the ARMARM
  • ARMv6Z is an "official abbreviation" for it, mentioned in the ARMARM
  • ARMv6ZK is a popular misspelling, which we should support as an alias.

The patch corrects the handling of the names.

Functional changes:

  • ARMv6Z no longer treated as an architecture in its own right
  • ARMv6ZK renamed to ARMv6KZ, accepting ARMv6ZK as an alias
  • arm1176jz-s and arm1176jzf-s recognized as ARMv6ZK, instead of ARMv6K
  • default ARMv6K CPU changed to arm1176j-s

Diff Detail

Event Timeline

tyomitch updated this revision to Diff 39899.Nov 11 2015, 3:51 AM
tyomitch retitled this revision from to Handle ARMv6KZ naming.
tyomitch updated this object.
tyomitch added reviewers: rengolin, logan, compnerd.
tyomitch added a subscriber: llvm-commits.
rengolin edited edge metadata.Nov 11 2015, 12:47 PM

Same comment as the other similar review: what's the motivation behind this?

I don't want to break legacy systems, I don't know what legacy systems there are out there using these names, and I don't want to find out by breaking their stuff and getting a bug report 6 months from now when all will be forgotten.

I don't think having those extra names has such a big compile-time impact to warrant removal without a clear reason.

Same comment as the other similar review: what's the motivation behind this?

I don't want to break legacy systems, I don't know what legacy systems there are out there using these names, and I don't want to find out by breaking their stuff and getting a bug report 6 months from now when all will be forgotten.

I don't think having those extra names has such a big compile-time impact to warrant removal without a clear reason.

Same as for the other patch, all of these names will continue to be accepted as aliases, but only the ARMARM-endorsed would be used throughout the source code.

rengolin added inline comments.Nov 11 2015, 4:08 PM
unittests/ADT/TripleTest.cpp
863

This example came from somewhere I can't remember... Maybe FreeBSD? Or RPi?

tyomitch added inline comments.Nov 12 2015, 4:13 AM
unittests/ADT/TripleTest.cpp
863

This comes from your patch from half a year ago (r237797) which changed the triple being tested from "armv6-unknown-freebsd" to "armv6k-unknown-eabi".

I suspect you were thus recording the existing state of the target parser, rather than an intention behind it?

I'm not sure it makes a lot of sense to have an ARMv6KZ core the default CPU for both ARMv6K and ARMv6KZ.
If one wants to target ARMv6KZ, they would specify ARMv6KZ as the target, wouldn't they?

rengolin accepted this revision.Nov 16 2015, 4:17 AM
rengolin edited edge metadata.

LGTM, thanks!

unittests/ADT/TripleTest.cpp
863

If one wants to target ARMv6KZ, they would specify ARMv6KZ as the target, wouldn't they?

The problem here is how systems *do* reference those architectures and not how they *should*.

However, I'm willing to sacrifice legacy in name of clarity. In the long run, it's probably cheaper to deal with a few backslashes than carry legacy forever for no apparent reason.

This revision is now accepted and ready to land.Nov 16 2015, 4:17 AM
tyomitch updated this revision to Diff 40278.Nov 16 2015, 6:03 AM
tyomitch edited edge metadata.

Rebased over r253198

Closed by commit rL253206: Handle ARMv6KZ naming (authored by askrobov). · Explain WhyNov 16 2015, 6:08 AM
This revision was automatically updated to reflect the committed changes.
test/MC/ARM/directive-arch-armv6z.s