summaryrefslogtreecommitdiff
path: root/src/vm/arm
diff options
context:
space:
mode:
authorBruce Forstall <brucefo@microsoft.com>2018-03-20 20:55:07 -0700
committerBruce Forstall <brucefo@microsoft.com>2018-03-30 23:27:13 -0700
commita74067170f7c24b81c5b3794a6f3758f1aacc05b (patch)
treec2724b1ee4b6acef8844a6f56b564aa4f22ad6a4 /src/vm/arm
parent9496bc0546b73fdc4fdc8a176b2abd66bacf54db (diff)
downloadcoreclr-a74067170f7c24b81c5b3794a6f3758f1aacc05b.tar.gz
coreclr-a74067170f7c24b81c5b3794a6f3758f1aacc05b.tar.bz2
coreclr-a74067170f7c24b81c5b3794a6f3758f1aacc05b.zip
Tighten arm32/arm64 write barrier kill reg sets
The JIT write barrier helpers have a custom calling convention that avoids killing most registers. The JIT was not taking advantage of this, and thus was killing unnecessary registers when a write barrier was necessary. In particular, some integer callee-trash registers are unaffected by the write barriers, and no floating-point register is affected. Also, I got rid of the `FEATURE_WRITE_BARRIER` define, which is always set. I also put some code under `LEGACY_BACKEND` for easier cleanup later. I removed some unused defines in target.h for some platforms.
Diffstat (limited to 'src/vm/arm')
-rw-r--r--src/vm/arm/asmhelpers.asm13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/vm/arm/asmhelpers.asm b/src/vm/arm/asmhelpers.asm
index b2430418d2..60def084e7 100644
--- a/src/vm/arm/asmhelpers.asm
+++ b/src/vm/arm/asmhelpers.asm
@@ -1652,7 +1652,7 @@ DoWrite
; over the lifetime of the CLR. Specifically ARM has real problems reading the values of external globals (we
; need two memory indirections to do this) so we'd like to be able to directly set the current values of
; various GC globals (e.g. g_lowest_address and g_card_table) into the barrier code itself and then reset them
-; every time they change (the GC already calls the VM to inform it of these changes). The handle this without
+; every time they change (the GC already calls the VM to inform it of these changes). To handle this without
; creating too much fragility such as hardcoding instruction offsets in the VM update code, we wrap write
; barrier creation and GC globals access in a set of macros that create a table of descriptors describing each
; offset that must be patched.
@@ -1916,10 +1916,11 @@ pShadow SETS "r7"
; is more important).
;
; Input:
- ; $ptrReg : register containing the location to be updated
- ; $valReg : register containing the value (an objref) to be written to the location above
- ; $mp : boolean indicating whether the code will run on an MP system
- ; $tmpReg : additional register that can be trashed (can alias $ptrReg or $valReg if needed)
+ ; $ptrReg : register containing the location to be updated
+ ; $valReg : register containing the value (an objref) to be written to the location above
+ ; $mp : boolean indicating whether the code will run on an MP system
+ ; $postGrow : boolean: {true} for post-grow version, {false} otherwise
+ ; $tmpReg : additional register that can be trashed (can alias $ptrReg or $valReg if needed)
;
; Output:
; $tmpReg : trashed (defaults to $ptrReg)
@@ -2005,7 +2006,7 @@ tempReg SETS "$tmpReg"
;
; Finally define the write barrier functions themselves. Currently we don't provide variations that use
; different input registers. If the JIT wants this at a later stage in order to improve code quality it would
-; be a relatively simply change to implement via an additional macro parameter to WRITE_BARRIER_ENTRY.
+; be a relatively simple change to implement via an additional macro parameter to WRITE_BARRIER_ENTRY.
;
; The calling convention for the first batch of write barriers is:
;