5 #if V8_TARGET_ARCH_S390 9 #include "src/codegen.h" 10 #include "src/macro-assembler.h" 11 #include "src/s390/simulator-s390.h" 18 UnaryMathFunction CreateSqrtFunction() {
19 #if defined(USE_SIMULATOR) 24 byte* buffer = AllocatePage(page_allocator,
26 if (buffer ==
nullptr)
return nullptr;
28 MacroAssembler masm(AssemblerOptions{}, buffer,
static_cast<int>(allocated));
30 __ MovFromFloatParameter(d0);
32 __ MovToFloatResult(d0);
36 masm.GetCode(
nullptr, &desc);
37 DCHECK(ABI_USES_FUNCTION_DESCRIPTORS ||
38 !RelocInfo::RequiresRelocationAfterCodegen(desc));
40 Assembler::FlushICache(buffer, allocated);
41 CHECK(SetPermissions(page_allocator, buffer, allocated,
42 PageAllocator::kReadExecute));
43 return FUNCTION_CAST<UnaryMathFunction>(buffer);
52 #endif // V8_TARGET_ARCH_S390
virtual void * GetRandomMmapAddr()=0