aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Instructions/InstEmitMemoryHelper.cs
diff options
context:
space:
mode:
authorFICTURE7 <FICTURE7@gmail.com>2020-09-20 03:00:24 +0400
committerGitHub <noreply@github.com>2020-09-19 20:00:24 -0300
commitf60033e0aaf546d7f56a4925b5aeec76709fb851 (patch)
treeaf6585403754a771dbab824b1739322ef04b3cd8 /ARMeilleure/Instructions/InstEmitMemoryHelper.cs
parent1eea35554c7505dbf521cf9f3cfeeaa0fc7e916f (diff)
Implement block placement (#1549)
* Implement block placement Implement a simple pass which re-orders cold blocks at the end of the list of blocks in the CFG. * Set PPTC version * Use Array.Resize Address gdkchan's feedback
Diffstat (limited to 'ARMeilleure/Instructions/InstEmitMemoryHelper.cs')
-rw-r--r--ARMeilleure/Instructions/InstEmitMemoryHelper.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/ARMeilleure/Instructions/InstEmitMemoryHelper.cs b/ARMeilleure/Instructions/InstEmitMemoryHelper.cs
index 91227bc5..390d167d 100644
--- a/ARMeilleure/Instructions/InstEmitMemoryHelper.cs
+++ b/ARMeilleure/Instructions/InstEmitMemoryHelper.cs
@@ -147,7 +147,7 @@ namespace ARMeilleure.Instructions
context.Branch(lblEnd);
- context.MarkLabel(lblSlowPath);
+ context.MarkLabel(lblSlowPath, BasicBlockFrequency.Cold);
EmitReadIntFallback(context, address, rt, size);
@@ -165,7 +165,7 @@ namespace ARMeilleure.Instructions
Operand lblFastPath = Label();
- context.BranchIfFalse(lblFastPath, isUnalignedAddr);
+ context.BranchIfFalse(lblFastPath, isUnalignedAddr, BasicBlockFrequency.Cold);
// The call is not expected to return (it should throw).
context.Call(typeof(NativeInterface).GetMethod(nameof(NativeInterface.ThrowInvalidMemoryAccess)), address);
@@ -216,7 +216,7 @@ namespace ARMeilleure.Instructions
context.Branch(lblEnd);
- context.MarkLabel(lblSlowPath);
+ context.MarkLabel(lblSlowPath, BasicBlockFrequency.Cold);
EmitReadVectorFallback(context, address, vector, rt, elem, size);
@@ -256,7 +256,7 @@ namespace ARMeilleure.Instructions
context.Branch(lblEnd);
- context.MarkLabel(lblSlowPath);
+ context.MarkLabel(lblSlowPath, BasicBlockFrequency.Cold);
EmitWriteIntFallback(context, address, rt, size);
@@ -274,7 +274,7 @@ namespace ARMeilleure.Instructions
Operand lblFastPath = Label();
- context.BranchIfFalse(lblFastPath, isUnalignedAddr);
+ context.BranchIfFalse(lblFastPath, isUnalignedAddr, BasicBlockFrequency.Cold);
// The call is not expected to return (it should throw).
context.Call(typeof(NativeInterface).GetMethod(nameof(NativeInterface.ThrowInvalidMemoryAccess)), address);
@@ -331,7 +331,7 @@ namespace ARMeilleure.Instructions
context.Branch(lblEnd);
- context.MarkLabel(lblSlowPath);
+ context.MarkLabel(lblSlowPath, BasicBlockFrequency.Cold);
EmitWriteVectorFallback(context, address, rt, elem, size);
@@ -402,7 +402,7 @@ namespace ARMeilleure.Instructions
Operand lblNotWatched = Label();
// Is the page currently being monitored for modifications? If so we need to call MarkRegionAsModified.
- context.BranchIf(lblNotWatched, pte, Const(0L), Comparison.GreaterOrEqual);
+ context.BranchIf(lblNotWatched, pte, Const(0L), Comparison.GreaterOrEqual, BasicBlockFrequency.Cold);
// Mark the region as modified. Size here doesn't matter as address is assumed to be size aligned here.
context.Call(typeof(NativeInterface).GetMethod(nameof(NativeInterface.MarkRegionAsModified)), address, Const(1UL));
@@ -412,7 +412,7 @@ namespace ARMeilleure.Instructions
Operand lblNonNull = Label();
// Skip exception if the PTE address is non-null (not zero).
- context.BranchIfTrue(lblNonNull, pte);
+ context.BranchIfTrue(lblNonNull, pte, BasicBlockFrequency.Cold);
// The call is not expected to return (it should throw).
context.Call(typeof(NativeInterface).GetMethod(nameof(NativeInterface.ThrowInvalidMemoryAccess)), address);