| 4704 | Context.Int64x2Ty); |
| 4705 | } |
| 4706 | void compileStoreOp(uint32_t MemoryIndex, uint64_t Offset, uint32_t Alignment, |
| 4707 | LLVM::Type LoadTy, bool Trunc = false, |
| 4708 | bool BitCast = false) noexcept { |
| 4709 | if constexpr (kForceUnalignment) { |
| 4710 | Alignment = 0; |
| 4711 | } |
| 4712 | auto V = stackPop(); |
| 4713 | auto Off = Builder.createZExt(stackPop(), Context.Int64Ty); |
| 4714 | if (Offset != 0) { |
| 4715 | Off = Builder.createAdd(Off, LLContext.getInt64(Offset)); |
| 4716 | } |
| 4717 | |
| 4718 | if (Trunc) { |
| 4719 | V = Builder.createTrunc(V, LoadTy); |
| 4720 | } |
| 4721 | if (BitCast) { |
| 4722 | V = Builder.createBitCast(V, LoadTy); |
| 4723 | } |
| 4724 | V = switchEndian(V); |
| 4725 | auto VPtr = Builder.createInBoundsGEP1( |
| 4726 | Context.Int8Ty, Context.getMemory(Builder, ExecCtx, MemoryIndex), Off); |
| 4727 | auto Ptr = Builder.createBitCast(VPtr, LoadTy.getPointerTo()); |
| 4728 | auto StoreInst = Builder.createStore(V, Ptr, true); |
| 4729 | StoreInst.setAlignment(1 << Alignment); |
| 4730 | } |
| 4731 | void compileStoreLaneOp(uint32_t MemoryIndex, uint64_t Offset, |
| 4732 | uint32_t Alignment, uint8_t Index, LLVM::Type LoadTy, |
| 4733 | LLVM::Type VectorTy) noexcept { |
nothing calls this directly
no test coverage detected