File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
source/Plugins/Process/Utility
unittests/Instruction/ARM64 Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,9 @@ class RegisterInfoPOSIX_arm64
4646
4747 // based on RegisterContextDarwin_arm64.h
4848 // Pack this so there are no extra bytes, but align its start address to at
49- // least 4 bytes to prevent alignment errors on Arm 32-bit .
49+ // least 8 bytes to prevent alignment errors.
5050 LLVM_PACKED_START
51- struct alignas (4 ) GPR {
51+ struct alignas (8 ) GPR {
5252 uint64_t x[29 ]; // x0-x28
5353 uint64_t fp; // x29
5454 uint64_t lr; // x30
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ struct Arch64EmulatorTester : public EmulateInstructionARM64 {
6262 reg_value.SetUInt64 (tester->gpr .pc );
6363 return true ;
6464 case gpr_cpsr_arm64:
65- reg_value.SetUInt64 (tester->gpr .cpsr );
65+ reg_value.SetUInt32 (tester->gpr .cpsr );
6666 return true ;
6767 default :
6868 return false ;
@@ -97,7 +97,7 @@ struct Arch64EmulatorTester : public EmulateInstructionARM64 {
9797 tester->gpr .pc = reg_value.GetAsUInt64 ();
9898 return true ;
9999 case gpr_cpsr_arm64:
100- tester->gpr .cpsr = reg_value.GetAsUInt64 ();
100+ tester->gpr .cpsr = reg_value.GetAsUInt32 ();
101101 return true ;
102102 default :
103103 return false ;
@@ -112,7 +112,7 @@ struct Arch64EmulatorTester : public EmulateInstructionARM64 {
112112 assert (addr - tester->memory_offset + length <= sizeof (tester->memory ));
113113 if (addr >= tester->memory_offset &&
114114 addr - tester->memory_offset + length <= sizeof (tester->memory )) {
115- memcpy (dst, tester->memory + addr - tester->memory_offset , length);
115+ memcpy (dst, tester->memory + ( addr - tester->memory_offset ) , length);
116116 return length;
117117 }
118118 return 0 ;
You can’t perform that action at this time.
0 commit comments