libzypp  13.10.6
Arch.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #include <iostream>
13 #include <list>
14 #include <inttypes.h>
15 
16 #include "zypp/base/Logger.h"
17 #include "zypp/base/Exception.h"
18 #include "zypp/base/NonCopyable.h"
19 #include "zypp/base/Tr1hash.h"
20 #include "zypp/Arch.h"
21 #include "zypp/Bit.h"
22 
23 using std::endl;
24 
26 namespace zypp
27 {
28 
30  //
31  // CLASS NAME : Arch::CompatEntry
32  //
39  {
45 
46  CompatEntry( const std::string & archStr_r,
47  CompatBits::IntT idBit_r = 1 )
48  : _idStr( archStr_r )
49  , _archStr( archStr_r )
50  , _idBit( idBit_r )
51  , _compatBits( idBit_r )
52  {}
53 
54  CompatEntry( IdString archStr_r,
55  CompatBits::IntT idBit_r = 1 )
56  : _idStr( archStr_r )
57  , _archStr( archStr_r.asString() )
58  , _idBit( idBit_r )
59  , _compatBits( idBit_r )
60  {}
61 
62  void addCompatBit( const CompatBits & idBit_r ) const
63  {
64  if ( idBit_r && ! (_compatBits & idBit_r) )
65  {
66  _compatBits |= idBit_r;
67  }
68  }
69 
71  bool compatibleWith( const CompatEntry & targetEntry_r ) const
72  {
73  switch ( _idBit.value() )
74  {
75  case 0:
76  // this is noarch and always comatible
77  return true;
78  break;
79  case 1:
80  // this is a non builtin: self compatible only
81  return _archStr == targetEntry_r._archStr;
82  break;
83  }
84  // This is a builtin: compatible if mentioned in targetEntry_r
85  return bool( targetEntry_r._compatBits & _idBit );
86  }
87 
89  int compare( const CompatEntry & rhs ) const
90  {
91  if ( _idBit.value() != rhs. _idBit.value() )
92  return( _idBit.value() < rhs. _idBit.value() ? -1 : 1 );
93  return _archStr.compare( rhs._archStr ); // Id 1: non builtin
94  }
95 
96  bool isBuiltIn() const
97  { return( _idBit != CompatBits(1) ); }
98 
100  { return _idStr.id(); }
101 
103  std::string _archStr; // frequently used by the UI so we keep a reference
106  };
108 
110  inline std::ostream & operator<<( std::ostream & str, const Arch::CompatEntry & obj )
111  {
113  unsigned bitnum = 0;
114  while ( bit )
115  {
116  ++bitnum;
117  bit >>= 1;
118  }
119  return str << str::form( "%-15s ", obj._archStr.c_str() ) << str::numstring(bitnum,2) << ' '
120  << obj._compatBits << ' ' << obj._compatBits.value();
121  }
122 
124  inline bool operator==( const Arch::CompatEntry & lhs, const Arch::CompatEntry & rhs )
125  { return lhs._idStr == rhs._idStr; }
127  inline bool operator!=( const Arch::CompatEntry & lhs, const Arch::CompatEntry & rhs )
128  { return ! ( lhs == rhs ); }
129 
131 } // namespace zypp
133 
135 
137 namespace zypp
138 {
139 
141  namespace
142  {
143 
144  // Builtin architecture STRING VALUES to be
145  // used in defCompatibleWith below!
146  //
147  // const IdString _foo( "foo" );
148  //
149  // NOTE: Builtin CLASS Arch CONSTANTS are defined below.
150  // You have to change them accordingly.
151  //
152  // NOTE: Thake care CompatBits::IntT is able to provide one
153  // bit for each architecture.
154  //
155 #define DEF_BUILTIN(A) static inline const IdString & _##A () { static IdString __str(#A); return __str; }
156  DEF_BUILTIN( noarch );
157 
158  DEF_BUILTIN( i386 );
159  DEF_BUILTIN( i486 );
160  DEF_BUILTIN( i586 );
161  DEF_BUILTIN( i686 );
162  DEF_BUILTIN( athlon );
163  DEF_BUILTIN( x86_64 );
164 
165  DEF_BUILTIN( pentium3 );
166  DEF_BUILTIN( pentium4 );
167 
168  DEF_BUILTIN( s390 );
169  DEF_BUILTIN( s390x );
170 
171  DEF_BUILTIN( ppc );
172  DEF_BUILTIN( ppc64 );
173  DEF_BUILTIN( ppc64p7 );
174 
175  DEF_BUILTIN( ia64 );
176 
177  DEF_BUILTIN( alphaev67 );
178  DEF_BUILTIN( alphaev6 );
179  DEF_BUILTIN( alphapca56 );
180  DEF_BUILTIN( alphaev56 );
181  DEF_BUILTIN( alphaev5 );
182  DEF_BUILTIN( alpha );
183 
184  DEF_BUILTIN( sparc64v );
185  DEF_BUILTIN( sparcv9v );
186  DEF_BUILTIN( sparc64 );
187  DEF_BUILTIN( sparcv9 );
188  DEF_BUILTIN( sparcv8 );
189  DEF_BUILTIN( sparc );
190 
191  DEF_BUILTIN( aarch64 );
192  DEF_BUILTIN( armv7tnhl );
193  DEF_BUILTIN( armv7thl );
194  DEF_BUILTIN( armv7nhl );
195  DEF_BUILTIN( armv7hl );
196  DEF_BUILTIN( armv7l );
197  DEF_BUILTIN( armv6hl );
198  DEF_BUILTIN( armv6l );
199  DEF_BUILTIN( armv5tejl );
200  DEF_BUILTIN( armv5tel );
201  DEF_BUILTIN( armv5l );
202  DEF_BUILTIN( armv4tl );
203  DEF_BUILTIN( armv4l );
204  DEF_BUILTIN( armv3l );
205 
206  DEF_BUILTIN( sh3 );
207 
208  DEF_BUILTIN( sh4 );
209  DEF_BUILTIN( sh4a );
210 #undef DEF_BUILTIN
211 
213  //
214  // CLASS NAME : CompatSet
215  //
223  struct ArchCompatSet : private base::NonCopyable
224  {
225  typedef Arch::CompatEntry CompatEntry;
226  typedef CompatEntry::CompatBits CompatBits;
227 
228  typedef std::tr1::unordered_set<CompatEntry> Set;
229  typedef Set::iterator iterator;
230  typedef Set::const_iterator const_iterator;
231 
233  static ArchCompatSet & instance()
234  {
235  static ArchCompatSet _instance;
236  return _instance;
237  }
238 
242  const Arch::CompatEntry & assertDef( const std::string & archStr_r )
243  { return *_compatSet.insert( Arch::CompatEntry( archStr_r ) ).first; }
245  const Arch::CompatEntry & assertDef( IdString archStr_r )
246  { return *_compatSet.insert( Arch::CompatEntry( archStr_r ) ).first; }
247 
248  const_iterator begin() const
249  { return _compatSet.begin(); }
250 
251  const_iterator end() const
252  { return _compatSet.end(); }
253 
254  struct DumpOnCompare
255  {
256  int operator()( const CompatEntry & lhs, const CompatEntry & rhs ) const
257  { return lhs._idBit.value() < rhs._idBit.value(); }
258  };
259 
260  std::ostream & dumpOn( std::ostream & str ) const
261  {
262  str << "ArchCompatSet:";
263  std::list<CompatEntry> ov( _compatSet.begin(), _compatSet.end() );
264  ov.sort( DumpOnCompare() );
265  for_( it, ov.begin(), ov.end() )
266  {
267  str << endl << ' ' << *it;
268  }
269  return str;
270  }
271 
272  private:
274  ArchCompatSet()
275  {
276  // _noarch must have _idBit 0.
277  // Other builtins have 1-bit set
278  // and are initialized done on the fly.
279  _compatSet.insert( Arch::CompatEntry( _noarch(), 0 ) );
281  // Define the CompatibleWith relation:
282  //
283  // NOTE: Order of definition is significant! (Arch::compare)
284  // - define compatible (less) architectures first!
285  //
286  defCompatibleWith( _i386(), _noarch() );
287  defCompatibleWith( _i486(), _noarch(),_i386() );
288  defCompatibleWith( _i586(), _noarch(),_i386(),_i486() );
289  defCompatibleWith( _i686(), _noarch(),_i386(),_i486(),_i586() );
290  defCompatibleWith( _athlon(), _noarch(),_i386(),_i486(),_i586(),_i686() );
291  defCompatibleWith( _x86_64(), _noarch(),_i386(),_i486(),_i586(),_i686(),_athlon() );
292 
293  defCompatibleWith( _pentium3(), _noarch(),_i386(),_i486(),_i586(),_i686() );
294  defCompatibleWith( _pentium4(), _noarch(),_i386(),_i486(),_i586(),_i686(),_pentium3() );
295 
296  defCompatibleWith( _ia64(), _noarch(),_i386(),_i486(),_i586(),_i686() );
297  //
298  defCompatibleWith( _s390(), _noarch() );
299  defCompatibleWith( _s390x(), _noarch(),_s390() );
300  //
301  defCompatibleWith( _ppc(), _noarch() );
302  defCompatibleWith( _ppc64(), _noarch(),_ppc() );
303  defCompatibleWith( _ppc64p7(), _noarch(),_ppc(),_ppc64() );
304  //
305  defCompatibleWith( _alpha(), _noarch() );
306  defCompatibleWith( _alphaev5(), _noarch(),_alpha() );
307  defCompatibleWith( _alphaev56(), _noarch(),_alpha(),_alphaev5() );
308  defCompatibleWith( _alphapca56(), _noarch(),_alpha(),_alphaev5(),_alphaev56() );
309  defCompatibleWith( _alphaev6(), _noarch(),_alpha(),_alphaev5(),_alphaev56(),_alphapca56() );
310  defCompatibleWith( _alphaev67(), _noarch(),_alpha(),_alphaev5(),_alphaev56(),_alphapca56(),_alphaev6() );
311  //
312  defCompatibleWith( _sparc(), _noarch() );
313  defCompatibleWith( _sparcv8(), _noarch(),_sparc() );
314  defCompatibleWith( _sparcv9(), _noarch(),_sparc(),_sparcv8() );
315  defCompatibleWith( _sparcv9v(), _noarch(),_sparc(),_sparcv8(),_sparcv9() );
316  //
317  defCompatibleWith( _sparc64(), _noarch(),_sparc(),_sparcv8(),_sparcv9() );
318  defCompatibleWith( _sparc64v(), _noarch(),_sparc(),_sparcv8(),_sparcv9(),_sparcv9v(),_sparc64() );
319  //
320  defCompatibleWith( _armv3l(), _noarch() );
321  defCompatibleWith( _armv4l(), _noarch(),_armv3l() );
322  defCompatibleWith( _armv4tl(), _noarch(),_armv3l(),_armv4l() );
323  defCompatibleWith( _armv5l(), _noarch(),_armv3l(),_armv4l(),_armv4tl() );
324  defCompatibleWith( _armv5tel(), _noarch(),_armv3l(),_armv4l(),_armv4tl(),_armv5l() );
325  defCompatibleWith( _armv5tejl(), _noarch(),_armv3l(),_armv4l(),_armv4tl(),_armv5l(),_armv5tel() );
326  defCompatibleWith( _armv6l(), _noarch(),_armv3l(),_armv4l(),_armv4tl(),_armv5l(),_armv5tel(),_armv5tejl() );
327  defCompatibleWith( _armv6hl(), _noarch() );
328  defCompatibleWith( _armv7l(), _noarch(),_armv3l(),_armv4l(),_armv4tl(),_armv5l(),_armv5tel(),_armv5tejl(),_armv6l() );
329  defCompatibleWith( _armv7hl(), _noarch(),_armv6hl() );
330  defCompatibleWith( _armv7nhl(), _noarch(),_armv7hl() );
331  defCompatibleWith( _armv7thl(), _noarch(),_armv7hl() );
332  defCompatibleWith( _armv7tnhl(), _noarch(),_armv7hl(),_armv7nhl(),_armv7thl() );
333  defCompatibleWith( _aarch64(), _noarch() );
334  //
335  defCompatibleWith( _sh3(), _noarch() );
336  //
337  defCompatibleWith( _sh4(), _noarch() );
338  defCompatibleWith( _sh4a(), _noarch(),_sh4() );
339  //
341  // dumpOn( USR ) << endl;
342  }
343 
344  private:
350  CompatBits::IntT nextIdBit() const
351  {
352  if ( CompatBits::size == _compatSet.size() )
353  {
354  // Provide more bits in CompatBits::IntT
355  INT << "Need more than " << CompatBits::size << " bits to encode architectures." << endl;
356  ZYPP_THROW( Exception("Need more bits to encode architectures.") );
357  }
358  CompatBits::IntT nextBit = CompatBits::IntT(1) << (_compatSet.size());
359  return nextBit;
360  }
361 
365  const CompatEntry & assertCompatSetEntry( IdString archStr_r )
366  { return *_compatSet.insert( Arch::CompatEntry( archStr_r, nextIdBit() ) ).first; }
367 
370  void defCompatibleWith( IdString targetArch_r,
371  IdString arch0_r,
372  IdString arch1_r = IdString(),
373  IdString arch2_r = IdString(),
374  IdString arch3_r = IdString(),
375  IdString arch4_r = IdString(),
376  IdString arch5_r = IdString(),
377  IdString arch6_r = IdString(),
378  IdString arch7_r = IdString(),
379  IdString arch8_r = IdString(),
380  IdString arch9_r = IdString() )
381  {
382  const CompatEntry & target( assertCompatSetEntry( targetArch_r ) );
383  target.addCompatBit( assertCompatSetEntry( arch0_r )._idBit );
384 #define _SETARG(N) if ( arch##N##_r.empty() ) return; target.addCompatBit( assertCompatSetEntry( arch##N##_r )._idBit )
385  _SETARG(1); _SETARG(2); _SETARG(3); _SETARG(4);
386  _SETARG(5); _SETARG(6); _SETARG(7); _SETARG(8); _SETARG(9);
387 #undef _SETARG
388  }
389 
390  private:
392  };
393 
395  } // namespace
397 
399  //
400  // CLASS NAME : Arch
401  //
403 
404  const Arch Arch_empty ( IdString::Empty );
405  const Arch Arch_noarch( _noarch() );
406 
407  const Arch Arch_i386( _i386() );
408  const Arch Arch_i486( _i486() );
409  const Arch Arch_i586( _i586() );
410  const Arch Arch_i686( _i686() );
411  const Arch Arch_athlon( _athlon() );
412  const Arch Arch_x86_64( _x86_64() );
413 
414  const Arch Arch_pentium3( _pentium3() );
415  const Arch Arch_pentium4( _pentium4() );
416 
417  const Arch Arch_s390( _s390() );
418  const Arch Arch_s390x( _s390x() );
419 
420  const Arch Arch_ppc( _ppc() );
421  const Arch Arch_ppc64( _ppc64() );
422  const Arch Arch_ppc64p7( _ppc64p7() );
423 
424  const Arch Arch_ia64( _ia64() );
425 
426  const Arch Arch_alphaev67( _alphaev67() );
427  const Arch Arch_alphaev6( _alphaev6() );
428  const Arch Arch_alphapca56( _alphapca56() );
429  const Arch Arch_alphaev56( _alphaev56() );
430  const Arch Arch_alphaev5( _alphaev5() );
431  const Arch Arch_alpha( _alpha() );
432 
433  const Arch Arch_sparc64v( _sparc64v() );
434  const Arch Arch_sparc64( _sparc64() );
435  const Arch Arch_sparcv9v( _sparcv9v() );
436  const Arch Arch_sparcv9( _sparcv9() );
437  const Arch Arch_sparcv8( _sparcv8() );
438  const Arch Arch_sparc( _sparc() );
439 
440  const Arch Arch_aarch64( _aarch64() );
441  const Arch Arch_armv7tnhl( _armv7tnhl() );
442  const Arch Arch_armv7thl( _armv7thl() );
443  const Arch Arch_armv7nhl ( _armv7nhl() );
444  const Arch Arch_armv7hl ( _armv7hl() );
445  const Arch Arch_armv7l( _armv7l() );
446  const Arch Arch_armv6hl ( _armv6hl() );
447  const Arch Arch_armv6l( _armv6l() );
448  const Arch Arch_armv5tejl( _armv5tejl() );
449  const Arch Arch_armv5tel( _armv5tel() );
450  const Arch Arch_armv5l( _armv5l() );
451  const Arch Arch_armv4tl( _armv4tl() );
452  const Arch Arch_armv4l( _armv4l() );
453  const Arch Arch_armv3l( _armv3l() );
454 
455  const Arch Arch_sh3( _sh3() );
456 
457  const Arch Arch_sh4( _sh4() );
458  const Arch Arch_sh4a( _sh4a() );
459 
461  //
462  // METHOD NAME : Arch::Arch
463  // METHOD TYPE : Ctor
464  //
466  : _entry( &ArchCompatSet::instance().assertDef( _noarch() ) )
467  {}
468 
470  : _entry( &ArchCompatSet::instance().assertDef( IdString(id_r) ) )
471  {}
472 
473  Arch::Arch( const IdString & idstr_r )
474  : _entry( &ArchCompatSet::instance().assertDef( idstr_r ) )
475  {}
476 
477  Arch::Arch( const std::string & str_r )
478  : _entry( &ArchCompatSet::instance().assertDef( str_r ) )
479  {}
480 
481  Arch::Arch( const char * cstr_r )
482  : _entry( &ArchCompatSet::instance().assertDef( cstr_r ) )
483  {}
484 
485  Arch::Arch( const CompatEntry & rhs )
486  : _entry( &rhs )
487  {}
488 
490  //
491  // METHOD NAME : Arch::idStr
492  // METHOD TYPE : IdString
493  //
495  { return _entry->_idStr; }
496 
498  //
499  // METHOD NAME : Arch::asString
500  // METHOD TYPE : const std::string &
501  //
502  const std::string & Arch::asString() const
503  { return _entry->_archStr; }
504 
506  //
507  // METHOD NAME : Arch::isBuiltIn
508  // METHOD TYPE : bool
509  //
510  bool Arch::isBuiltIn() const
511  { return _entry->isBuiltIn(); }
512 
514  //
515  // METHOD NAME : Arch::compatibleWith
516  // METHOD TYPE : bool
517  //
518  bool Arch::compatibleWith( const Arch & targetArch_r ) const
519  { return _entry->compatibleWith( *targetArch_r._entry ); }
520 
522  //
523  // METHOD NAME : Arch::baseArch
524  // METHOD TYPE : Arch
525  //
527  {
528  // check the multilib archs:
529  if (Arch_x86_64.compatibleWith(*this))
530  {
531  return Arch_x86_64;
532  }
533  if (Arch_sparc64v.compatibleWith(*this))
534  {
535  return Arch_sparc64v;
536  }
537  if (Arch_sparc64.compatibleWith(*this))
538  {
539  return Arch_sparc64;
540  }
541  if (Arch_ppc64.compatibleWith(*this))
542  {
543  return Arch_ppc64;
544  }
545  if (Arch_s390x.compatibleWith(*this))
546  {
547  return Arch_s390x;
548  }
549  // Here: no multilib; return arch before noarch
550  CompatSet cset( compatSet( *this ) );
551  if ( cset.size() > 2 ) // systemArchitecture, ..., basearch, noarch
552  {
553  return *(++cset.rbegin());
554  }
555  return *this;
556  }
557 
559  //
560  // METHOD NAME : Arch::compare
561  // METHOD TYPE : bool
562  //
563  int Arch::compare( const Arch & rhs ) const
564  { return _entry->compare( *rhs._entry ); }
565 
567  //
568  // METHOD NAME : Arch::compatSet
569  // METHOD TYPE : Arch::CompatSet
570  //
571  Arch::CompatSet Arch::compatSet( const Arch & targetArch_r )
572  {
573  Arch::CompatSet ret;
574 
575  for ( ArchCompatSet::const_iterator it = ArchCompatSet::instance().begin();
576  it != ArchCompatSet::instance().end(); ++it )
577  {
578  if ( it->compatibleWith( *targetArch_r._entry ) )
579  {
580  ret.insert( Arch(*it) );
581  }
582  }
583 
584  return ret;
585  }
586 
588 } // namespace zypp
const Arch Arch_sh3(_sh3())
const Arch Arch_sparc64
Definition: Arch.h:216
const Arch Arch_armv3l(_armv3l())
_IntT value() const
Return the value.
Definition: Bit.h:179
const Arch Arch_armv5l(_armv5l())
const Arch Arch_sparcv9(_sparcv9())
const Arch Arch_s390x(_s390x())
bool compatibleWith(const Arch &targetArch_r) const
Compatibility relation.
Definition: Arch.cc:518
int compare(const CompatEntry &rhs) const
compare by score, then archStr.
Definition: Arch.cc:89
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
Definition: Exception.h:320
const std::string & asString() const
Definition: Arch.cc:502
#define _SETARG(N)
Architecture.
Definition: Arch.h:36
IdType id() const
Expert backdoor.
Definition: IdString.h:103
const Arch Arch_i686(_i686())
const Arch Arch_alphaev67(_alphaev67())
std::set< Arch, CompareByGT< Arch > > CompatSet
Reversed arch order, best Arch first.
Definition: Arch.h:117
#define INT
Definition: Logger.h:51
const Arch Arch_ia64(_ia64())
const Arch Arch_empty(IdString::Empty)
const Arch Arch_ppc64(_ppc64())
const Arch Arch_armv5tel(_armv5tel())
const Arch Arch_sparcv8(_sparcv8())
const Arch Arch_aarch64(_aarch64())
#define DEF_BUILTIN(A)
Definition: Arch.cc:155
IdString idStr() const
String representation of Arch.
Definition: Arch.cc:494
Access to the sat-pools string space.
Definition: IdString.h:39
const Arch Arch_s390x
Definition: Arch.h:186
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
Definition: Easy.h:27
const Arch Arch_ppc(_ppc())
const Arch Arch_armv7hl(_armv7hl())
const Arch Arch_noarch(_noarch())
CompatEntry(const std::string &archStr_r, CompatBits::IntT idBit_r=1)
Definition: Arch.cc:46
const Arch Arch_sparc64v(_sparc64v())
const Arch Arch_armv5tejl(_armv5tejl())
const Arch Arch_sparcv9v(_sparcv9v())
const Arch Arch_sh4a(_sh4a())
int compare(const Arch &rhs) const
Arch comparison.
Definition: Arch.cc:563
const Arch Arch_sh4(_sh4())
Set _compatSet
Definition: Arch.cc:391
const Arch Arch_i586(_i586())
const CompatEntry * _entry
Definition: Arch.h:145
const Arch Arch_armv6l(_armv6l())
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Definition: NonCopyable.h:26
static const IdString Empty
Empty string.
Definition: IdString.h:62
const Arch Arch_armv7tnhl(_armv7tnhl())
const Arch Arch_sparc64(_sparc64())
sat::detail::IdType IdType
Definition: IdString.h:42
const Arch Arch_s390(_s390())
std::ostream & operator<<(std::ostream &str, const Arch::CompatEntry &obj)
Definition: Arch.cc:110
const Arch Arch_pentium3(_pentium3())
const Arch Arch_armv7nhl(_armv7nhl())
#define ZYPP_DEFINE_ID_HASHABLE(C)
Define hash function for id based classes.
Definition: Tr1hash.h:26
const Arch Arch_athlon(_athlon())
const Arch Arch_alphapca56(_alphapca56())
void addCompatBit(const CompatBits &idBit_r) const
Definition: Arch.cc:62
const Arch Arch_i386(_i386())
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
Definition: Capability.cc:435
const Arch Arch_x86_64(_x86_64())
bit::BitField< uint64_t > CompatBits
Bitfield for architecture IDs and compatBits relation.
Definition: Arch.cc:44
std::string numstring(char n, int w=0)
Definition: String.h:219
static CompatSet compatSet(const Arch &targetArch_r)
Return a set of all Arch&#39;s compatibleWith a targetArch_r.
Definition: Arch.cc:571
const Arch Arch_armv6hl(_armv6hl())
const Arch Arch_x86_64
Definition: Arch.h:173
const Arch Arch_armv7thl(_armv7thl())
std::string form(const char *format,...)
Printf style construction of std::string.
Definition: String.cc:34
const Arch Arch_alphaev6(_alphaev6())
const Arch Arch_ppc64
Definition: Arch.h:193
bool operator!=(const Arch::CompatEntry &lhs, const Arch::CompatEntry &rhs)
Definition: Arch.cc:127
const Arch Arch_sparc64v
Definition: Arch.h:214
const Arch Arch_armv7l(_armv7l())
bool isBuiltIn() const
Definition: Arch.cc:96
Arch()
Default ctor Arc_noarch.
Definition: Arch.cc:465
const Arch Arch_armv4tl(_armv4tl())
bool compatibleWith(const CompatEntry &targetEntry_r) const
Return whether this is compatible with targetEntry_r.
Definition: Arch.cc:71
IdString::IdType id() const
Definition: Arch.cc:99
Arch baseArch() const
Definition: Arch.cc:526
const Arch Arch_sparc(_sparc())
const Arch Arch_alphaev5(_alphaev5())
bool isBuiltIn() const
Whether this is a buitin (or known) architecture.
Definition: Arch.cc:510
CompatBits _compatBits
Definition: Arch.cc:105
const Arch Arch_alpha(_alpha())
std::string _archStr
Definition: Arch.cc:103
const Arch Arch_alphaev56(_alphaev56())
const Arch Arch_i486(_i486())
bool operator==(const Arch::CompatEntry &lhs, const Arch::CompatEntry &rhs)
Definition: Arch.cc:124
CompatEntry(IdString archStr_r, CompatBits::IntT idBit_r=1)
Definition: Arch.cc:54
const Arch Arch_armv4l(_armv4l())
const Arch Arch_pentium4(_pentium4())
const Arch Arch_ppc64p7(_ppc64p7())
CompatBits _idBit
Definition: Arch.cc:104
Holds an architecture ID and it&#39;s compatible relation.
Definition: Arch.cc:38