[llvm] r197332 - Replace string matching with a switch on Triple::getEnvironment.

Evgeniy Stepanov eugeni.stepanov at gmail.com
Sun Dec 15 23:08:37 PST 2013


Hi,

you missed Triple::Android, which is also AAPCS. Fixed in r197366.


On Sun, Dec 15, 2013 at 4:12 AM, Joerg Sonnenberger <joerg at bec.de> wrote:
> Author: joerg
> Date: Sat Dec 14 18:12:52 2013
> New Revision: 197332
>
> URL: http://llvm.org/viewvc/llvm-project?rev=197332&view=rev
> Log:
> Replace string matching with a switch on Triple::getEnvironment.
>
> Modified:
>     llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
>
> Modified: llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp?rev=197332&r1=197331&r2=197332&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp Sat Dec 14 18:12:52 2013
> @@ -189,11 +189,17 @@ void ARMSubtarget::resetSubtargetFeature
>    // Initialize scheduling itinerary for the specified CPU.
>    InstrItins = getInstrItineraryForCPU(CPUString);
>
> -  if ((TargetTriple.getTriple().find("eabi") != std::string::npos) ||
> -      (isTargetIOS() && isMClass()))
> -    // FIXME: We might want to separate AAPCS and EABI. Some systems, e.g.
> -    // Darwin-EABI conforms to AACPS but not the rest of EABI.
> +  switch (TargetTriple.getEnvironment()) {
> +  case Triple::EABI:
> +  case Triple::GNUEABI:
> +  case Triple::GNUEABIHF:
>      TargetABI = ARM_ABI_AAPCS;
> +    break;
> +  default:
> +    if (isTargetIOS() && isMClass())
> +      TargetABI = ARM_ABI_AAPCS;
> +    break;
> +  }
>
>    if (isAAPCS_ABI())
>      stackAlignment = 8;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list