aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/mac/arch_utilities.cc41
-rw-r--r--src/tools/mac/upload_system_symbols/arch_constants.h5
-rw-r--r--src/tools/mac/upload_system_symbols/arch_reader.go3
3 files changed, 45 insertions, 4 deletions
diff --git a/src/common/mac/arch_utilities.cc b/src/common/mac/arch_utilities.cc
index c9225e00..c0e4bac5 100644
--- a/src/common/mac/arch_utilities.cc
+++ b/src/common/mac/arch_utilities.cc
@@ -46,15 +46,31 @@
#define CPU_SUBTYPE_ARM64_ALL (static_cast<cpu_subtype_t>(0))
#endif // CPU_SUBTYPE_ARM64_ALL
+#ifndef CPU_SUBTYPE_ARM64_E
+#define CPU_SUBTYPE_ARM64_E (static_cast<cpu_subtype_t>(2))
+#endif // CPU_SUBTYPE_ARM64_E
+
namespace {
-const NXArchInfo* ArchInfo_arm64() {
+const NXArchInfo* ArchInfo_arm64(cpu_subtype_t cpu_subtype) {
+ const char* name = NULL;
+ switch (cpu_subtype) {
+ case CPU_SUBTYPE_ARM64_ALL:
+ name = "arm64";
+ break;
+ case CPU_SUBTYPE_ARM64_E:
+ name = "arm64e";
+ break;
+ default:
+ return NULL;
+ }
+
NXArchInfo* arm64 = new NXArchInfo;
*arm64 = *NXGetArchInfoFromCpuType(CPU_TYPE_ARM,
CPU_SUBTYPE_ARM_V7);
- arm64->name = "arm64";
+ arm64->name = name;
arm64->cputype = CPU_TYPE_ARM64;
- arm64->cpusubtype = CPU_SUBTYPE_ARM64_ALL;
+ arm64->cpusubtype = cpu_subtype;
arm64->description = "arm 64";
return arm64;
}
@@ -79,6 +95,10 @@ const NXArchInfo* BreakpadGetArchInfoFromName(const char* arch_name) {
return BreakpadGetArchInfoFromCpuType(CPU_TYPE_ARM64,
CPU_SUBTYPE_ARM64_ALL);
+ if (!strcmp("arm64e", arch_name))
+ return BreakpadGetArchInfoFromCpuType(CPU_TYPE_ARM64,
+ CPU_SUBTYPE_ARM64_E);
+
// TODO: Remove this when the OS knows about armv7s.
if (!strcmp("armv7s", arch_name))
return BreakpadGetArchInfoFromCpuType(CPU_TYPE_ARM, CPU_SUBTYPE_ARM_V7S);
@@ -90,10 +110,15 @@ const NXArchInfo* BreakpadGetArchInfoFromCpuType(cpu_type_t cpu_type,
cpu_subtype_t cpu_subtype) {
// TODO: Remove this when the OS knows about arm64.
if (cpu_type == CPU_TYPE_ARM64 && cpu_subtype == CPU_SUBTYPE_ARM64_ALL) {
- static const NXArchInfo* arm64 = ArchInfo_arm64();
+ static const NXArchInfo* arm64 = ArchInfo_arm64(cpu_subtype);
return arm64;
}
+ if (cpu_type == CPU_TYPE_ARM64 && cpu_subtype == CPU_SUBTYPE_ARM64_E) {
+ static const NXArchInfo* arm64e = ArchInfo_arm64(cpu_subtype);
+ return arm64e;
+ }
+
// TODO: Remove this when the OS knows about armv7s.
if (cpu_type == CPU_TYPE_ARM && cpu_subtype == CPU_SUBTYPE_ARM_V7S) {
static const NXArchInfo* armv7s = ArchInfo_armv7s();
@@ -114,6 +139,7 @@ enum Architecture {
kArch_x86_64h,
kArch_arm,
kArch_arm64,
+ kArch_arm64e,
kArch_ppc,
// This must be last.
kNumArchitectures
@@ -158,6 +184,13 @@ const NXArchInfo kKnownArchitectures[] = {
"ARM64"
},
{
+ "arm64e",
+ CPU_TYPE_ARM64,
+ CPU_SUBTYPE_ARM64_E,
+ NX_LittleEndian,
+ "ARM64e"
+ },
+ {
"ppc",
CPU_TYPE_POWERPC,
CPU_SUBTYPE_POWERPC_ALL,
diff --git a/src/tools/mac/upload_system_symbols/arch_constants.h b/src/tools/mac/upload_system_symbols/arch_constants.h
index 07b1bc40..e12e53e2 100644
--- a/src/tools/mac/upload_system_symbols/arch_constants.h
+++ b/src/tools/mac/upload_system_symbols/arch_constants.h
@@ -43,10 +43,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define CPU_SUBTYPE_ARM64_ALL 0
#endif
+#ifndef CPU_SUBTYPE_ARM64_E
+#define CPU_SUBTYPE_ARM64_E 2
+#endif
+
const cpu_type_t kCPU_TYPE_ARM = CPU_TYPE_ARM;
const cpu_type_t kCPU_TYPE_ARM64 = CPU_TYPE_ARM64;
const cpu_subtype_t kCPU_SUBTYPE_ARM64_ALL = CPU_SUBTYPE_ARM64_ALL;
+const cpu_subtype_t kCPU_SUBTYPE_ARM64_E = CPU_SUBTYPE_ARM64_E;
const cpu_subtype_t kCPU_SUBTYPE_ARM_V7S = CPU_SUBTYPE_ARM_V7S;
const char* GetNXArchInfoName(cpu_type_t cpu_type, cpu_subtype_t cpu_subtype) {
diff --git a/src/tools/mac/upload_system_symbols/arch_reader.go b/src/tools/mac/upload_system_symbols/arch_reader.go
index 0e286dad..ed98fa60 100644
--- a/src/tools/mac/upload_system_symbols/arch_reader.go
+++ b/src/tools/mac/upload_system_symbols/arch_reader.go
@@ -47,6 +47,9 @@ func getArchStringFromHeader(header macho.FileHeader) string {
if header.Cpu == C.kCPU_TYPE_ARM64 && header.SubCpu == C.kCPU_SUBTYPE_ARM64_ALL {
return "arm64"
}
+ if header.Cpu == C.kCPU_TYPE_ARM64 && header.SubCpu == C.kCPU_SUBTYPE_ARM64_E {
+ return "arm64e"
+ }
if header.Cpu == C.kCPU_TYPE_ARM && header.SubCpu == C.kCPU_SUBTYPE_ARM_V7S {
return "armv7s"
}