Skip to content

Commit d1307a5

Browse files
committed
Add support for AArch64 C++ ABI.
1 parent 9071cd2 commit d1307a5

File tree

11 files changed

+33
-18
lines changed

11 files changed

+33
-18
lines changed

src/AST/ASTContext.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public enum CppAbi
1010
Itanium,
1111
Microsoft,
1212
ARM,
13+
AArch64,
1314
iOS,
1415
iOS64,
1516
WebAssembly

src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6401,9 +6401,10 @@ public enum CppAbi
64016401
Itanium = 0,
64026402
Microsoft = 1,
64036403
ARM = 2,
6404-
iOS = 3,
6405-
iOS64 = 4,
6406-
WebAssembly = 5
6404+
AArch64 = 3,
6405+
iOS = 4,
6406+
iOS64 = 5,
6407+
WebAssembly = 6
64076408
}
64086409

64096410
public enum RecordArgABI

src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6401,9 +6401,10 @@ public enum CppAbi
64016401
Itanium = 0,
64026402
Microsoft = 1,
64036403
ARM = 2,
6404-
iOS = 3,
6405-
iOS64 = 4,
6406-
WebAssembly = 5
6404+
AArch64 = 3,
6405+
iOS = 4,
6406+
iOS64 = 5,
6407+
WebAssembly = 6
64076408
}
64086409

64096410
public enum RecordArgABI

src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6401,9 +6401,10 @@ public enum CppAbi
64016401
Itanium = 0,
64026402
Microsoft = 1,
64036403
ARM = 2,
6404-
iOS = 3,
6405-
iOS64 = 4,
6406-
WebAssembly = 5
6404+
AArch64 = 3,
6405+
iOS = 4,
6406+
iOS64 = 5,
6407+
WebAssembly = 6
64076408
}
64086409

64096410
public enum RecordArgABI

src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6401,9 +6401,10 @@ public enum CppAbi
64016401
Itanium = 0,
64026402
Microsoft = 1,
64036403
ARM = 2,
6404-
iOS = 3,
6405-
iOS64 = 4,
6406-
WebAssembly = 5
6404+
AArch64 = 3,
6405+
iOS = 4,
6406+
iOS64 = 5,
6407+
WebAssembly = 6
64076408
}
64086409

64096410
public enum RecordArgABI

src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6401,9 +6401,10 @@ public enum CppAbi
64016401
Itanium = 0,
64026402
Microsoft = 1,
64036403
ARM = 2,
6404-
iOS = 3,
6405-
iOS64 = 4,
6406-
WebAssembly = 5
6404+
AArch64 = 3,
6405+
iOS = 4,
6406+
iOS64 = 5,
6407+
WebAssembly = 6
64076408
}
64086409

64096410
public enum RecordArgABI

src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6401,9 +6401,10 @@ public enum CppAbi
64016401
Itanium = 0,
64026402
Microsoft = 1,
64036403
ARM = 2,
6404-
iOS = 3,
6405-
iOS64 = 4,
6406-
WebAssembly = 5
6404+
AArch64 = 3,
6405+
iOS = 4,
6406+
iOS64 = 5,
6407+
WebAssembly = 6
64076408
}
64086409

64096410
public enum RecordArgABI

src/CppParser/Decl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ namespace CppSharp
471471
Itanium,
472472
Microsoft,
473473
ARM,
474+
AArch64,
474475
iOS,
475476
iOS64,
476477
WebAssembly

src/CppParser/Parser.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ static CppAbi GetClassLayoutAbi(clang::TargetCXXABI::Kind abi)
100100
return CppAbi::Itanium;
101101
case clang::TargetCXXABI::GenericARM:
102102
return CppAbi::ARM;
103+
case clang::TargetCXXABI::GenericAArch64:
104+
return CppAbi::AArch64;
103105
case clang::TargetCXXABI::iOS:
104106
return CppAbi::iOS;
105107
case clang::TargetCXXABI::AppleARM64:
@@ -231,6 +233,8 @@ ConvertToClangTargetCXXABI(CppSharp::CppParser::AST::CppAbi abi)
231233
return TargetCXXABI::Microsoft;
232234
case CppSharp::CppParser::AST::CppAbi::ARM:
233235
return TargetCXXABI::GenericARM;
236+
case CppSharp::CppParser::AST::CppAbi::AArch64:
237+
return TargetCXXABI::GenericARM;
234238
case CppSharp::CppParser::AST::CppAbi::iOS:
235239
return TargetCXXABI::iOS;
236240
case CppSharp::CppParser::AST::CppAbi::iOS64:

src/Generator/AST/VTables.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public static List<VTableComponent> GatherVTableMethodEntries(Class @class)
1515
case CppAbi.Microsoft:
1616
return GatherVTableMethodsMS(@class);
1717
case CppAbi.Itanium:
18+
default:
1819
return GatherVTableMethodsItanium(@class);
1920
}
2021

0 commit comments

Comments
 (0)