Home
last modified time | relevance | path

Searched full:webassembly (Results 1 – 25 of 264) sorted by relevance

1234567891011

/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/WebAssembly/MCTargetDesc/
DWebAssemblyMCTargetDesc.h1 //==- WebAssemblyMCTargetDesc.h - WebAssembly Target Descriptions -*- C++ -*-=//
10 /// This file provides WebAssembly-specific target descriptions.
43 namespace WebAssembly {
82 } // end namespace WebAssembly
111 // Defines symbolic names for WebAssembly registers. This defines a mapping from
117 // Defines symbolic names for the WebAssembly instructions.
123 namespace WebAssembly {
152 case WebAssembly::LOAD8_S_I32: in GetDefaultP2AlignAny()
153 case WebAssembly::LOAD8_S_I32_S: in GetDefaultP2AlignAny()
154 case WebAssembly::LOAD8_U_I32: in GetDefaultP2AlignAny()
[all …]
DWebAssemblyMCCodeEmitter.cpp1 //=- WebAssemblyMCCodeEmitter.cpp - Convert WebAssembly code to machine code -//
76 if (MI.getOpcode() == WebAssembly::BR_TABLE_I32_S || in encodeInstruction()
77 MI.getOpcode() == WebAssembly::BR_TABLE_I64_S) in encodeInstruction()
79 if (MI.getOpcode() == WebAssembly::BR_TABLE_I32 || in encodeInstruction()
80 MI.getOpcode() == WebAssembly::BR_TABLE_I64) in encodeInstruction()
95 case WebAssembly::OPERAND_I32IMM: in encodeInstruction()
98 case WebAssembly::OPERAND_OFFSET32: in encodeInstruction()
101 case WebAssembly::OPERAND_I64IMM: in encodeInstruction()
104 case WebAssembly::OPERAND_SIGNATURE: in encodeInstruction()
107 case WebAssembly::OPERAND_VEC_I8IMM: in encodeInstruction()
[all …]
DWebAssemblyInstPrinter.cpp1 //=- WebAssemblyInstPrinter.cpp - WebAssembly assembly instruction printing -=//
16 #include "WebAssembly.h"
63 if (I != 0 && ((MI->getOpcode() != WebAssembly::CALL_INDIRECT_VOID && in printInst()
64 MI->getOpcode() != WebAssembly::CALL_INDIRECT_VOID_S) || in printInst()
82 case WebAssembly::LOOP: in printInst()
83 case WebAssembly::LOOP_S: in printInst()
88 case WebAssembly::BLOCK: in printInst()
89 case WebAssembly::BLOCK_S: in printInst()
93 case WebAssembly::TRY: in printInst()
94 case WebAssembly::TRY_S: in printInst()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/WebAssembly/
DWebAssemblyFastISel.cpp1 //===-- WebAssemblyFastISel.cpp - WebAssembly FastISel implementation -----===//
10 /// This file defines the WebAssembly-specific support for the FastISel
19 #include "WebAssembly.h"
384 Reg = createResultReg(Subtarget->hasAddr64() ? &WebAssembly::I64RegClass in materializeLoadStoreOperands()
385 : &WebAssembly::I32RegClass); in materializeLoadStoreOperands()
386 unsigned Opc = Subtarget->hasAddr64() ? WebAssembly::CONST_I64 in materializeLoadStoreOperands()
387 : WebAssembly::CONST_I32; in materializeLoadStoreOperands()
462 unsigned Imm = createResultReg(&WebAssembly::I32RegClass); in zeroExtendToI32()
464 TII.get(WebAssembly::CONST_I32), Imm) in zeroExtendToI32()
467 unsigned Result = createResultReg(&WebAssembly::I32RegClass); in zeroExtendToI32()
[all …]
DWebAssemblyExplicitLocals.cpp10 /// This file converts any remaining registers into WebAssembly locals.
19 #include "WebAssembly.h"
36 // This produces output which is not valid WebAssembly, and is not supported
40 cl::desc("WebAssembly: output implicit locals in"
47 return "WebAssembly Explicit Locals"; in getPassName()
66 "Convert registers to WebAssembly locals", false, false)
84 if (RC == &WebAssembly::I32RegClass) in getDropOpcode()
85 return WebAssembly::DROP_I32; in getDropOpcode()
86 if (RC == &WebAssembly::I64RegClass) in getDropOpcode()
87 return WebAssembly::DROP_I64; in getDropOpcode()
[all …]
DWebAssemblyInstrInfo.cpp1 //===-- WebAssemblyInstrInfo.cpp - WebAssembly Instruction Information ----===//
10 /// This file contains the WebAssembly implementation of the
17 #include "WebAssembly.h"
31 // defines WebAssembly::getNamedOperandIdx
36 : WebAssemblyGenInstrInfo(WebAssembly::ADJCALLSTACKDOWN, in WebAssemblyInstrInfo()
37 WebAssembly::ADJCALLSTACKUP, in WebAssemblyInstrInfo()
38 WebAssembly::CATCHRET), in WebAssemblyInstrInfo()
44 case WebAssembly::CONST_I32: in isReallyTriviallyReMaterializable()
45 case WebAssembly::CONST_I64: in isReallyTriviallyReMaterializable()
46 case WebAssembly::CONST_F32: in isReallyTriviallyReMaterializable()
[all …]
DWebAssemblyPeephole.cpp1 //===-- WebAssemblyPeephole.cpp - WebAssembly Peephole Optimiztions -------===//
10 /// Late peephole optimizations for WebAssembly.
15 #include "WebAssembly.h"
28 cl::desc("WebAssembly: Disable fallthrough-return optimizations."),
34 return "WebAssembly late peephole optimizer"; in getPassName()
53 "WebAssembly peephole optimizations", false, false)
86 assert(End->getOpcode() == WebAssembly::END_FUNCTION); in maybeRewriteToFallthrough()
99 case WebAssembly::I32RegClassID: in maybeRewriteToFallthrough()
100 CopyLocalOpc = WebAssembly::COPY_I32; in maybeRewriteToFallthrough()
102 case WebAssembly::I64RegClassID: in maybeRewriteToFallthrough()
[all …]
DWebAssemblyRegisterInfo.cpp1 //===-- WebAssemblyRegisterInfo.cpp - WebAssembly Register Information ----===//
10 /// This file contains the WebAssembly implementation of the
47 for (auto Reg : {WebAssembly::SP32, WebAssembly::SP64, WebAssembly::FP32, in getReservedRegs()
48 WebAssembly::FP64}) in getReservedRegs()
73 unsigned AddrOperandNum = WebAssembly::getNamedOperandIdx( in eliminateFrameIndex()
74 MI.getOpcode(), WebAssembly::OpName::addr); in eliminateFrameIndex()
76 unsigned OffsetOperandNum = WebAssembly::getNamedOperandIdx( in eliminateFrameIndex()
77 MI.getOpcode(), WebAssembly::OpName::off); in eliminateFrameIndex()
91 if (MI.getOpcode() == WebAssembly::ADD_I32) { in eliminateFrameIndex()
100 if (Def && Def->getOpcode() == WebAssembly::CONST_I32 && in eliminateFrameIndex()
[all …]
DWebAssemblyFrameLowering.cpp1 //===-- WebAssemblyFrameLowering.cpp - WebAssembly Frame Lowering ----------==//
10 /// This file contains the WebAssembly implementation of
13 /// On WebAssembly, there aren't a lot of things to do here. There are no
132 BuildMI(MBB, InsertStore, DL, TII->get(WebAssembly::GLOBAL_SET_I32)) in writeSPToGlobal()
147 writeSPToGlobal(WebAssembly::SP32, MF, MBB, I, DL); in eliminateCallFramePseudoInstr()
157 "WebAssembly should not have callee-saved registers"); in emitPrologue()
168 WebAssembly::isArgument(InsertPt->getOpcode())) in emitPrologue()
174 unsigned SPReg = WebAssembly::SP32; in emitPrologue()
180 BuildMI(MBB, InsertPt, DL, TII->get(WebAssembly::GLOBAL_GET_I32), SPReg) in emitPrologue()
188 BuildMI(MBB, InsertPt, DL, TII->get(WebAssembly::COPY), BasePtr) in emitPrologue()
[all …]
DWebAssemblyRegStackify.cpp22 #include "MCTargetDesc/WebAssemblyMCTargetDesc.h" // for WebAssembly::ARGUMENT_*
23 #include "WebAssembly.h"
46 return "WebAssembly Register Stackify"; in getPassName()
72 "Reorder instructions to use the WebAssembly value stack",
84 if (!MI->definesRegister(WebAssembly::VALUE_STACK)) in imposeStackOrdering()
85 MI->addOperand(MachineOperand::CreateReg(WebAssembly::VALUE_STACK, in imposeStackOrdering()
90 if (!MI->readsRegister(WebAssembly::VALUE_STACK)) in imposeStackOrdering()
91 MI->addOperand(MachineOperand::CreateReg(WebAssembly::VALUE_STACK, in imposeStackOrdering()
106 if (RegClass == &WebAssembly::I32RegClass) { in convertImplicitDefToConstZero()
107 MI->setDesc(TII->get(WebAssembly::CONST_I32)); in convertImplicitDefToConstZero()
[all …]
DWebAssemblyUtilities.cpp1 //===-- WebAssemblyUtilities.cpp - WebAssembly Utility Functions ----------===//
10 /// This file implements several utility functions for WebAssembly.
20 const char *const WebAssembly::ClangCallTerminateFn = "__clang_call_terminate";
21 const char *const WebAssembly::CxaBeginCatchFn = "__cxa_begin_catch";
22 const char *const WebAssembly::CxaRethrowFn = "__cxa_rethrow";
23 const char *const WebAssembly::StdTerminateFn = "_ZSt9terminatev";
24 const char *const WebAssembly::PersonalityWrapperFn =
28 bool WebAssembly::isChild(const MachineInstr &MI, in isChild()
39 bool WebAssembly::mayThrow(const MachineInstr &MI) { in mayThrow()
41 case WebAssembly::THROW: in mayThrow()
[all …]
DWebAssemblyCFGStackify.cpp13 /// since scope boundaries serve as the labels for WebAssembly's control
17 /// WebAssembly, provided that all loops are single-entry.
24 #include "WebAssembly.h"
42 StringRef getPassName() const override { return "WebAssembly CFG Stackify"; } in getPassName()
109 "Insert BLOCK/LOOP/TRY markers for WebAssembly scopes", false,
229 if (Pred->getFirstTerminator()->getOpcode() == WebAssembly::BR_ON_EXN) { in placeBlockMarker()
270 if (MI.getOpcode() == WebAssembly::LOOP) { in placeBlockMarker()
282 if (MI.getOpcode() == WebAssembly::BLOCK || in placeBlockMarker()
283 MI.getOpcode() == WebAssembly::TRY) in placeBlockMarker()
288 if (MI.getOpcode() == WebAssembly::END_BLOCK || in placeBlockMarker()
[all …]
DWebAssemblyLateEHPrepare.cpp1 //=== WebAssemblyLateEHPrepare.cpp - WebAssembly Exception Preparation -===//
15 #include "WebAssembly.h"
30 return "WebAssembly Late Prepare Exception"; in getPassName()
48 "WebAssembly Late Exception Preparation", false, false)
135 Register DstReg = MRI.createVirtualRegister(&WebAssembly::EXNREFRegClass); in addCatches()
137 TII.get(WebAssembly::CATCH), DstReg); in addCatches()
154 case WebAssembly::CATCHRET: { in replaceFuncletReturns()
158 BuildMI(MBB, TI, TI->getDebugLoc(), TII.get(WebAssembly::BR)) in replaceFuncletReturns()
164 case WebAssembly::CLEANUPRET: in replaceFuncletReturns()
165 case WebAssembly::RETHROW_IN_CATCH: { in replaceFuncletReturns()
[all …]
DWebAssemblyAsmPrinter.cpp1 //===-- WebAssemblyAsmPrinter.cpp - WebAssembly LLVM assembly writer ------===//
11 /// representation of machine-dependent LLVM code to the WebAssembly assembly
21 #include "WebAssembly.h"
282 "WebAssembly disables constant pools"); in EmitConstantPool()
322 case WebAssembly::ARGUMENT_i32: in EmitInstruction()
323 case WebAssembly::ARGUMENT_i32_S: in EmitInstruction()
324 case WebAssembly::ARGUMENT_i64: in EmitInstruction()
325 case WebAssembly::ARGUMENT_i64_S: in EmitInstruction()
326 case WebAssembly::ARGUMENT_f32: in EmitInstruction()
327 case WebAssembly::ARGUMENT_f32_S: in EmitInstruction()
[all …]
DWebAssemblyISelLowering.cpp1 //=- WebAssemblyISelLowering.cpp - WebAssembly DAG Lowering Implementation -==//
53 Subtarget->hasAddr64() ? WebAssembly::SP64 : WebAssembly::SP32); in WebAssemblyTargetLowering()
55 addRegisterClass(MVT::i32, &WebAssembly::I32RegClass); in WebAssemblyTargetLowering()
56 addRegisterClass(MVT::i64, &WebAssembly::I64RegClass); in WebAssemblyTargetLowering()
57 addRegisterClass(MVT::f32, &WebAssembly::F32RegClass); in WebAssemblyTargetLowering()
58 addRegisterClass(MVT::f64, &WebAssembly::F64RegClass); in WebAssemblyTargetLowering()
60 addRegisterClass(MVT::v16i8, &WebAssembly::V128RegClass); in WebAssemblyTargetLowering()
61 addRegisterClass(MVT::v8i16, &WebAssembly::V128RegClass); in WebAssemblyTargetLowering()
62 addRegisterClass(MVT::v4i32, &WebAssembly::V128RegClass); in WebAssemblyTargetLowering()
63 addRegisterClass(MVT::v4f32, &WebAssembly::V128RegClass); in WebAssemblyTargetLowering()
[all …]
DWebAssemblyISelDAGToDAG.cpp1 //- WebAssemblyISelDAGToDAG.cpp - A dag to dag inst selector for WebAssembly -//
10 /// This file defines an instruction selector for the WebAssembly target.
15 #include "WebAssembly.h"
30 /// WebAssembly-specific code to select WebAssembly machine instructions for
46 return "WebAssembly Instruction Selection"; in getPassName()
59 "64-bit WebAssembly (wasm64) is not currently supported"); in runOnMachineFunction()
101 Fence = CurDAG->getMachineNode(WebAssembly::COMPILER_FENCE, in Select()
111 WebAssembly::ATOMIC_FENCE, in Select()
155 MachineSDNode *TLSBase = CurDAG->getMachineNode(WebAssembly::GLOBAL_GET_I32, in Select()
158 WebAssembly::CONST_I32, DL, MVT::i32, TLSOffsetSym); in Select()
[all …]
DWebAssemblySetP2AlignOperands.cpp15 #include "WebAssembly.h"
34 return "WebAssembly Set p2align Operands"; in getPassName()
50 "Set the p2align operands for WebAssembly loads and stores",
63 (UINT64_C(1) << WebAssembly::GetDefaultP2Align(MI.getOpcode())) && in rewriteP2Align()
66 WebAssembly::OPERAND_P2ALIGN && in rewriteP2Align()
70 // WebAssembly does not currently support supernatural alignment. in rewriteP2Align()
72 uint64_t(WebAssembly::GetDefaultP2Align(MI.getOpcode()))); in rewriteP2Align()
87 int16_t P2AlignOpNum = WebAssembly::getNamedOperandIdx( in runOnMachineFunction()
88 MI.getOpcode(), WebAssembly::OpName::p2align); in runOnMachineFunction()
DREADME.txt1 //===-- README.txt - Notes for WebAssembly code gen -----------------------===//
3 This WebAssembly backend is presently under development.
12 libraries, tools, and packaging for producing WebAssembly applications that
16 * https://github.com/kripken/emscripten/wiki/New-WebAssembly-Backend
18 Rust provides WebAssembly support integrated into Cargo. There are two
30 design for how DWARF should be represented in WebAssembly. Sourcemap support
36 * https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md
40 * https://lld.llvm.org/WebAssembly.html
42 For more information on WebAssembly itself, see the home page:
43 * https://webassembly.github.io/
[all …]
DWebAssemblyMCInstLower.cpp1 // WebAssemblyMCInstLower.cpp - Convert WebAssembly MachineInstr to an MCInst //
10 /// This file contains code to lower WebAssembly MachineInstrs to their
32 // Defines llvm::WebAssembly::getStackOpcode to convert register instructions to
41 cl::desc("WebAssembly: output stack registers in"
181 // Return the WebAssembly type associated with the given register class.
183 if (RC == &WebAssembly::I32RegClass) in getType()
185 if (RC == &WebAssembly::I64RegClass) in getType()
187 if (RC == &WebAssembly::F32RegClass) in getType()
189 if (RC == &WebAssembly::F64RegClass) in getType()
191 if (RC == &WebAssembly::V128RegClass) in getType()
[all …]
DWebAssemblyReplacePhysRegs.cpp14 /// WebAssembly doesn't actually have such physical registers. This pass is run
22 #include "WebAssembly.h"
42 return "WebAssembly Replace Physical Registers"; in getPassName()
79 for (unsigned PReg = WebAssembly::NoRegister + 1; in runOnMachineFunction()
80 PReg < WebAssembly::NUM_TARGET_REGS; ++PReg) { in runOnMachineFunction()
82 if (PReg == WebAssembly::VALUE_STACK || PReg == WebAssembly::ARGUMENTS) in runOnMachineFunction()
87 unsigned VReg = WebAssembly::NoRegister; in runOnMachineFunction()
91 if (VReg == WebAssembly::NoRegister) in runOnMachineFunction()
DWebAssemblyTargetMachine.cpp1 //===- WebAssemblyTargetMachine.cpp - Define TargetMachine for WebAssembly -==//
10 /// This file defines the WebAssembly-specific subclass of TargetMachine.
17 #include "WebAssembly.h"
39 cl::desc("WebAssembly Emscripten-style exception handling"),
45 cl::desc("WebAssembly Emscripten-style setjmp/longjmp handling"),
83 // WebAssembly Lowering public interface.
105 /// Create an WebAssembly architecture model.
117 // WebAssembly type-checks instructions, but a noreturn function with a return in WebAssemblyTargetMachine()
119 // LLVM 'unreachable' to ISD::TRAP and then lower that to WebAssembly's in WebAssemblyTargetMachine()
123 // WebAssembly treats each function as an independent unit. Force in WebAssemblyTargetMachine()
[all …]
DWebAssemblyRegNumbering.cpp10 /// This file implements a pass which assigns WebAssembly register
16 #include "WebAssembly.h"
36 return "WebAssembly Register Numbering"; in getPassName()
54 "Assigns WebAssembly register numbers for virtual registers",
71 // WebAssembly argument registers are in the same index space as local in runOnMachineFunction()
75 if (!WebAssembly::isArgument(MI.getOpcode())) in runOnMachineFunction()
84 // Then assign regular WebAssembly registers for all remaining used in runOnMachineFunction()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/WebAssembly/Disassembler/
DWebAssemblyDisassembler.cpp1 //==- WebAssemblyDisassembler.cpp - Disassembler for WebAssembly -*- C++ -*-==//
10 /// This file is part of the WebAssembly Disassembler.
149 outs() << WebAssembly::anyTypeToString(Type); in onSymbolStart()
196 case WebAssembly::OPERAND_BASIC_BLOCK: in getInstruction()
197 case WebAssembly::OPERAND_LOCAL: in getInstruction()
198 case WebAssembly::OPERAND_GLOBAL: in getInstruction()
199 case WebAssembly::OPERAND_FUNCTION32: in getInstruction()
200 case WebAssembly::OPERAND_OFFSET32: in getInstruction()
201 case WebAssembly::OPERAND_P2ALIGN: in getInstruction()
202 case WebAssembly::OPERAND_TYPEINDEX: in getInstruction()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/WebAssembly/TargetInfo/
DWebAssemblyTargetInfo.cpp1 //===-- WebAssemblyTargetInfo.cpp - WebAssembly Target Implementation -----===//
10 /// This file registers the WebAssembly target.
31 "WebAssembly 32-bit", "WebAssembly"); in LLVMInitializeWebAssemblyTargetInfo()
33 "WebAssembly 64-bit", "WebAssembly"); in LLVMInitializeWebAssemblyTargetInfo()
/third_party/rust/rust/src/doc/rustc/src/platform-support/
Dwasm64-unknown-unknown.md5 WebAssembly target which uses 64-bit memories, relying on the [memory64]
6 WebAssembly proposal.
8 [memory64]: https://github.com/webassembly/memory64
33 This target is not a stable target. The [memory64] WebAssembly proposal is still
49 [Bulk memory]: https://github.com/WebAssembly/spec/blob/main/proposals/bulk-memory-operations/Overv…
50 [Sign-extending operations]: https://github.com/WebAssembly/spec/blob/main/proposals/sign-extension…
51 [Non-trapping fp-to-int operations]: https://github.com/WebAssembly/spec/blob/main/proposals/nontra…

1234567891011