• Home
  • Raw
  • Download

Lines Matching full:webassembly

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()
409 TII.get(WebAssembly::AND_I32), Result) in zeroExtendToI32()
429 unsigned Imm = createResultReg(&WebAssembly::I32RegClass); in signExtendToI32()
431 TII.get(WebAssembly::CONST_I32), Imm) in signExtendToI32()
434 unsigned Left = createResultReg(&WebAssembly::I32RegClass); in signExtendToI32()
436 TII.get(WebAssembly::SHL_I32), Left) in signExtendToI32()
440 unsigned Right = createResultReg(&WebAssembly::I32RegClass); in signExtendToI32()
442 TII.get(WebAssembly::SHR_S_I32), Right) in signExtendToI32()
458 unsigned Result = createResultReg(&WebAssembly::I64RegClass); in zeroExtend()
460 TII.get(WebAssembly::I64_EXTEND_U_I32), Result) in zeroExtend()
477 unsigned Result = createResultReg(&WebAssembly::I64RegClass); in signExtend()
479 TII.get(WebAssembly::I64_EXTEND_S_I32), Result) in signExtend()
506 assert(MRI.getRegClass(Reg) == &WebAssembly::I32RegClass); in notValue()
508 unsigned NotReg = createResultReg(&WebAssembly::I32RegClass); in notValue()
510 TII.get(WebAssembly::EQZ_I32), NotReg) in notValue()
518 TII.get(WebAssembly::COPY), ResultReg) in copyValue()
529 &WebAssembly::I64RegClass : in fastMaterializeAlloca()
530 &WebAssembly::I32RegClass); in fastMaterializeAlloca()
532 WebAssembly::COPY_LOCAL_I64 : in fastMaterializeAlloca()
533 WebAssembly::COPY_LOCAL_I32; in fastMaterializeAlloca()
545 &WebAssembly::I64RegClass : in fastMaterializeConstant()
546 &WebAssembly::I32RegClass); in fastMaterializeConstant()
548 WebAssembly::CONST_I64 : in fastMaterializeConstant()
549 WebAssembly::CONST_I32; in fastMaterializeConstant()
588 Opc = WebAssembly::ARGUMENT_I32; in fastLowerArguments()
589 RC = &WebAssembly::I32RegClass; in fastLowerArguments()
592 Opc = WebAssembly::ARGUMENT_I64; in fastLowerArguments()
593 RC = &WebAssembly::I64RegClass; in fastLowerArguments()
596 Opc = WebAssembly::ARGUMENT_F32; in fastLowerArguments()
597 RC = &WebAssembly::F32RegClass; in fastLowerArguments()
600 Opc = WebAssembly::ARGUMENT_F64; in fastLowerArguments()
601 RC = &WebAssembly::F64RegClass; in fastLowerArguments()
614 MRI.addLiveIn(WebAssembly::ARGUMENTS); in fastLowerArguments()
640 Opc = IsDirect ? WebAssembly::CALL_VOID : WebAssembly::CALL_INDIRECT_VOID; in selectCall()
648 Opc = IsDirect ? WebAssembly::CALL_I32 : WebAssembly::CALL_INDIRECT_I32; in selectCall()
649 ResultReg = createResultReg(&WebAssembly::I32RegClass); in selectCall()
652 Opc = IsDirect ? WebAssembly::CALL_I64 : WebAssembly::CALL_INDIRECT_I64; in selectCall()
653 ResultReg = createResultReg(&WebAssembly::I64RegClass); in selectCall()
656 Opc = IsDirect ? WebAssembly::CALL_F32 : WebAssembly::CALL_INDIRECT_F32; in selectCall()
657 ResultReg = createResultReg(&WebAssembly::F32RegClass); in selectCall()
660 Opc = IsDirect ? WebAssembly::CALL_F64 : WebAssembly::CALL_INDIRECT_F64; in selectCall()
661 ResultReg = createResultReg(&WebAssembly::F64RegClass); in selectCall()
742 Opc = WebAssembly::SELECT_I32; in selectSelect()
743 RC = &WebAssembly::I32RegClass; in selectSelect()
746 Opc = WebAssembly::SELECT_I64; in selectSelect()
747 RC = &WebAssembly::I64RegClass; in selectSelect()
750 Opc = WebAssembly::SELECT_F32; in selectSelect()
751 RC = &WebAssembly::F32RegClass; in selectSelect()
754 Opc = WebAssembly::SELECT_F64; in selectSelect()
755 RC = &WebAssembly::F64RegClass; in selectSelect()
779 unsigned Result = createResultReg(&WebAssembly::I32RegClass); in selectTrunc()
781 TII.get(WebAssembly::I32_WRAP_I64), Result) in selectTrunc()
826 Opc = I32 ? WebAssembly::EQ_I32 : WebAssembly::EQ_I64; in selectICmp()
829 Opc = I32 ? WebAssembly::NE_I32 : WebAssembly::NE_I64; in selectICmp()
832 Opc = I32 ? WebAssembly::GT_U_I32 : WebAssembly::GT_U_I64; in selectICmp()
835 Opc = I32 ? WebAssembly::GE_U_I32 : WebAssembly::GE_U_I64; in selectICmp()
838 Opc = I32 ? WebAssembly::LT_U_I32 : WebAssembly::LT_U_I64; in selectICmp()
841 Opc = I32 ? WebAssembly::LE_U_I32 : WebAssembly::LE_U_I64; in selectICmp()
844 Opc = I32 ? WebAssembly::GT_S_I32 : WebAssembly::GT_S_I64; in selectICmp()
848 Opc = I32 ? WebAssembly::GE_S_I32 : WebAssembly::GE_S_I64; in selectICmp()
852 Opc = I32 ? WebAssembly::LT_S_I32 : WebAssembly::LT_S_I64; in selectICmp()
856 Opc = I32 ? WebAssembly::LE_S_I32 : WebAssembly::LE_S_I64; in selectICmp()
870 unsigned ResultReg = createResultReg(&WebAssembly::I32RegClass); in selectICmp()
894 Opc = F32 ? WebAssembly::EQ_F32 : WebAssembly::EQ_F64; in selectFCmp()
897 Opc = F32 ? WebAssembly::NE_F32 : WebAssembly::NE_F64; in selectFCmp()
900 Opc = F32 ? WebAssembly::GT_F32 : WebAssembly::GT_F64; in selectFCmp()
903 Opc = F32 ? WebAssembly::GE_F32 : WebAssembly::GE_F64; in selectFCmp()
906 Opc = F32 ? WebAssembly::LT_F32 : WebAssembly::LT_F64; in selectFCmp()
909 Opc = F32 ? WebAssembly::LE_F32 : WebAssembly::LE_F64; in selectFCmp()
912 Opc = F32 ? WebAssembly::LE_F32 : WebAssembly::LE_F64; in selectFCmp()
916 Opc = F32 ? WebAssembly::LT_F32 : WebAssembly::LT_F64; in selectFCmp()
920 Opc = F32 ? WebAssembly::GE_F32 : WebAssembly::GE_F64; in selectFCmp()
924 Opc = F32 ? WebAssembly::GT_F32 : WebAssembly::GT_F64; in selectFCmp()
931 unsigned ResultReg = createResultReg(&WebAssembly::I32RegClass); in selectFCmp()
987 Opc = WebAssembly::LOAD8_U_I32; in selectLoad()
988 RC = &WebAssembly::I32RegClass; in selectLoad()
991 Opc = WebAssembly::LOAD16_U_I32; in selectLoad()
992 RC = &WebAssembly::I32RegClass; in selectLoad()
995 Opc = WebAssembly::LOAD_I32; in selectLoad()
996 RC = &WebAssembly::I32RegClass; in selectLoad()
999 Opc = WebAssembly::LOAD_I64; in selectLoad()
1000 RC = &WebAssembly::I64RegClass; in selectLoad()
1003 Opc = WebAssembly::LOAD_F32; in selectLoad()
1004 RC = &WebAssembly::F32RegClass; in selectLoad()
1007 Opc = WebAssembly::LOAD_F64; in selectLoad()
1008 RC = &WebAssembly::F64RegClass; in selectLoad()
1042 Opc = WebAssembly::STORE8_I32; in selectStore()
1043 RC = &WebAssembly::I32RegClass; in selectStore()
1046 Opc = WebAssembly::STORE16_I32; in selectStore()
1047 RC = &WebAssembly::I32RegClass; in selectStore()
1050 Opc = WebAssembly::STORE_I32; in selectStore()
1051 RC = &WebAssembly::I32RegClass; in selectStore()
1054 Opc = WebAssembly::STORE_I64; in selectStore()
1055 RC = &WebAssembly::I64RegClass; in selectStore()
1058 Opc = WebAssembly::STORE_F32; in selectStore()
1059 RC = &WebAssembly::F32RegClass; in selectStore()
1062 Opc = WebAssembly::STORE_F64; in selectStore()
1063 RC = &WebAssembly::F64RegClass; in selectStore()
1098 unsigned Opc = WebAssembly::BR_IF; in selectBr()
1100 Opc = WebAssembly::BR_UNLESS; in selectBr()
1118 TII.get(WebAssembly::RETURN_VOID)); in selectRet()
1127 Opc = WebAssembly::RETURN_I32; in selectRet()
1130 Opc = WebAssembly::RETURN_I64; in selectRet()
1132 case MVT::f32: Opc = WebAssembly::RETURN_F32; break; in selectRet()
1133 case MVT::f64: Opc = WebAssembly::RETURN_F64; break; in selectRet()
1151 TII.get(WebAssembly::UNREACHABLE)); in selectUnreachable()
1180 FastISel *WebAssembly::createFastISel(FunctionLoweringInfo &FuncInfo, in createFastISel()