diff src/gpu/hsail/vm/gpu_hsail.hpp @ 15545:9d456ffc6120

HSAIL: fixed Windows build
author Doug Simon <doug.simon@oracle.com>
date Wed, 07 May 2014 11:51:52 +0200
parents a250a512434d
children 66d31e70bd79
line wrap: on
line diff
--- a/src/gpu/hsail/vm/gpu_hsail.hpp	Wed May 07 11:44:00 2014 +0200
+++ b/src/gpu/hsail/vm/gpu_hsail.hpp	Wed May 07 11:51:52 2014 +0200
@@ -32,7 +32,7 @@
 class Hsail : public Gpu {
 
   public:
-  class HSAILKernelDeoptimization {
+  class HSAILKernelDeoptimization VALUE_OBJ_CLASS_SPEC {
     friend class VMStructs;
    private:
     // TODO: separate workitemid and actionAndReason out
@@ -40,14 +40,16 @@
     // for now, though we only ever have one hsail fram
     jint  _workitemid;
     jint  _actionAndReason;
-    // the first (innermost) "hsail frame" starts here
-    HSAILFrame _first_frame;
+    // the first (innermost) "hsail frame" starts after the above fields
 
    public:
     inline jint workitem() { return _workitemid; }
     inline jint reason() { return _actionAndReason; }
-    inline jint pc_offset() { return _first_frame.pc_offset(); }
-    inline HSAILFrame *first_frame() { return &_first_frame; }
+    inline jint pc_offset() { return first_frame()->pc_offset(); }
+    inline HSAILFrame *first_frame() {
+      // starts after the "header" fields
+      return (HSAILFrame *) (((jbyte *) this) + sizeof(*this));
+    }
   };
 
 // 8 compute units * 40 waves per cu * wavesize 64
@@ -75,7 +77,7 @@
       _deopt_next_index = 0;
       _num_slots = numSlots;
       _bytesPerSaveArea = bytesPerSaveArea;
-      _deopt_span = sizeof(HSAILKernelDeoptimization) + bytesPerSaveArea;
+      _deopt_span = sizeof(HSAILKernelDeoptimization) + sizeof(HSAILFrame) + bytesPerSaveArea;
       if (TraceGPUInteraction) {
         tty->print_cr("HSAILDeoptimizationInfo allocated, %d slots of size %d, total size = 0x%lx bytes", _num_slots, _deopt_span, (_num_slots * _deopt_span + sizeof(HSAILDeoptimizationInfo)));
       }