Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Unified Diff: src/code-stubs.cc

Issue 1706053002: Add Simd128Value code stubs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs.h ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 709b0e58e55042a92f464547c973857f94a70bc9..423cafdf3abada412ce823a08363d3f1c919160b 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -489,6 +489,22 @@ void AllocateMutableHeapNumberStub::GenerateAssembly(
assembler->Return(result);
}
+#define SIMD128_GEN_ASM(TYPE, Type, type, lane_count, lane_type) \
+ void Allocate##Type##Stub::GenerateAssembly( \
+ compiler::CodeStubAssembler* assembler) const { \
+ compiler::Node* result = assembler->Allocate( \
+ Simd128Value::kSize, compiler::CodeStubAssembler::kNone); \
+ compiler::Node* map_offset = \
+ assembler->IntPtrConstant(HeapObject::kMapOffset - kHeapObjectTag); \
+ compiler::Node* map = assembler->IntPtrAdd(result, map_offset); \
+ assembler->StoreNoWriteBarrier( \
+ MachineRepresentation::kTagged, map, \
+ assembler->HeapConstant(isolate()->factory()->type##_map())); \
+ assembler->Return(result); \
+ }
+SIMD128_TYPES(SIMD128_GEN_ASM)
+#undef SIMD128_GEN_ASM
+
void StringLengthStub::GenerateAssembly(
compiler::CodeStubAssembler* assembler) const {
compiler::Node* value = assembler->Parameter(0);
@@ -2551,6 +2567,14 @@ void AllocateMutableHeapNumberStub::InitializeDescriptor(
descriptor->Initialize();
}
+#define SIMD128_INIT_DESC(TYPE, Type, type, lane_count, lane_type) \
+ void Allocate##Type##Stub::InitializeDescriptor( \
+ CodeStubDescriptor* descriptor) { \
+ descriptor->Initialize( \
+ Runtime::FunctionForId(Runtime::kCreate##Type)->entry); \
+ }
+SIMD128_TYPES(SIMD128_INIT_DESC)
+#undef SIMD128_INIT_DESC
void AllocateInNewSpaceStub::InitializeDescriptor(
CodeStubDescriptor* descriptor) {
« no previous file with comments | « src/code-stubs.h ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698