This is the mail archive of the frysk@sourceware.org mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ISA checks for factories


Andrew Cagney wrote:
Phil,

There is now also:
ISA isa = task.getISA()
which returns a frysk.isa.ISA, which looks smells and behaves like an ENUM. This new ISA just the following attributes:
- family (i386, x8664, PPC)
- word size (4, 8)
- byte order (little, big)
leading to the combinations: IA32, X8664, PPC32LE, PPC32BE, PPC64LE, PPC64BE.



Ok that makes sense, I got that from the original email, but ...



or better?:

  ISAMap map = new ISAMap("why am I here")
      .put(ISA.IA32, new My(IA32))
      .put(ISA.X8664, new My(X8664))
      ;
  ...
      // Throws a RuntimeException if ISA missing
      My o = (My) map.get(task.getISA);


I'm still a little fuzzy on how it can be used to detected IA 32 on 64, or PPC32 On 64?

Regards

Phil



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]