PPC: Add unoptimized/optimized variants of MathFloor TF code stub
authormbrandy <mbrandy@us.ibm.com>
Wed, 8 Jul 2015 19:11:29 +0000 (12:11 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 8 Jul 2015 19:11:40 +0000 (19:11 +0000)
Port 8f13b655b8a10dae2116dd18b32f09337bb2d410

Original commit message:
    - Add a TurboFanIC class, derived from TurboFanCodeStub, that
      automatically distinguishes between versions of the IC called from
      optimized and unoptimized code.
    - Add appropriate InterfaceDescriptors for both the versions of the
      stub called from unoptimized and optimized code
    - Change the MathFloor TF stub generator to output either the
      for-optimized or for-unoptimized version based on the minor_key
      parameter.

R=danno@chromium.org, dstence@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1207253003

Cr-Commit-Position: refs/heads/master@{#29542}

src/ppc/interface-descriptors-ppc.cc

index 2d0c55f..fc1567e 100644 (file)
@@ -329,11 +329,22 @@ void ApiAccessorDescriptor::InitializePlatformSpecific(
 }
 
 
-void MathRoundVariantDescriptor::InitializePlatformSpecific(
-    CallInterfaceDescriptorData* data) {
+void MathRoundVariantCallFromUnoptimizedCodeDescriptor::
+    InitializePlatformSpecific(CallInterfaceDescriptorData* data) {
+  Register registers[] = {
+      r4,  // math rounding function
+      r6,  // vector slot id
+  };
+  data->InitializePlatformSpecific(arraysize(registers), registers);
+}
+
+
+void MathRoundVariantCallFromOptimizedCodeDescriptor::
+    InitializePlatformSpecific(CallInterfaceDescriptorData* data) {
   Register registers[] = {
       r4,  // math rounding function
       r6,  // vector slot id
+      r7,  // type vector
   };
   data->InitializePlatformSpecific(arraysize(registers), registers);
 }