• Home
  • Raw
  • Download

Lines Matching full:webassembly

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()
470 TII.get(WebAssembly::AND_I32), Result) in zeroExtendToI32()
493 unsigned Imm = createResultReg(&WebAssembly::I32RegClass); in signExtendToI32()
495 TII.get(WebAssembly::CONST_I32), Imm) in signExtendToI32()
498 unsigned Left = createResultReg(&WebAssembly::I32RegClass); in signExtendToI32()
500 TII.get(WebAssembly::SHL_I32), Left) in signExtendToI32()
504 unsigned Right = createResultReg(&WebAssembly::I32RegClass); in signExtendToI32()
506 TII.get(WebAssembly::SHR_S_I32), Right) in signExtendToI32()
522 unsigned Result = createResultReg(&WebAssembly::I64RegClass); in zeroExtend()
524 TII.get(WebAssembly::I64_EXTEND_U_I32), Result) in zeroExtend()
544 unsigned Result = createResultReg(&WebAssembly::I64RegClass); in signExtend()
546 TII.get(WebAssembly::I64_EXTEND_S_I32), Result) in signExtend()
581 assert(MRI.getRegClass(Reg) == &WebAssembly::I32RegClass); in notValue()
583 unsigned NotReg = createResultReg(&WebAssembly::I32RegClass); in notValue()
585 TII.get(WebAssembly::EQZ_I32), NotReg) in notValue()
592 BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, TII.get(WebAssembly::COPY), in copyValue()
604 createResultReg(Subtarget->hasAddr64() ? &WebAssembly::I64RegClass in fastMaterializeAlloca()
605 : &WebAssembly::I32RegClass); in fastMaterializeAlloca()
607 Subtarget->hasAddr64() ? WebAssembly::COPY_I64 : WebAssembly::COPY_I32; in fastMaterializeAlloca()
623 createResultReg(Subtarget->hasAddr64() ? &WebAssembly::I64RegClass in fastMaterializeConstant()
624 : &WebAssembly::I32RegClass); in fastMaterializeConstant()
625 unsigned Opc = Subtarget->hasAddr64() ? WebAssembly::CONST_I64 in fastMaterializeConstant()
626 : WebAssembly::CONST_I32; in fastMaterializeConstant()
670 Opc = WebAssembly::ARGUMENT_i32; in fastLowerArguments()
671 RC = &WebAssembly::I32RegClass; in fastLowerArguments()
674 Opc = WebAssembly::ARGUMENT_i64; in fastLowerArguments()
675 RC = &WebAssembly::I64RegClass; in fastLowerArguments()
678 Opc = WebAssembly::ARGUMENT_f32; in fastLowerArguments()
679 RC = &WebAssembly::F32RegClass; in fastLowerArguments()
682 Opc = WebAssembly::ARGUMENT_f64; in fastLowerArguments()
683 RC = &WebAssembly::F64RegClass; in fastLowerArguments()
686 Opc = WebAssembly::ARGUMENT_v16i8; in fastLowerArguments()
687 RC = &WebAssembly::V128RegClass; in fastLowerArguments()
690 Opc = WebAssembly::ARGUMENT_v8i16; in fastLowerArguments()
691 RC = &WebAssembly::V128RegClass; in fastLowerArguments()
694 Opc = WebAssembly::ARGUMENT_v4i32; in fastLowerArguments()
695 RC = &WebAssembly::V128RegClass; in fastLowerArguments()
698 Opc = WebAssembly::ARGUMENT_v2i64; in fastLowerArguments()
699 RC = &WebAssembly::V128RegClass; in fastLowerArguments()
702 Opc = WebAssembly::ARGUMENT_v4f32; in fastLowerArguments()
703 RC = &WebAssembly::V128RegClass; in fastLowerArguments()
706 Opc = WebAssembly::ARGUMENT_v2f64; in fastLowerArguments()
707 RC = &WebAssembly::V128RegClass; in fastLowerArguments()
710 Opc = WebAssembly::ARGUMENT_funcref; in fastLowerArguments()
711 RC = &WebAssembly::FUNCREFRegClass; in fastLowerArguments()
714 Opc = WebAssembly::ARGUMENT_externref; in fastLowerArguments()
715 RC = &WebAssembly::EXTERNREFRegClass; in fastLowerArguments()
718 Opc = WebAssembly::ARGUMENT_exnref; in fastLowerArguments()
719 RC = &WebAssembly::EXNREFRegClass; in fastLowerArguments()
732 MRI.addLiveIn(WebAssembly::ARGUMENTS); in fastLowerArguments()
777 unsigned Opc = IsDirect ? WebAssembly::CALL : WebAssembly::CALL_INDIRECT; in selectCall()
790 ResultReg = createResultReg(&WebAssembly::I32RegClass); in selectCall()
793 ResultReg = createResultReg(&WebAssembly::I64RegClass); in selectCall()
796 ResultReg = createResultReg(&WebAssembly::F32RegClass); in selectCall()
799 ResultReg = createResultReg(&WebAssembly::F64RegClass); in selectCall()
802 ResultReg = createResultReg(&WebAssembly::V128RegClass); in selectCall()
805 ResultReg = createResultReg(&WebAssembly::V128RegClass); in selectCall()
808 ResultReg = createResultReg(&WebAssembly::V128RegClass); in selectCall()
811 ResultReg = createResultReg(&WebAssembly::V128RegClass); in selectCall()
814 ResultReg = createResultReg(&WebAssembly::V128RegClass); in selectCall()
817 ResultReg = createResultReg(&WebAssembly::V128RegClass); in selectCall()
820 ResultReg = createResultReg(&WebAssembly::EXNREFRegClass); in selectCall()
823 ResultReg = createResultReg(&WebAssembly::FUNCREFRegClass); in selectCall()
826 ResultReg = createResultReg(&WebAssembly::EXTERNREFRegClass); in selectCall()
920 Opc = WebAssembly::SELECT_I32; in selectSelect()
921 RC = &WebAssembly::I32RegClass; in selectSelect()
924 Opc = WebAssembly::SELECT_I64; in selectSelect()
925 RC = &WebAssembly::I64RegClass; in selectSelect()
928 Opc = WebAssembly::SELECT_F32; in selectSelect()
929 RC = &WebAssembly::F32RegClass; in selectSelect()
932 Opc = WebAssembly::SELECT_F64; in selectSelect()
933 RC = &WebAssembly::F64RegClass; in selectSelect()
936 Opc = WebAssembly::SELECT_EXNREF; in selectSelect()
937 RC = &WebAssembly::EXNREFRegClass; in selectSelect()
940 Opc = WebAssembly::SELECT_FUNCREF; in selectSelect()
941 RC = &WebAssembly::FUNCREFRegClass; in selectSelect()
944 Opc = WebAssembly::SELECT_EXTERNREF; in selectSelect()
945 RC = &WebAssembly::EXTERNREFRegClass; in selectSelect()
969 unsigned Result = createResultReg(&WebAssembly::I32RegClass); in selectTrunc()
971 TII.get(WebAssembly::I32_WRAP_I64), Result) in selectTrunc()
1022 Opc = I32 ? WebAssembly::EQ_I32 : WebAssembly::EQ_I64; in selectICmp()
1025 Opc = I32 ? WebAssembly::NE_I32 : WebAssembly::NE_I64; in selectICmp()
1028 Opc = I32 ? WebAssembly::GT_U_I32 : WebAssembly::GT_U_I64; in selectICmp()
1031 Opc = I32 ? WebAssembly::GE_U_I32 : WebAssembly::GE_U_I64; in selectICmp()
1034 Opc = I32 ? WebAssembly::LT_U_I32 : WebAssembly::LT_U_I64; in selectICmp()
1037 Opc = I32 ? WebAssembly::LE_U_I32 : WebAssembly::LE_U_I64; in selectICmp()
1040 Opc = I32 ? WebAssembly::GT_S_I32 : WebAssembly::GT_S_I64; in selectICmp()
1044 Opc = I32 ? WebAssembly::GE_S_I32 : WebAssembly::GE_S_I64; in selectICmp()
1048 Opc = I32 ? WebAssembly::LT_S_I32 : WebAssembly::LT_S_I64; in selectICmp()
1052 Opc = I32 ? WebAssembly::LE_S_I32 : WebAssembly::LE_S_I64; in selectICmp()
1067 unsigned ResultReg = createResultReg(&WebAssembly::I32RegClass); in selectICmp()
1091 Opc = F32 ? WebAssembly::EQ_F32 : WebAssembly::EQ_F64; in selectFCmp()
1094 Opc = F32 ? WebAssembly::NE_F32 : WebAssembly::NE_F64; in selectFCmp()
1097 Opc = F32 ? WebAssembly::GT_F32 : WebAssembly::GT_F64; in selectFCmp()
1100 Opc = F32 ? WebAssembly::GE_F32 : WebAssembly::GE_F64; in selectFCmp()
1103 Opc = F32 ? WebAssembly::LT_F32 : WebAssembly::LT_F64; in selectFCmp()
1106 Opc = F32 ? WebAssembly::LE_F32 : WebAssembly::LE_F64; in selectFCmp()
1109 Opc = F32 ? WebAssembly::LE_F32 : WebAssembly::LE_F64; in selectFCmp()
1113 Opc = F32 ? WebAssembly::LT_F32 : WebAssembly::LT_F64; in selectFCmp()
1117 Opc = F32 ? WebAssembly::GE_F32 : WebAssembly::GE_F64; in selectFCmp()
1121 Opc = F32 ? WebAssembly::GT_F32 : WebAssembly::GT_F64; in selectFCmp()
1128 unsigned ResultReg = createResultReg(&WebAssembly::I32RegClass); in selectFCmp()
1190 Opc = A64 ? WebAssembly::LOAD8_U_I32_A64 : WebAssembly::LOAD8_U_I32_A32; in selectLoad()
1191 RC = &WebAssembly::I32RegClass; in selectLoad()
1194 Opc = A64 ? WebAssembly::LOAD16_U_I32_A64 : WebAssembly::LOAD16_U_I32_A32; in selectLoad()
1195 RC = &WebAssembly::I32RegClass; in selectLoad()
1198 Opc = A64 ? WebAssembly::LOAD_I32_A64 : WebAssembly::LOAD_I32_A32; in selectLoad()
1199 RC = &WebAssembly::I32RegClass; in selectLoad()
1202 Opc = A64 ? WebAssembly::LOAD_I64_A64 : WebAssembly::LOAD_I64_A32; in selectLoad()
1203 RC = &WebAssembly::I64RegClass; in selectLoad()
1206 Opc = A64 ? WebAssembly::LOAD_F32_A64 : WebAssembly::LOAD_F32_A32; in selectLoad()
1207 RC = &WebAssembly::F32RegClass; in selectLoad()
1210 Opc = A64 ? WebAssembly::LOAD_F64_A64 : WebAssembly::LOAD_F64_A32; in selectLoad()
1211 RC = &WebAssembly::F64RegClass; in selectLoad()
1249 Opc = A64 ? WebAssembly::STORE8_I32_A64 : WebAssembly::STORE8_I32_A32; in selectStore()
1252 Opc = A64 ? WebAssembly::STORE16_I32_A64 : WebAssembly::STORE16_I32_A32; in selectStore()
1255 Opc = A64 ? WebAssembly::STORE_I32_A64 : WebAssembly::STORE_I32_A32; in selectStore()
1258 Opc = A64 ? WebAssembly::STORE_I64_A64 : WebAssembly::STORE_I64_A32; in selectStore()
1261 Opc = A64 ? WebAssembly::STORE_F32_A64 : WebAssembly::STORE_F32_A32; in selectStore()
1264 Opc = A64 ? WebAssembly::STORE_F64_A64 : WebAssembly::STORE_F64_A32; in selectStore()
1302 unsigned Opc = WebAssembly::BR_IF; in selectBr()
1304 Opc = WebAssembly::BR_UNLESS; in selectBr()
1322 TII.get(WebAssembly::RETURN)); in selectRet()
1368 TII.get(WebAssembly::RETURN)) in selectRet()
1375 TII.get(WebAssembly::UNREACHABLE)); in selectUnreachable()
1417 FastISel *WebAssembly::createFastISel(FunctionLoweringInfo &FuncInfo, in createFastISel()