This revision was automatically updated to reflect the committed changes. Closed by commit rL310418: [mips] Enable `long_call/short_call` attributes on MIPS64 (authored by atanasyan).
Changed prior to commit: https://reviews.llvm.org/D36208?vs=110252&id=110275#toc Repository: rL LLVM https://reviews.llvm.org/D36208 Files: cfe/trunk/include/clang/Basic/Attr.td cfe/trunk/test/CodeGen/long-call-attr.c cfe/trunk/test/Sema/attr-long-call.c Index: cfe/trunk/include/clang/Basic/Attr.td =================================================================== --- cfe/trunk/include/clang/Basic/Attr.td +++ cfe/trunk/include/clang/Basic/Attr.td @@ -264,7 +264,8 @@ } def TargetARM : TargetArch<["arm", "thumb", "armeb", "thumbeb"]>; def TargetAVR : TargetArch<["avr"]>; -def TargetMips : TargetArch<["mips", "mipsel"]>; +def TargetMips32 : TargetArch<["mips", "mipsel"]>; +def TargetAnyMips : TargetArch<["mips", "mipsel", "mips64", "mips64el"]>; def TargetMSP430 : TargetArch<["msp430"]>; def TargetX86 : TargetArch<["x86"]>; def TargetAnyX86 : TargetArch<["x86", "x86_64"]>; @@ -1160,13 +1161,13 @@ let Documentation = [Undocumented]; } -def Mips16 : InheritableAttr, TargetSpecificAttr<TargetMips> { +def Mips16 : InheritableAttr, TargetSpecificAttr<TargetMips32> { let Spellings = [GCC<"mips16">]; let Subjects = SubjectList<[Function], ErrorDiag>; let Documentation = [Undocumented]; } -def MipsInterrupt : InheritableAttr, TargetSpecificAttr<TargetMips> { +def MipsInterrupt : InheritableAttr, TargetSpecificAttr<TargetMips32> { // NOTE: If you add any additional spellings, ARMInterrupt's, // MSP430Interrupt's and AnyX86Interrupt's spellings must match. let Spellings = [GNU<"interrupt">]; @@ -1182,19 +1183,19 @@ let Documentation = [MipsInterruptDocs]; } -def MicroMips : InheritableAttr, TargetSpecificAttr<TargetMips> { +def MicroMips : InheritableAttr, TargetSpecificAttr<TargetMips32> { let Spellings = [GCC<"micromips">]; let Subjects = SubjectList<[Function], ErrorDiag>; let Documentation = [MicroMipsDocs]; } -def MipsLongCall : InheritableAttr, TargetSpecificAttr<TargetMips> { +def MipsLongCall : InheritableAttr, TargetSpecificAttr<TargetAnyMips> { let Spellings = [GCC<"long_call">, GCC<"far">]; let Subjects = SubjectList<[Function]>; let Documentation = [MipsLongCallStyleDocs]; } -def MipsShortCall : InheritableAttr, TargetSpecificAttr<TargetMips> { +def MipsShortCall : InheritableAttr, TargetSpecificAttr<TargetAnyMips> { let Spellings = [GCC<"short_call">, GCC<"near">]; let Subjects = SubjectList<[Function]>; let Documentation = [MipsShortCallStyleDocs]; @@ -1276,13 +1277,13 @@ let Documentation = [Undocumented]; } -def NoMips16 : InheritableAttr, TargetSpecificAttr<TargetMips> { +def NoMips16 : InheritableAttr, TargetSpecificAttr<TargetMips32> { let Spellings = [GCC<"nomips16">]; let Subjects = SubjectList<[Function], ErrorDiag>; let Documentation = [Undocumented]; } -def NoMicroMips : InheritableAttr, TargetSpecificAttr<TargetMips> { +def NoMicroMips : InheritableAttr, TargetSpecificAttr<TargetMips32> { let Spellings = [GCC<"nomicromips">]; let Subjects = SubjectList<[Function], ErrorDiag>; let Documentation = [MicroMipsDocs]; Index: cfe/trunk/test/CodeGen/long-call-attr.c =================================================================== --- cfe/trunk/test/CodeGen/long-call-attr.c +++ cfe/trunk/test/CodeGen/long-call-attr.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple mips-linux-gnu -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple mips64-linux-gnu -emit-llvm -o - %s | FileCheck %s void __attribute__((long_call)) foo1 (void); void __attribute__((short_call)) foo4 (void); Index: cfe/trunk/test/Sema/attr-long-call.c =================================================================== --- cfe/trunk/test/Sema/attr-long-call.c +++ cfe/trunk/test/Sema/attr-long-call.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple mips-linux-gnu -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple mips64-linux-gnu -fsyntax-only -verify %s __attribute__((long_call(0))) void foo1(); // expected-error {{'long_call' attribute takes no arguments}} __attribute__((short_call(0))) void foo9(); // expected-error {{'short_call' attribute takes no arguments}}
Index: cfe/trunk/include/clang/Basic/Attr.td =================================================================== --- cfe/trunk/include/clang/Basic/Attr.td +++ cfe/trunk/include/clang/Basic/Attr.td @@ -264,7 +264,8 @@ } def TargetARM : TargetArch<["arm", "thumb", "armeb", "thumbeb"]>; def TargetAVR : TargetArch<["avr"]>; -def TargetMips : TargetArch<["mips", "mipsel"]>; +def TargetMips32 : TargetArch<["mips", "mipsel"]>; +def TargetAnyMips : TargetArch<["mips", "mipsel", "mips64", "mips64el"]>; def TargetMSP430 : TargetArch<["msp430"]>; def TargetX86 : TargetArch<["x86"]>; def TargetAnyX86 : TargetArch<["x86", "x86_64"]>; @@ -1160,13 +1161,13 @@ let Documentation = [Undocumented]; } -def Mips16 : InheritableAttr, TargetSpecificAttr<TargetMips> { +def Mips16 : InheritableAttr, TargetSpecificAttr<TargetMips32> { let Spellings = [GCC<"mips16">]; let Subjects = SubjectList<[Function], ErrorDiag>; let Documentation = [Undocumented]; } -def MipsInterrupt : InheritableAttr, TargetSpecificAttr<TargetMips> { +def MipsInterrupt : InheritableAttr, TargetSpecificAttr<TargetMips32> { // NOTE: If you add any additional spellings, ARMInterrupt's, // MSP430Interrupt's and AnyX86Interrupt's spellings must match. let Spellings = [GNU<"interrupt">]; @@ -1182,19 +1183,19 @@ let Documentation = [MipsInterruptDocs]; } -def MicroMips : InheritableAttr, TargetSpecificAttr<TargetMips> { +def MicroMips : InheritableAttr, TargetSpecificAttr<TargetMips32> { let Spellings = [GCC<"micromips">]; let Subjects = SubjectList<[Function], ErrorDiag>; let Documentation = [MicroMipsDocs]; } -def MipsLongCall : InheritableAttr, TargetSpecificAttr<TargetMips> { +def MipsLongCall : InheritableAttr, TargetSpecificAttr<TargetAnyMips> { let Spellings = [GCC<"long_call">, GCC<"far">]; let Subjects = SubjectList<[Function]>; let Documentation = [MipsLongCallStyleDocs]; } -def MipsShortCall : InheritableAttr, TargetSpecificAttr<TargetMips> { +def MipsShortCall : InheritableAttr, TargetSpecificAttr<TargetAnyMips> { let Spellings = [GCC<"short_call">, GCC<"near">]; let Subjects = SubjectList<[Function]>; let Documentation = [MipsShortCallStyleDocs]; @@ -1276,13 +1277,13 @@ let Documentation = [Undocumented]; } -def NoMips16 : InheritableAttr, TargetSpecificAttr<TargetMips> { +def NoMips16 : InheritableAttr, TargetSpecificAttr<TargetMips32> { let Spellings = [GCC<"nomips16">]; let Subjects = SubjectList<[Function], ErrorDiag>; let Documentation = [Undocumented]; } -def NoMicroMips : InheritableAttr, TargetSpecificAttr<TargetMips> { +def NoMicroMips : InheritableAttr, TargetSpecificAttr<TargetMips32> { let Spellings = [GCC<"nomicromips">]; let Subjects = SubjectList<[Function], ErrorDiag>; let Documentation = [MicroMipsDocs]; Index: cfe/trunk/test/CodeGen/long-call-attr.c =================================================================== --- cfe/trunk/test/CodeGen/long-call-attr.c +++ cfe/trunk/test/CodeGen/long-call-attr.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple mips-linux-gnu -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple mips64-linux-gnu -emit-llvm -o - %s | FileCheck %s void __attribute__((long_call)) foo1 (void); void __attribute__((short_call)) foo4 (void); Index: cfe/trunk/test/Sema/attr-long-call.c =================================================================== --- cfe/trunk/test/Sema/attr-long-call.c +++ cfe/trunk/test/Sema/attr-long-call.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple mips-linux-gnu -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple mips64-linux-gnu -fsyntax-only -verify %s __attribute__((long_call(0))) void foo1(); // expected-error {{'long_call' attribute takes no arguments}} __attribute__((short_call(0))) void foo9(); // expected-error {{'short_call' attribute takes no arguments}}
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits