Skip to content

Commit d3222bd

Browse files
Address x86-only prefast warning
1 parent a157300 commit d3222bd

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

lib/Backend/Lower.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21156,8 +21156,12 @@ Lowerer::GenerateArgOutForStackArgs(IR::Instr* callInstr, IR::Instr* stackArgsIn
2115621156

2115721157

2115821158
#if defined(_M_IX86)
21159-
Assert(false);
21160-
#endif
21159+
// We get a compilation error on x86 due to assiging a negative to a uint
21160+
// TODO: don't even define this function on x86 - we Assert(false) anyway there.
21161+
// Alternatively, don't define when INT_ARG_REG_COUNT - 4 < 0
21162+
AssertOrFailFast(false);
21163+
return nullptr;
21164+
#else
2116121165

2116221166
Assert(stackArgsInstr->m_opcode == Js::OpCode::ArgOut_A_FromStackArgs);
2116321167
Assert(callInstr->m_opcode == Js::OpCode::CallIDynamic);
@@ -21225,14 +21229,7 @@ Lowerer::GenerateArgOutForStackArgs(IR::Instr* callInstr, IR::Instr* stackArgsIn
2122521229

2122621230
// 4 to denote this is 4th register after this, callinfo & function object
2122721231
// INT_ARG_REG_COUNT is the number of parameters passed in int regs
21228-
uint current_reg_pass =
21229-
#if defined(_M_IX86)
21230-
// We get a compilation error on x86 due to assiging a negative to a uint
21231-
// TODO: don't even define this function on x86 - we Assert(false) anyway there.
21232-
0;
21233-
#else
21234-
INT_ARG_REG_COUNT - 4;
21235-
#endif
21232+
uint current_reg_pass = INT_ARG_REG_COUNT - 4;
2123621233

2123721234
do
2123821235
{
@@ -21278,6 +21275,7 @@ Lowerer::GenerateArgOutForStackArgs(IR::Instr* callInstr, IR::Instr* stackArgsIn
2127821275

2127921276
/*return the length which will be used for callInfo generations & stack allocation*/
2128021277
return saveLenInstr->GetDst()->AsRegOpnd();
21278+
#endif
2128121279
}
2128221280

2128321281
void

0 commit comments

Comments
 (0)