From 8cdafcaae5114e298f29131a19b27e7e0b943ac4 Mon Sep 17 00:00:00 2001 From: Tim Haines Date: Tue, 23 Jan 2024 12:59:17 -0600 Subject: [PATCH] Fix register includes in unusedArgs.C --- unusedArgs/unusedArgs.C | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unusedArgs/unusedArgs.C b/unusedArgs/unusedArgs.C index dd000a7..ba81548 100644 --- a/unusedArgs/unusedArgs.C +++ b/unusedArgs/unusedArgs.C @@ -6,7 +6,6 @@ #include "Symtab.h" #include "Function.h" #include "liveness.h" -#include "registers/x86_64_regs.h" using namespace Dyninst; using namespace SymtabAPI; @@ -14,14 +13,18 @@ using namespace ParseAPI; using namespace std; #if defined(__x86_64__) +#include "registers/x86_64_regs.h" // Based on Figure 3.4: Register Usage of // https://web.archive.org/web/20160801075146/http://www.x86-64.org/documentation/abi.pdf const MachRegister arg_register[] = {x86_64::rdi, x86_64::rsi, x86_64::rdx, x86_64::rcx, x86_64::r8, x86_64::r9}; #elif defined(__aarch64__) +#include "registers/aarch64_regs.h" // aarch64 calling conventions from https://developer.arm.com/documentation/ihi0055/d/ const MachRegister arg_register[] = {aarch64::x0, aarch64::x1, aarch64::x2, aarch64::x3, aarch64::x4, aarch64::x5, aarch64::x6, aarch64::x7}; #elif defined(__powerpc__) +#include "registers/ppc32_regs.h" +#include "registers/ppc64_regs.h" // 64-bit powerpc calling conventions from https://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#REG const MachRegister arg_register[] = {ppc64::r3, ppc64::r4, ppc64::r5, ppc64::r6, ppc64::r7, ppc64::r8, ppc64::r9, ppc64::r10 };