/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/WebAssembly/MCTargetDesc/ |
D | WebAssemblyMCTargetDesc.h | 1 //==- 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 …]
|
D | WebAssemblyMCCodeEmitter.cpp | 1 //=- 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 …]
|
D | WebAssemblyInstPrinter.cpp | 1 //=- 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 …]
|
/external/llvm-project/clang/test/CodeGen/ |
D | builtins-wasm.c | 1 …or-conversions=none -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes WEBASSEMBLY,WEBASSEMBLY32 2 …or-conversions=none -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes WEBASSEMBLY,WEBASSEMBLY64 43 // WEBASSEMBLY: call i8* @llvm.wasm.tls.base() in tls_base() 78 // WEBASSEMBLY: call i32 @llvm.wasm.trunc.signed.i32.f32(float %f) in trunc_s_i32_f32() 79 // WEBASSEMBLY-NEXT: ret in trunc_s_i32_f32() 84 // WEBASSEMBLY: call i32 @llvm.wasm.trunc.unsigned.i32.f32(float %f) in trunc_u_i32_f32() 85 // WEBASSEMBLY-NEXT: ret in trunc_u_i32_f32() 90 // WEBASSEMBLY: call i32 @llvm.wasm.trunc.signed.i32.f64(double %f) in trunc_s_i32_f64() 91 // WEBASSEMBLY-NEXT: ret in trunc_s_i32_f64() 96 // WEBASSEMBLY: call i32 @llvm.wasm.trunc.unsigned.i32.f64(double %f) in trunc_u_i32_f64() [all …]
|
/external/llvm-project/llvm/lib/Target/WebAssembly/MCTargetDesc/ |
D | WebAssemblyMCTargetDesc.h | 1 //==- WebAssemblyMCTargetDesc.h - WebAssembly Target Descriptions -*- C++ -*-=// 10 /// This file provides WebAssembly-specific target descriptions. 39 namespace WebAssembly { 84 } // end namespace WebAssembly 118 // Defines symbolic names for WebAssembly registers. This defines a mapping from 124 // Defines symbolic names for the WebAssembly instructions. 130 namespace WebAssembly { 169 case WebAssembly::NAME##_A32: \ in GetDefaultP2AlignAny() 170 case WebAssembly::NAME##_A64: \ in GetDefaultP2AlignAny() 171 case WebAssembly::NAME##_A32_S: \ in GetDefaultP2AlignAny() [all …]
|
D | WebAssemblyMCCodeEmitter.cpp | 1 //=- WebAssemblyMCCodeEmitter.cpp - Convert WebAssembly code to machine code -// 80 if (MI.getOpcode() == WebAssembly::BR_TABLE_I32_S || in encodeInstruction() 81 MI.getOpcode() == WebAssembly::BR_TABLE_I64_S) in encodeInstruction() 83 if (MI.getOpcode() == WebAssembly::BR_TABLE_I32 || in encodeInstruction() 84 MI.getOpcode() == WebAssembly::BR_TABLE_I64) in encodeInstruction() 99 case WebAssembly::OPERAND_I32IMM: in encodeInstruction() 102 case WebAssembly::OPERAND_OFFSET32: in encodeInstruction() 105 case WebAssembly::OPERAND_I64IMM: in encodeInstruction() 108 case WebAssembly::OPERAND_SIGNATURE: in encodeInstruction() 109 case WebAssembly::OPERAND_HEAPTYPE: in encodeInstruction() [all …]
|
/external/llvm-project/llvm/lib/Target/WebAssembly/ |
D | WebAssemblyExplicitLocals.cpp | 10 /// This file converts any remaining registers into WebAssembly locals. 19 #include "WebAssembly.h" 37 return "WebAssembly Explicit Locals"; in getPassName() 56 "Convert registers to WebAssembly locals", false, false) 89 if (RC == &WebAssembly::I32RegClass) in getDropOpcode() 90 return WebAssembly::DROP_I32; in getDropOpcode() 91 if (RC == &WebAssembly::I64RegClass) in getDropOpcode() 92 return WebAssembly::DROP_I64; in getDropOpcode() 93 if (RC == &WebAssembly::F32RegClass) in getDropOpcode() 94 return WebAssembly::DROP_F32; in getDropOpcode() [all …]
|
D | WebAssemblyFastISel.cpp | 1 //===-- WebAssemblyFastISel.cpp - WebAssembly FastISel implementation -----===// 10 /// This file defines the WebAssembly-specific support for the FastISel 19 #include "WebAssembly.h" 385 Reg = createResultReg(Subtarget->hasAddr64() ? &WebAssembly::I64RegClass in materializeLoadStoreOperands() 386 : &WebAssembly::I32RegClass); in materializeLoadStoreOperands() 387 unsigned Opc = Subtarget->hasAddr64() ? WebAssembly::CONST_I64 in materializeLoadStoreOperands() 388 : WebAssembly::CONST_I32; in materializeLoadStoreOperands() 463 unsigned Imm = createResultReg(&WebAssembly::I32RegClass); in zeroExtendToI32() 465 TII.get(WebAssembly::CONST_I32), Imm) in zeroExtendToI32() 468 unsigned Result = createResultReg(&WebAssembly::I32RegClass); in zeroExtendToI32() [all …]
|
D | WebAssemblyInstrInfo.cpp | 1 //===-- 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 …]
|
D | WebAssemblyUtilities.cpp | 1 //===-- 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 …]
|
D | WebAssemblyPeephole.cpp | 1 //===-- 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 …]
|
/external/llvm/lib/Target/WebAssembly/MCTargetDesc/ |
D | WebAssemblyMCTargetDesc.h | 1 //==- WebAssemblyMCTargetDesc.h - WebAssembly Target Descriptions -*- C++ -*-=// 11 /// \brief This file provides WebAssembly-specific target descriptions. 43 namespace WebAssembly { 55 /// WebAssembly-specific directive identifiers. 64 } // end namespace WebAssembly 79 // Defines symbolic names for WebAssembly registers. This defines a mapping from 85 // Defines symbolic names for the WebAssembly instructions. 94 namespace WebAssembly { 99 case WebAssembly::LOAD8_S_I32: in GetDefaultP2Align() 100 case WebAssembly::LOAD8_U_I32: in GetDefaultP2Align() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/WebAssembly/ |
D | WebAssemblyFastISel.cpp | 1 //===-- 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 …]
|
D | WebAssemblyExplicitLocals.cpp | 10 /// 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 …]
|
D | WebAssemblyInstrInfo.cpp | 1 //===-- 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 …]
|
D | WebAssemblyPeephole.cpp | 1 //===-- 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 …]
|
D | WebAssemblyRegisterInfo.cpp | 1 //===-- 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 …]
|
D | WebAssemblyRegStackify.cpp | 22 #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 …]
|
/external/llvm/lib/Target/WebAssembly/ |
D | WebAssemblyFastISel.cpp | 1 //===-- WebAssemblyFastISel.cpp - WebAssembly FastISel implementation -----===// 11 /// \brief This file defines the WebAssembly-specific support for the FastISel 19 #include "WebAssembly.h" 329 &WebAssembly::I64RegClass : in materializeLoadStoreOperands() 330 &WebAssembly::I32RegClass); in materializeLoadStoreOperands() 332 WebAssembly::CONST_I64 : in materializeLoadStoreOperands() 333 WebAssembly::CONST_I32; in materializeLoadStoreOperands() 402 unsigned Imm = createResultReg(&WebAssembly::I32RegClass); in zeroExtendToI32() 404 TII.get(WebAssembly::CONST_I32), Imm) in zeroExtendToI32() 407 unsigned Result = createResultReg(&WebAssembly::I32RegClass); in zeroExtendToI32() [all …]
|
D | WebAssemblySetP2AlignOperands.cpp | 15 #include "WebAssembly.h" 34 return "WebAssembly Set p2align Operands"; in getPassName() 64 case WebAssembly::LOAD_I32: in runOnMachineFunction() 65 case WebAssembly::LOAD_I64: in runOnMachineFunction() 66 case WebAssembly::LOAD_F32: in runOnMachineFunction() 67 case WebAssembly::LOAD_F64: in runOnMachineFunction() 68 case WebAssembly::LOAD8_S_I32: in runOnMachineFunction() 69 case WebAssembly::LOAD8_U_I32: in runOnMachineFunction() 70 case WebAssembly::LOAD16_S_I32: in runOnMachineFunction() 71 case WebAssembly::LOAD16_U_I32: in runOnMachineFunction() [all …]
|
D | WebAssemblyPeephole.cpp | 1 //===-- WebAssemblyPeephole.cpp - WebAssembly Peephole Optimiztions -------===// 11 /// \brief Late peephole optimizations for WebAssembly. 16 #include "WebAssembly.h" 29 cl::desc("WebAssembly: Disable fallthrough-return optimizations."), 35 return "WebAssembly late peephole optimizer"; in getPassName() 122 case WebAssembly::STORE8_I32: in runOnMachineFunction() 123 case WebAssembly::STORE16_I32: in runOnMachineFunction() 124 case WebAssembly::STORE8_I64: in runOnMachineFunction() 125 case WebAssembly::STORE16_I64: in runOnMachineFunction() 126 case WebAssembly::STORE32_I64: in runOnMachineFunction() [all …]
|
D | WebAssemblyRegisterInfo.cpp | 1 //===-- WebAssemblyRegisterInfo.cpp - WebAssembly Register Information ----===// 11 /// \brief This file contains the WebAssembly implementation of the 48 for (auto Reg : {WebAssembly::SP32, WebAssembly::SP64, WebAssembly::FP32, in getReservedRegs() 49 WebAssembly::FP64}) in getReservedRegs() 69 if (MI.mayLoadOrStore() && FIOperandNum == WebAssembly::MemOpAddressOperandNo) { in eliminateFrameIndex() 76 .ChangeToRegister(WebAssembly::SP32, /*IsDef=*/false); in eliminateFrameIndex() 83 if (MI.getOpcode() == WebAssembly::ADD_I32) { in eliminateFrameIndex() 92 if (Def && Def->getOpcode() == WebAssembly::CONST_I32 && in eliminateFrameIndex() 97 .ChangeToRegister(WebAssembly::SP32, /*IsDef=*/false); in eliminateFrameIndex() 107 unsigned FIRegOperand = WebAssembly::SP32; in eliminateFrameIndex() [all …]
|
D | WebAssemblyInstrInfo.cpp | 1 //===-- WebAssemblyInstrInfo.cpp - WebAssembly Instruction Information ----===// 11 /// \brief This file contains the WebAssembly implementation of the 32 : WebAssemblyGenInstrInfo(WebAssembly::ADJCALLSTACKDOWN, in WebAssemblyInstrInfo() 33 WebAssembly::ADJCALLSTACKUP), in WebAssemblyInstrInfo() 39 case WebAssembly::CONST_I32: in isReallyTriviallyReMaterializable() 40 case WebAssembly::CONST_I64: in isReallyTriviallyReMaterializable() 41 case WebAssembly::CONST_F32: in isReallyTriviallyReMaterializable() 42 case WebAssembly::CONST_F64: in isReallyTriviallyReMaterializable() 64 if (RC == &WebAssembly::I32RegClass) in copyPhysReg() 65 CopyLocalOpcode = WebAssembly::COPY_LOCAL_I32; in copyPhysReg() [all …]
|
D | WebAssemblyRegStackify.cpp | 23 #include "WebAssembly.h" 24 #include "MCTargetDesc/WebAssemblyMCTargetDesc.h" // for WebAssembly::ARGUMENT_* 43 return "WebAssembly Register Stackify"; in getPassName() 77 if (!MI->definesRegister(WebAssembly::EXPR_STACK)) in ImposeStackOrdering() 78 MI->addOperand(MachineOperand::CreateReg(WebAssembly::EXPR_STACK, in ImposeStackOrdering() 83 if (!MI->readsRegister(WebAssembly::EXPR_STACK)) in ImposeStackOrdering() 84 MI->addOperand(MachineOperand::CreateReg(WebAssembly::EXPR_STACK, in ImposeStackOrdering() 153 case WebAssembly::DIV_S_I32: case WebAssembly::DIV_S_I64: in Query() 154 case WebAssembly::REM_S_I32: case WebAssembly::REM_S_I64: in Query() 155 case WebAssembly::DIV_U_I32: case WebAssembly::DIV_U_I64: in Query() [all …]
|
/external/llvm-project/clang/test/Preprocessor/ |
D | init.c | 1472 // RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY32 %s 1475 // RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY64 %s 1478 // RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY32,WEBASSEMBLY-WASI … 1481 // RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY64,WEBASSEMBLY-WASI … 1487 // WEBASSEMBLY-NEXT:#define __ATOMIC_ACQUIRE 2 1488 // WEBASSEMBLY-NEXT:#define __ATOMIC_ACQ_REL 4 1489 // WEBASSEMBLY-NEXT:#define __ATOMIC_CONSUME 1 1490 // WEBASSEMBLY-NEXT:#define __ATOMIC_RELAXED 0 1491 // WEBASSEMBLY-NEXT:#define __ATOMIC_RELEASE 3 1492 // WEBASSEMBLY-NEXT:#define __ATOMIC_SEQ_CST 5 [all …]
|