// Returns true if this instruction, for the given EA_SIZE(attr), will require a REX.W prefix
bool TakesRexWPrefix(instruction ins, emitAttr attr)
{
+#ifndef LEGACY_BACKEND
// Because the current implementation of AVX does not have a way to distinguish between the register
// size specification (128 vs. 256 bits) and the operand size specification (32 vs. 64 bits), where both are
// required, the instruction must be created with the register size attribute (EA_16BYTE or EA_32BYTE),
{
return true;
}
+#endif // !LEGACY_BACKEND
#ifdef _TARGET_AMD64_
// movsx should always sign extend out to 8 bytes just because we don't track
// whether the dest should be 4 bytes or 8 bytes (attr indicates the size
assert(hasVexPrefix(code));
// W-bit is the only bit that is added in non bit-inverted form.
- return code | 0x00008000000000ULL;
+ return emitter::code_t(code | 0x00008000000000ULL);
}
#ifdef _TARGET_AMD64_
- return code | 0x4800000000ULL;
+ return emitter::code_t(code | 0x4800000000ULL);
#else
assert(!"UNREACHED");
return code;
--- /dev/null
+project(legacyjit)
+
+add_definitions(-DLEGACY_BACKEND)
+add_definitions(-DALT_JIT)
+add_definitions(-DFEATURE_NO_HOST)
+add_definitions(-DSELF_NO_HOST)
+add_definitions(-DFEATURE_READYTORUN_COMPILER)
+remove_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE)
+
+# No SIMD in legacy back-end.
+remove_definitions(-DFEATURE_SIMD)
+remove_definitions(-DFEATURE_AVX_SUPPORT)
+
+if(WIN32)
+ add_definitions(-DFX_VER_INTERNALNAME_STR=legacyjit.dll)
+endif(WIN32)
+
+add_library_clr(legacyjit
+ SHARED
+ ${SHARED_LIB_SOURCES}
+ ${JIT_ARCH_SOURCES}
+)
+
+add_dependencies(legacyjit jit_exports)
+
+set_property(TARGET legacyjit APPEND_STRING PROPERTY LINK_FLAGS ${JIT_EXPORTS_LINKER_OPTION})
+set_property(TARGET legacyjit APPEND_STRING PROPERTY LINK_DEPENDS ${JIT_EXPORTS_FILE})
+
+set(RYUJIT_LINK_LIBRARIES
+ utilcodestaticnohost
+ gcinfo
+)
+
+if(CLR_CMAKE_PLATFORM_UNIX)
+ list(APPEND RYUJIT_LINK_LIBRARIES
+ mscorrc_debug
+ coreclrpal
+ palrt
+ )
+else()
+ list(APPEND RYUJIT_LINK_LIBRARIES
+ ${STATIC_MT_CRT_LIB}
+ ${STATIC_MT_VCRT_LIB}
+ kernel32.lib
+ advapi32.lib
+ ole32.lib
+ oleaut32.lib
+ uuid.lib
+ user32.lib
+ version.lib
+ shlwapi.lib
+ bcrypt.lib
+ crypt32.lib
+ RuntimeObject.lib
+ )
+endif(CLR_CMAKE_PLATFORM_UNIX)
+
+target_link_libraries(legacyjit
+ ${RYUJIT_LINK_LIBRARIES}
+)
+
+# add the install targets
+install_clr(legacyjit)
\ No newline at end of file
if (pState && pState->m_uStackSize)
{
- VARSET_TP VARSET_INIT_NOCOPY(liveEnregIn, VarSetOps::Intersection(compiler, compiler->fgFirstBB->bbLiveIn,
- compiler->optAllFPregVars));
+ VARSET_TP liveEnregIn(
+ VarSetOps::Intersection(compiler, compiler->fgFirstBB->bbLiveIn, compiler->optAllFPregVars));
unsigned i;
#ifdef DEBUG
}
// Update liveset and lock enregistered live vars on entry
- VARSET_TP VARSET_INIT_NOCOPY(liveSet,
- VarSetOps::Intersection(compiler, block->bbLiveIn, compiler->optAllFPregVars));
+ VARSET_TP liveSet(VarSetOps::Intersection(compiler, block->bbLiveIn, compiler->optAllFPregVars));
if (!VarSetOps::IsEmpty(compiler, liveSet))
{
void CodeGen::genQMarkRegVarTransition(GenTreePtr nextNode, VARSET_VALARG_TP liveset)
{
// Kill any vars that may die in the transition
- VARSET_TP VARSET_INIT_NOCOPY(newLiveSet, VarSetOps::Intersection(compiler, liveset, compiler->optAllFPregVars));
+ VARSET_TP newLiveSet(VarSetOps::Intersection(compiler, liveset, compiler->optAllFPregVars));
regMaskTP liveRegIn = genRegMaskFromLivenessStackFP(newLiveSet);
genCodeForTransitionFromMask(&compCurFPState, liveRegIn);
// Only come here when we have to do something special for the FPU stack!
//
assert(!compCurFPState.IsEmpty());
- VARSET_TP VARSET_INIT_NOCOPY(liveInFP, VarSetOps::MakeEmpty(compiler));
- VARSET_TP VARSET_INIT_NOCOPY(liveOutFP, VarSetOps::MakeEmpty(compiler));
+ VARSET_TP liveInFP(VarSetOps::MakeEmpty(compiler));
+ VARSET_TP liveOutFP(VarSetOps::MakeEmpty(compiler));
for (unsigned i = 0; i < jumpCnt; i++)
{
VarSetOps::Assign(compiler, liveInFP, jumpTab[i]->bbLiveIn);
void Compiler::raAddPayloadStackFP(VARSET_VALARG_TP maskArg, unsigned weight)
{
- VARSET_TP VARSET_INIT_NOCOPY(mask, VarSetOps::Intersection(this, maskArg, optAllFloatVars));
+ VARSET_TP mask(VarSetOps::Intersection(this, maskArg, optAllFloatVars));
if (VarSetOps::IsEmpty(this, mask))
{
return;
//
//
//
- VARSET_TP VARSET_INIT_NOCOPY(blockLiveOutFloats, VarSetOps::MakeEmpty(this));
+ VARSET_TP blockLiveOutFloats(VarSetOps::MakeEmpty(this));
for (block = fgFirstBB; block; block = block->bbNext)
{
compCurBB = block;
}
}
- VARSET_TP VARSET_INIT(this, liveSet, block->bbLiveIn);
+ VARSET_TP liveSet(VarSetOps::MakeCopy(this, block->bbLiveIn));
for (GenTreePtr stmt = block->FirstNonPhiDef(); stmt; stmt = stmt->gtNext)
{
assert(stmt->gtOper == GT_STMT);
}
*/
- VARSET_TP VARSET_INIT(this, lastlife, block->bbLiveIn);
+ VARSET_TP lastlife(VarSetOps::MakeCopy(this, block->bbLiveIn));
for (GenTreePtr stmt = block->FirstNonPhiDef(); stmt; stmt = stmt->gtNext)
{
assert(stmt->gtOper == GT_STMT);
// Create interferences with other variables.
assert(VarSetOps::IsEmpty(this, VarSetOps::Diff(this, raLclRegIntfFloat[(int)reg], optAllFloatVars)));
- VARSET_TP VARSET_INIT_NOCOPY(intfFloats, VarSetOps::Intersection(this, lvaVarIntf[varIndex], optAllFloatVars));
+ VARSET_TP intfFloats(VarSetOps::Intersection(this, lvaVarIntf[varIndex], optAllFloatVars));
VarSetOps::UnionD(this, raLclRegIntfFloat[reg], intfFloats);