Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp =================================================================== --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp @@ -176,14 +176,14 @@ LLVM_DEBUG(dbgs() << "EmitInstruction: " << *MI << '\n'); switch (MI->getOpcode()) { - case WebAssembly::ARGUMENT_I32: - case WebAssembly::ARGUMENT_I32_S: - case WebAssembly::ARGUMENT_I64: - case WebAssembly::ARGUMENT_I64_S: - case WebAssembly::ARGUMENT_F32: - case WebAssembly::ARGUMENT_F32_S: - case WebAssembly::ARGUMENT_F64: - case WebAssembly::ARGUMENT_F64_S: + case WebAssembly::ARGUMENT_i32: + case WebAssembly::ARGUMENT_i32_S: + case WebAssembly::ARGUMENT_i64: + case WebAssembly::ARGUMENT_i64_S: + case WebAssembly::ARGUMENT_f32: + case WebAssembly::ARGUMENT_f32_S: + case WebAssembly::ARGUMENT_f64: + case WebAssembly::ARGUMENT_f64_S: case WebAssembly::ARGUMENT_v16i8: case WebAssembly::ARGUMENT_v16i8_S: case WebAssembly::ARGUMENT_v8i16: Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblyFastISel.cpp =================================================================== --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyFastISel.cpp +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyFastISel.cpp @@ -646,19 +646,19 @@ case MVT::i8: case MVT::i16: case MVT::i32: - Opc = WebAssembly::ARGUMENT_I32; + Opc = WebAssembly::ARGUMENT_i32; RC = &WebAssembly::I32RegClass; break; case MVT::i64: - Opc = WebAssembly::ARGUMENT_I64; + Opc = WebAssembly::ARGUMENT_i64; RC = &WebAssembly::I64RegClass; break; case MVT::f32: - Opc = WebAssembly::ARGUMENT_F32; + Opc = WebAssembly::ARGUMENT_f32; RC = &WebAssembly::F32RegClass; break; case MVT::f64: - Opc = WebAssembly::ARGUMENT_F64; + Opc = WebAssembly::ARGUMENT_f64; RC = &WebAssembly::F64RegClass; break; case MVT::v16i8: @@ -686,7 +686,7 @@ RC = &WebAssembly::V128RegClass; break; case MVT::ExceptRef: - Opc = WebAssembly::ARGUMENT_EXCEPT_REF; + Opc = WebAssembly::ARGUMENT_ExceptRef; RC = &WebAssembly::EXCEPT_REFRegClass; break; default: Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInfo.td =================================================================== --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInfo.td +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInfo.td @@ -163,18 +163,18 @@ // Additional instructions. //===----------------------------------------------------------------------===// -multiclass ARGUMENT { +multiclass ARGUMENT { let hasSideEffects = 1, isCodeGenOnly = 1, Defs = [], Uses = [ARGUMENTS] in - defm ARGUMENT_#vt : I<(outs vt:$res), (ins i32imm:$argno), - (outs), (ins i32imm:$argno), - [(set vt:$res, (WebAssemblyargument timm:$argno))]>; + defm ARGUMENT_#vt : + I<(outs reg:$res), (ins i32imm:$argno), (outs), (ins i32imm:$argno), + [(set (vt reg:$res), (WebAssemblyargument timm:$argno))]>; } -defm "": ARGUMENT; -defm "": ARGUMENT; -defm "": ARGUMENT; -defm "": ARGUMENT; -defm "": ARGUMENT; +defm "": ARGUMENT; +defm "": ARGUMENT; +defm "": ARGUMENT; +defm "": ARGUMENT; +defm "": ARGUMENT; // get_local and set_local are not generated by instruction selection; they // are implied by virtual register uses and defs. Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td =================================================================== --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td @@ -21,21 +21,12 @@ Requires<[HasSIMD128]>; } -multiclass SIMD_ARGUMENT { - let hasSideEffects = 1, isCodeGenOnly = 1, - Defs = [], Uses = [ARGUMENTS] in - defm ARGUMENT_#vt : SIMD_I<(outs V128:$res), (ins i32imm:$argno), - (outs), (ins i32imm:$argno), - [(set (vt V128:$res), - (WebAssemblyargument timm:$argno))]>; -} - -defm "": SIMD_ARGUMENT; -defm "": SIMD_ARGUMENT; -defm "": SIMD_ARGUMENT; -defm "": SIMD_ARGUMENT; -defm "": SIMD_ARGUMENT; -defm "": SIMD_ARGUMENT; +defm "" : ARGUMENT; +defm "" : ARGUMENT; +defm "" : ARGUMENT; +defm "" : ARGUMENT; +defm "" : ARGUMENT; +defm "" : ARGUMENT; // Constrained immediate argument types foreach SIZE = [8, 16] in Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblyUtilities.cpp =================================================================== --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyUtilities.cpp +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyUtilities.cpp @@ -27,14 +27,14 @@ bool WebAssembly::isArgument(const MachineInstr &MI) { switch (MI.getOpcode()) { - case WebAssembly::ARGUMENT_I32: - case WebAssembly::ARGUMENT_I32_S: - case WebAssembly::ARGUMENT_I64: - case WebAssembly::ARGUMENT_I64_S: - case WebAssembly::ARGUMENT_F32: - case WebAssembly::ARGUMENT_F32_S: - case WebAssembly::ARGUMENT_F64: - case WebAssembly::ARGUMENT_F64_S: + case WebAssembly::ARGUMENT_i32: + case WebAssembly::ARGUMENT_i32_S: + case WebAssembly::ARGUMENT_i64: + case WebAssembly::ARGUMENT_i64_S: + case WebAssembly::ARGUMENT_f32: + case WebAssembly::ARGUMENT_f32_S: + case WebAssembly::ARGUMENT_f64: + case WebAssembly::ARGUMENT_f64_S: case WebAssembly::ARGUMENT_v16i8: case WebAssembly::ARGUMENT_v16i8_S: case WebAssembly::ARGUMENT_v8i16: