summaryrefslogtreecommitdiff
path: root/src/vm/arm64/cgencpu.h
diff options
context:
space:
mode:
authorRama Krishnan Raghupathy <ramarag@microsoft.com>2016-07-18 19:40:05 -0700
committerRama Krishnan Raghupathy <ramarag@microsoft.com>2016-07-25 18:42:30 -0700
commit00e3695c1b51248f58f6b7e1f24f83a791a3b79e (patch)
tree1af2da04bf3816d3a6172b52a84201387a5e2673 /src/vm/arm64/cgencpu.h
parentc358f77a1ddcf31475450c40af64ad115259e622 (diff)
downloadcoreclr-00e3695c1b51248f58f6b7e1f24f83a791a3b79e.tar.gz
coreclr-00e3695c1b51248f58f6b7e1f24f83a791a3b79e.tar.bz2
coreclr-00e3695c1b51248f58f6b7e1f24f83a791a3b79e.zip
Arm64: Debugger
Instruction emulation for Break Points Debugger::FuncEvalSetup NativeWalker ExceptionHijack Exception intercept Managed Return Value
Diffstat (limited to 'src/vm/arm64/cgencpu.h')
-rw-r--r--src/vm/arm64/cgencpu.h63
1 files changed, 61 insertions, 2 deletions
diff --git a/src/vm/arm64/cgencpu.h b/src/vm/arm64/cgencpu.h
index 4929cd1dc9..53079352cb 100644
--- a/src/vm/arm64/cgencpu.h
+++ b/src/vm/arm64/cgencpu.h
@@ -153,9 +153,34 @@ inline TADDR GetSP(const T_CONTEXT * context) {
return TADDR(context->Sp);
}
-inline PCODE GetLR(const T_CONTEXT * context) {
+inline TADDR GetLR(const T_CONTEXT * context) {
LIMITED_METHOD_DAC_CONTRACT;
- return PCODE(context->Lr);
+ return context->Lr;
+}
+
+inline void SetLR( T_CONTEXT * context, TADDR eip) {
+ LIMITED_METHOD_DAC_CONTRACT;
+ context->Lr = eip;
+}
+
+inline TADDR GetReg(T_CONTEXT * context, int Regnum)
+{
+ LIMITED_METHOD_DAC_CONTRACT;
+ _ASSERTE(Regnum >= 0 && Regnum < 32 );
+ return context->X[Regnum];
+}
+
+inline void SetReg(T_CONTEXT * context, int Regnum, PCODE RegContent)
+{
+ LIMITED_METHOD_DAC_CONTRACT;
+ _ASSERTE(Regnum >= 0 && Regnum <=28 );
+ context->X[Regnum] = RegContent;
+}
+inline void SetSimdReg(T_CONTEXT * context, int Regnum, NEON128 RegContent)
+{
+ LIMITED_METHOD_DAC_CONTRACT;
+ _ASSERTE(Regnum >= 0 && Regnum <= 28);
+ context->V[Regnum] = RegContent;
}
extern "C" LPVOID __stdcall GetCurrentSP();
@@ -176,6 +201,40 @@ inline TADDR GetFP(const T_CONTEXT * context)
return (TADDR)(context->Fp);
}
+inline NEON128 GetSimdMem(PCODE ip)
+{
+ NEON128 mem;
+ LIMITED_METHOD_DAC_CONTRACT;
+ EX_TRY
+ {
+ mem.Low = dac_cast<PCODE>(ip);
+ mem.High = dac_cast<PCODE>(ip + sizeof(PCODE));
+ }
+ EX_CATCH
+ {
+ _ASSERTE(!"Memory read within jitted Code Failed, this should not happen!!!!");
+ }
+ EX_END_CATCH(SwallowAllExceptions);
+
+ return mem;
+}
+inline TADDR GetMem(PCODE ip)
+{
+ TADDR mem;
+ LIMITED_METHOD_DAC_CONTRACT;
+ EX_TRY
+ {
+ mem = dac_cast<TADDR>(ip);
+ }
+ EX_CATCH
+ {
+ _ASSERTE(!"Memory read within jitted Code Failed, this should not happen!!!!");
+ }
+ EX_END_CATCH(SwallowAllExceptions);
+ return mem;
+}
+
+
#ifdef FEATURE_COMINTEROP
void emitCOMStubCall (ComCallMethodDesc *pCOMMethod, PCODE target);
#endif // FEATURE_COMINTEROP