Mercurial > hg > truffle
annotate src/gpu/hsail/vm/gpu_hsail_Frame.hpp @ 15532:fd47de8808fc
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 06 May 2014 11:34:23 +0200 |
parents | a250a512434d |
children | 217c721b1ee1 |
rev | line source |
---|---|
14768
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
1 #ifndef GPU_HSAIL_FRAME_HPP |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
2 #define GPU_HSAIL_FRAME_HPP |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
3 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
4 #include "graal/graalEnv.hpp" |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
5 #include "code/debugInfo.hpp" |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
6 #include "code/location.hpp" |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
7 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
8 class HSAILFrame { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
9 friend class VMStructs; |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
10 private: |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
11 jint _pc_offset; // The HSAIL "pc_offset" where the exception happens |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
12 jbyte _num_s_regs; |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
13 jbyte _num_d_regs; |
15482
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
14 jshort _num_stack_slots; |
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
15 jbyte _save_area[0]; // save area size can vary per kernel compilation |
14768
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
16 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
17 public: |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
18 // Accessors |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
19 jint pc_offset() { return _pc_offset; } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
20 jint num_s_regs() {return _num_s_regs; } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
21 jint num_d_regs() {return _num_d_regs; } |
15482
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
22 jint num_stack_slots() {return _num_stack_slots; } |
14768
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
23 jlong get_d_reg(int idx) { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
24 int ofst = num_s_regs() * 4 + idx * 8; |
15482
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
25 return(*(jlong *) (_save_area + ofst)); |
14768
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
26 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
27 jint get_s_reg(int idx) { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
28 int ofst = idx * 4; |
15482
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
29 return(*(jint *) (_save_area + ofst)); |
14768
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
30 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
31 void put_d_reg(int idx, jlong val) { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
32 int ofst = num_s_regs() * 4 + idx * 8; |
15482
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
33 (*(jlong *) (_save_area + ofst)) = val; |
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
34 } |
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
35 jint get_stackslot32(int stackOffset) { |
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
36 int ofst = num_s_regs() * 4 + num_d_regs() * 8 + stackOffset; |
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
37 return(*(jint *) (_save_area + ofst)); |
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
38 } |
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
39 jlong get_stackslot64(int stackOffset) { |
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
40 int ofst = num_s_regs() * 4 + num_d_regs() * 8 + stackOffset; |
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
41 return(*(jlong *) (_save_area + ofst)); |
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
42 } |
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
43 void put_stackslot64(int stackOffset, jlong val) { |
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
44 int ofst = num_s_regs() * 4 + num_d_regs() * 8 + stackOffset; |
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
45 (*(jlong *) (_save_area + ofst)) = val; |
14768
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
46 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
47 }; |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
48 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
49 #endif // GPU_HSAIL_FRAME_HPP |