[PATCH] Create android x86_32 target info

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Mar 16 09:37:55 PDT 2015


It should be possible to test this, no?
On Mar 16, 2015 12:11 PM, "Tamas Berghammer" <tberghammer at google.com> wrote:

> Hi danalbert,
>
> Create android x86_32 target info
>
> On android x86_32 the long double is only 64 bits (compared to 80 bits on
> linux x86_32). This CL creates a new target info class to use the correct
> size for long double on android x86_32.
>
> http://reviews.llvm.org/D8357
>
> Files:
>   lib/Basic/Targets.cpp
>
> Index: lib/Basic/Targets.cpp
> ===================================================================
> --- lib/Basic/Targets.cpp
> +++ lib/Basic/Targets.cpp
> @@ -6585,6 +6585,17 @@
>  };
>  } // end anonymous namespace.
>
> +namespace {
> +// x86-32 Android target
> +class AndroidX86_32TargetInfo : public LinuxTargetInfo<X86_32TargetInfo> {
> +public:
> +  AndroidX86_32TargetInfo(const llvm::Triple &Triple)
> +      : LinuxTargetInfo<X86_32TargetInfo>(Triple) {
> +    LongDoubleWidth = 64;
> +  }
> +};
> +} // end anonymous namespace
> +
>
>
>  //===----------------------------------------------------------------------===//
>  // Driver code
> @@ -6862,8 +6873,14 @@
>        return new DarwinI386TargetInfo(Triple);
>
>      switch (os) {
> -    case llvm::Triple::Linux:
> -      return new LinuxTargetInfo<X86_32TargetInfo>(Triple);
> +    case llvm::Triple::Linux: {
> +      switch (Triple.getEnvironment()) {
> +      default:
> +        return new LinuxTargetInfo<X86_32TargetInfo>(Triple);
> +      case llvm::Triple::Android:
> +        return new AndroidX86_32TargetInfo(Triple);
> +      }
> +    }
>      case llvm::Triple::DragonFly:
>        return new DragonFlyBSDTargetInfo<X86_32TargetInfo>(Triple);
>      case llvm::Triple::NetBSD:
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150316/3dd6d52d/attachment.html>


More information about the cfe-commits mailing list