Skip to content

Commit

Permalink
Fix register includes in unusedArgs.C
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Jan 23, 2024
1 parent a2a590f commit 8cdafca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion unusedArgs/unusedArgs.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,25 @@
#include "Symtab.h"
#include "Function.h"
#include "liveness.h"
#include "registers/x86_64_regs.h"

using namespace Dyninst;
using namespace SymtabAPI;
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 };
Expand Down

0 comments on commit 8cdafca

Please # to comment.