Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/coreclr/jit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ set( JIT_SOURCES
fgprofile.cpp
fgprofilesynthesis.cpp
fgstmt.cpp
fgwasm.cpp
flowgraph.cpp
forwardsub.cpp
gcinfo.cpp
Expand Down Expand Up @@ -293,6 +292,7 @@ set( JIT_RISCV64_SOURCES
set( JIT_WASM_SOURCES
codegenwasm.cpp
emitwasm.cpp
fgwasm.cpp
lowerwasm.cpp
regallocwasm.cpp
registeropswasm.cpp
Expand Down
13 changes: 11 additions & 2 deletions src/coreclr/jit/codegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,15 @@ class CodeGen final : public CodeGenInterface

void genCodeForBBlist();

#if defined(TARGET_WASM)
ArrayStack<WasmInterval*>* wasmControlFlowStack = nullptr;
unsigned wasmCursor = 0;
unsigned findTargetDepth(BasicBlock* target);
#endif

void genEmitStartBlock(BasicBlock* block);
BasicBlock* genEmitEndBlock(BasicBlock* block);

public:
void genSpillVar(GenTree* tree);

Expand Down Expand Up @@ -893,8 +902,8 @@ class CodeGen final : public CodeGenInterface

unsigned getFirstArgWithStackSlot();

void genCompareFloat(GenTree* treeNode);
void genCompareInt(GenTree* treeNode);
void genCompareFloat(GenTreeOp* treeNode);
void genCompareInt(GenTreeOp* treeNode);
#ifdef TARGET_XARCH
bool genCanAvoidEmittingCompareAgainstZero(GenTree* tree, var_types opType);
GenTree* genTryFindFlagsConsumer(GenTree* flagsProducer, GenCondition** condition);
Expand Down
15 changes: 13 additions & 2 deletions src/coreclr/jit/codegencommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4782,7 +4782,6 @@ void CodeGen::genFinalizeFrame()
#endif
}

#ifndef TARGET_WASM
/*****************************************************************************
*
* Generates code for a function prolog.
Expand Down Expand Up @@ -4823,7 +4822,10 @@ void CodeGen::genFnProlog()
/* Ready to start on the prolog proper */

GetEmitter()->emitBegProlog();

#if !defined(TARGET_WASM)
compiler->unwindBegProlog();
#endif // !defined(TARGET_WASM)

// Do this so we can put the prolog instruction group ahead of
// other instruction groups
Expand All @@ -4842,6 +4844,8 @@ void CodeGen::genFnProlog()
psiBegProlog();
}

#if !defined(TARGET_WASM)

#if defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
// For arm64 OSR, emit a "phantom prolog" to account for the actions taken
// in the tier0 frame that impact FP and SP on entry to the OSR method.
Expand Down Expand Up @@ -5640,9 +5644,16 @@ void CodeGen::genFnProlog()
}
#endif // defined(DEBUG) && defined(TARGET_XARCH)

#else // defined(TARGET_WASM)
// TODO-WASM: prolog zeroing, shadow stack maintenance
GetEmitter()->emitMarkPrologEnd();
#endif // !defined(TARGET_WASM)

GetEmitter()->emitEndProlog();
}

#if !defined(TARGET_WASM)

//----------------------------------------------------------------------------------
// genEmitJumpTable: emit jump table and return its base offset
//
Expand Down Expand Up @@ -5844,7 +5855,7 @@ void CodeGen::genDefinePendingCallLabel(GenTreeCall* call)
genDefineInlineTempLabel(genPendingCallLabel);
genPendingCallLabel = nullptr;
}
#endif // !TARGET_WASM
#endif // !defined(TARGET_WASM)

/*****************************************************************************
*
Expand Down
Loading
Loading