Skip to content

Commit ffca16c

Browse files
committed
Revert "[WebAssembly] Update WebAssemblyAsmTypeCheck for table.get"
This reverts commit 6b2482f due to test failures on AArch64 bots: https://lab.llvm.org/buildbot/#/builders/183/builds/3684
1 parent bbcc0f6 commit ffca16c

File tree

3 files changed

+0
-51
lines changed

3 files changed

+0
-51
lines changed

llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -182,20 +182,6 @@ bool WebAssemblyAsmTypeCheck::getGlobal(SMLoc ErrorLoc, const MCInst &Inst,
182182
return false;
183183
}
184184

185-
bool WebAssemblyAsmTypeCheck::getTable(SMLoc ErrorLoc, const MCInst &Inst,
186-
wasm::ValType &Type) {
187-
const MCSymbolRefExpr *SymRef;
188-
if (getSymRef(ErrorLoc, Inst, SymRef))
189-
return true;
190-
auto WasmSym = cast<MCSymbolWasm>(&SymRef->getSymbol());
191-
if (WasmSym->getType().getValueOr(wasm::WASM_SYMBOL_TYPE_DATA) !=
192-
wasm::WASM_SYMBOL_TYPE_TABLE)
193-
return typeError(ErrorLoc, StringRef("symbol ") + WasmSym->getName() +
194-
" missing .tabletype");
195-
Type = static_cast<wasm::ValType>(WasmSym->getTableType().ElemType);
196-
return false;
197-
}
198-
199185
bool WebAssemblyAsmTypeCheck::endOfFunction(SMLoc ErrorLoc) {
200186
// Check the return types.
201187
for (auto RVT : llvm::reverse(ReturnTypes)) {
@@ -239,19 +225,6 @@ bool WebAssemblyAsmTypeCheck::typeCheck(SMLoc ErrorLoc, const MCInst &Inst) {
239225
return true;
240226
if (popType(ErrorLoc, Type))
241227
return true;
242-
} else if (Name == "table.get") {
243-
if (getTable(ErrorLoc, Inst, Type))
244-
return true;
245-
if (popType(ErrorLoc, wasm::ValType::I32))
246-
return true;
247-
Stack.push_back(Type);
248-
} else if (Name == "table.set") {
249-
if (getTable(ErrorLoc, Inst, Type))
250-
return true;
251-
if (popType(ErrorLoc, Type))
252-
return true;
253-
if (popType(ErrorLoc, wasm::ValType::I32))
254-
return true;
255228
} else if (Name == "drop") {
256229
if (popType(ErrorLoc, {}))
257230
return true;

llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class WebAssemblyAsmTypeCheck final {
4444
bool getSymRef(SMLoc ErrorLoc, const MCInst &Inst,
4545
const MCSymbolRefExpr *&SymRef);
4646
bool getGlobal(SMLoc ErrorLoc, const MCInst &Inst, wasm::ValType &Type);
47-
bool getTable(SMLoc ErrorLoc, const MCInst &Inst, wasm::ValType &Type);
4847

4948
public:
5049
WebAssemblyAsmTypeCheck(MCAsmParser &Parser, const MCInstrInfo &MII, bool is64);

llvm/test/MC/WebAssembly/funcref-from-table.s

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)