Skip to content

GC Fixes for Upstream Update #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

bholmes
Copy link
Member

@bholmes bholmes commented Mar 23, 2023

Need to implement a simple version of Frozen Segments

Adding "FEATURE_UNITY_NULLGC_WRITEBARRIER_PATCH"
to workaround write barrier problems with our GC. We need to
remove FEATURE_UNITY_NULLGC_WRITEBARRIER_PATCH
completely when we move back to the default GC.

am11 and others added 19 commits March 20, 2023 17:03
> /runtime/src/coreclr/vm/cgensys.h:107:26: error: stdcall calling convention is not supported on builtin function [-Werror,-Wignored-attributes]
…e are being set (dotnet#83516)

* Cleanup some HWIntrinsic logic to ensure the right gtType and simdSize are being set

* Apply formatting patch

* Add a missing GetLower call

* Fix an assert for lowering TYP_SIMD12 where its handled as TYP_SIMD16

* Ensure GetLower is used in Dot for TYP_SIMD32

* Apply formatting patch

* Insert after, not before, for the _GetLower to avoid a codegen regression

* Put the _GetLower in the right place to avoid the codegen regression

* Don't change the simd size of TYP_SIMD8/12 DotProduct unnecessarily
Replaced _divided-by_ with _multiplied-by_ in both
IMultiplyOperators.cs and NFloat.cs.
Fixes dotnet#80521
* xxAny, xAll comparisons in progress.

* xxAny, xxAll comparisons, part 2.

* [mono][jit] Adding compare all/any operations. Fixed umov,smov macros.

* Removed superfluous changes.

* Restored newline at the end of HelloWorld.

* Fixed unmatched brace.

* Indentation.

* Normalized boolean values to 0/1. SIMD_EXTR_ constants have friendlier names. Equality/Inequality are now also intrinsics.

* Fixed element type for comparisons.

* Temporarily disabled intrinsics. Will be permanenty reenabled once all are implemented.
…#83675)

* SN_Sum operation on arm64. Fixed dup. Replaced addv, addp, faddp with their generalized variants. Added OP_EXTRACTx opcodes to arm64 codegen. Added horizontal sums.

* Fixed smov macro. Added SN_ToScalar. Fixed code style.

* Fixed vector sums of nint/nuint.

* Temporarily disable intrinsics, until all are implemented.
* Fix.

* Regex approach is not necessary.

* Fix encoding on Windows.

* Fixed build error.

* Reverted unnecessary changes. Blocked relink with unicode.

* Revet + nit.

* Applied @kg's review.
…me (dotnet#83711)

* Load AOT module of a container assembly using assembly name

* Use mono_image_init to init the image

* Implement mono_loader_lock on load_container_amodule

* Avoid recursive invocation by setting container_assm_name to NULL
Merge commit 'edb161ab06ddc69d27aee2c0e990a60221ebbe92' into unity-upstream-tracking/staging
Casing on the platform name changed
This is a temporary patch to allow our NULL GC to work with upstream
changes.  Check the upper bounds in JIT_WriteBarrier_PreGrow64 and
JIT_WriteBarrier_WriteWatch_PreGrow64.

We must remove this when we return to default coreclr gc.
@bholmes bholmes requested a review from joncham March 23, 2023 17:17
cmp rsi, r8

#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
.byte 0x73, 0x4b
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a jump instruction?

cmp rsi, r10

#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
.byte 0x73, 0x3b
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The offset of 0x3b is probably wrong as there is an extra shr instruction on line 468.

Not sure what I am going to do about it as it may not be used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I have a better way to do this...

TLDR;
We need to force the bReqUpperBoundsCheck bool to be true here...

https://github.com/dotnet/runtime/blob/main/src/coreclr/vm/amd64/jitinterfaceamd64.cpp#L833

Will swap this out and try again.

@bholmes
Copy link
Member Author

bholmes commented Mar 24, 2023

What I think is going on with the tests...

  • Windows x86 is broken upstream
  • OSX amd64 May be related to my Write barrier patch, will try something else
  • OSX arm64 (not run on the server) Failing, probably due to WB code that needs attention for arm

bholmes added 2 commits March 24, 2023 12:00
With the null gc, we always want to have the upper bounds check
This ensures that the tiny bounds we setup will always miss.

Remove this when we remove the null GC.
@bholmes bholmes force-pushed the unity-upstream-tracking/staging branch from 759a329 to a276f28 Compare March 27, 2023 16:17
Base automatically changed from unity-upstream-tracking/staging to unity-main April 5, 2023 18:02
@bholmes bholmes closed this May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.