1/* |
2* Copyright (c) 2012, 2018 ARM Limited |
3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated --- 45 unchanged lines hidden (view full) --- 56class ArmProcess : public Process 57{ 58 protected: 59 ObjectFile::Arch arch; 60 ArmProcess(ProcessParams * params, ObjectFile *objFile, 61 ObjectFile::Arch _arch); 62 template<class IntType> 63 void argsInit(int pageSize, ArmISA::IntRegIndex spIndex); |
64 65 template<class IntType> 66 IntType armHwcap() const 67 { 68 return static_cast<IntType>(armHwcapImpl()); 69 } 70 71 /** 72 * AT_HWCAP is 32-bit wide on AArch64 as well so we can 73 * safely return an uint32_t */ 74 virtual uint32_t armHwcapImpl() const = 0; |
75}; 76 77class ArmProcess32 : public ArmProcess 78{ 79 protected: 80 ArmProcess32(ProcessParams * params, ObjectFile *objFile, 81 ObjectFile::Arch _arch); 82 83 void initState(); 84 |
85 /** AArch32 AT_HWCAP */ 86 uint32_t armHwcapImpl() const override; 87 |
88 public: 89 90 ArmISA::IntReg getSyscallArg(ThreadContext *tc, int &i, int width); 91 ArmISA::IntReg getSyscallArg(ThreadContext *tc, int &i); 92 void setSyscallArg(ThreadContext *tc, int i, ArmISA::IntReg val); 93 void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value); 94}; 95 96class ArmProcess64 : public ArmProcess 97{ 98 protected: 99 ArmProcess64(ProcessParams * params, ObjectFile *objFile, 100 ObjectFile::Arch _arch); 101 102 void initState(); 103 |
104 /** AArch64 AT_HWCAP */ 105 uint32_t armHwcapImpl() const override; 106 |
107 public: 108 109 ArmISA::IntReg getSyscallArg(ThreadContext *tc, int &i, int width); 110 ArmISA::IntReg getSyscallArg(ThreadContext *tc, int &i); 111 void setSyscallArg(ThreadContext *tc, int i, ArmISA::IntReg val); 112 void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value); 113}; 114 115#endif // __ARM_PROCESS_HH__ 116 |