Skip to content

Commit 07b0be8

Browse files
committed
CR fix
1 parent 0dd6cca commit 07b0be8

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

lib/Backend/amd64/LowererMDArch.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,8 @@ LowererMDArch::LowerWasmArrayBoundsCheck(IR::Instr * instr, IR::Opnd *addrOpnd)
11291129
void
11301130
LowererMDArch::LowerAtomicStore(IR::Opnd * dst, IR::Opnd * src1, IR::Instr * insertBeforeInstr)
11311131
{
1132+
Assert(IRType_IsNativeInt(dst->GetType()));
1133+
Assert(IRType_IsNativeInt(src1->GetType()));
11321134
IR::RegOpnd* tmpSrc = IR::RegOpnd::New(dst->GetType(), m_func);
11331135
Lowerer::InsertMove(tmpSrc, src1, insertBeforeInstr);
11341136

@@ -1140,6 +1142,8 @@ LowererMDArch::LowerAtomicStore(IR::Opnd * dst, IR::Opnd * src1, IR::Instr * ins
11401142
void
11411143
LowererMDArch::LowerAtomicLoad(IR::Opnd * dst, IR::Opnd * src1, IR::Instr * insertBeforeInstr)
11421144
{
1145+
Assert(IRType_IsNativeInt(dst->GetType()));
1146+
Assert(IRType_IsNativeInt(src1->GetType()));
11431147
IR::Instr* newMove = Lowerer::InsertMove(dst, src1, insertBeforeInstr);
11441148

11451149
#if ENABLE_FAST_ARRAYBUFFER

lib/Backend/i386/LowererMDArch.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,8 @@ LowererMDArch::LowerWasmArrayBoundsCheck(IR::Instr * instr, IR::Opnd *addrOpnd)
925925
void
926926
LowererMDArch::LowerAtomicStore(IR::Opnd * dst, IR::Opnd * src1, IR::Instr * insertBeforeInstr)
927927
{
928+
Assert(IRType_IsNativeInt(dst->GetType()));
929+
Assert(IRType_IsNativeInt(src1->GetType()));
928930
Func* func = insertBeforeInstr->m_func;
929931

930932
// Move src1 to a register of the same type as dst
@@ -1002,6 +1004,8 @@ LowererMDArch::LowerAtomicStore(IR::Opnd * dst, IR::Opnd * src1, IR::Instr * ins
10021004
void
10031005
LowererMDArch::LowerAtomicLoad(IR::Opnd * dst, IR::Opnd * src1, IR::Instr * insertBeforeInstr)
10041006
{
1007+
Assert(IRType_IsNativeInt(dst->GetType()));
1008+
Assert(IRType_IsNativeInt(src1->GetType()));
10051009
Func* func = insertBeforeInstr->m_func;
10061010

10071011
if (src1->IsInt64())

0 commit comments

Comments
 (0)