-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
Description
Stack level setter is required only for x86, on other platforms, it could be skipped or run only in debug.
However, there is an issue with disabling it:
Stack level setter has code that was supposed to be run only on x86 but is running on all platforms currently:
runtime/src/coreclr/src/jit/stacklevelsetter.cpp
Lines 328 to 340 in 5cded6d
| if (maxStackLevel >= sizeof(unsigned)) | |
| { | |
| #ifdef DEBUG | |
| if (comp->verbose) | |
| { | |
| printf("Too many pushed arguments for an ESP based encoding, forcing an EBP frame\n"); | |
| } | |
| #endif | |
| comp->codeGen->setFramePointerRequired(true); | |
| } | |
| } | |
| //------------------------------------------------------------------------ |
If you put it under TARGET_X86 as I did in #42197 you will see a big size regressions because you will have to encode bigger offset (from the rsp instead of saved rsp+offset):
-000013 lea rbp, [rsp+C0H]
-000104 mov dword ptr [V04 rbp+30H], r15d
-000108 mov dword ptr [V06 rbp+40H], r12d
-00010C mov dword ptr [V07 rbp+48H], r13d
-
+000102 mov dword ptr [V04 rsp+F0H], r14d
+00010A mov dword ptr [V06 rsp+100H], r15d
+000112 mov dword ptr [V07 rsp+108H], r12d
and also see bunch of new bad LSRA decisions.
category:implementation
theme:throughput
skill-level:beginner
cost:small
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI