Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

[x86/Linux] Fix cannot jump from this goto statement to its label #8389

Closed
wants to merge 1 commit into from
Closed
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
9 changes: 5 additions & 4 deletions src/jit/codegenlegacy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ regNumber CodeGen::genGetRegSetToIcon(ssize_t val, regMaskTP regBest /* = 0 */,
void CodeGen::genIncRegBy(regNumber reg, ssize_t ival, GenTreePtr tree, var_types dstType, bool ovfl)
{
bool setFlags = (tree != NULL) && tree->gtSetFlags();
insFlags flags = INS_FLAGS_DONT_CARE;

#ifdef _TARGET_XARCH_
/* First check to see if we can generate inc or dec instruction(s) */
Expand Down Expand Up @@ -486,7 +487,7 @@ void CodeGen::genIncRegBy(regNumber reg, ssize_t ival, GenTreePtr tree, var_type
}
#endif

insFlags flags = setFlags ? INS_FLAGS_SET : INS_FLAGS_DONT_CARE;
flags = setFlags ? INS_FLAGS_SET : INS_FLAGS_DONT_CARE;
inst_RV_IV(INS_add, reg, ival, emitActualTypeSize(dstType), flags);

#ifdef _TARGET_XARCH_
Expand Down Expand Up @@ -6952,6 +6953,8 @@ void CodeGen::genCodeForTreeSmpBinArithLogOp(GenTreePtr tree, regMaskTP destReg,
/* Make the second operand addressable */

regMaskTP addrReg = genMakeRvalueAddressable(op2, RBM_ALLINT, RegSet::KEEP_REG, isSmallConst);
bool op2Released = false;
emitAttr opSize = EA_UNKNOWN;

#if CPU_LOAD_STORE_ARCH
genRecoverReg(op1, RBM_ALLINT, RegSet::KEEP_REG);
Expand Down Expand Up @@ -7071,12 +7074,10 @@ void CodeGen::genCodeForTreeSmpBinArithLogOp(GenTreePtr tree, regMaskTP destReg,

regTracker.rsTrackRegTrash(reg);

bool op2Released = false;

// For overflow instructions, tree->gtType is the accurate type,
// and gives us the size for the operands.

emitAttr opSize = emitTypeSize(treeType);
opSize = emitTypeSize(treeType);

/* Compute the new value */

Expand Down