Naming mess...

Tim Kientzle kientzle at freebsd.org
Fri Jun 29 04:45:28 UTC 2012


On Jun 28, 2012, at 3:31 PM, Warner Losh wrote:
> On Jun 28, 2012, at 4:15 PM, Ian Lepore wrote:
> On Tue, 2012-06-26 at 22:21 -0700, Tim Kientzle wrote:
>>> 
>>> Here's what I would like to do:
>>> 
>>> * The first is a given and we should leave it alone.  The patches I'm cleaning up make this useful in the armv6 tree.
>>> 
>>> * The second I would like to move out of asm.h so it can be used in C code.  I would like to rename it to _HAVE_ARMv6_INSTRUCTIONS, which I think is clearer.  I have renamed it in my patches but not yet moved it to another header.  Suggestions appreciated.
>>> 
>>> "NEED_ARM_ARCH_6_SUPPORT" * Someday, I would like to rename the third one, though I don't have a concrete proposal yet.  ("NEED_ARM_ARCH_6_SUPPORT" is expressive but wordy; better suggestions appreciated.)
>>> 
>>> Cheers,
>>> 
>>> Tim
>>> 
>>> [0] This page has a nice table: https://wiki.edubuntu.org/ARM/Thumb2PortingHowto
>>> 
>> 
>> I'm not working with armv6 stuff yet, but I like all of what you
>> propose.  I can't help but note that NEED_ARM_ARCH_6_SUPPORT is actually
>> shorter than _HAVE_ARMv6_INSTRUCTIONS.  If it's just too wordy, maybe
>> the "NEED_" part could be left off.  
> 
> #define ARM_ARCH 6
> 
> #if ARM_ARCH >= 6
> ...
> #endif
> 
> Might not be the worst idea...

I don't think ARM ISA versions are completely
well ordered.  I seem to recall seeing a few cases
where "later" processors have dropped instructions
that were present in "earlier" processors.

Tim



More information about the freebsd-arm mailing list