Mercurial > hg > graal-jvmci-8
diff src/gpu/hsail/vm/gpu_hsail_Frame.hpp @ 16076:06eedda53e14
HSAIL: add support to allocate new TLAB from GPU
Contributed-by: Tom Deneau <tom.deneau@amd.com>
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 10 Jun 2014 22:36:26 +0200 |
parents | 9d456ffc6120 |
children | e9998e2be7f5 |
line wrap: on
line diff
--- a/src/gpu/hsail/vm/gpu_hsail_Frame.hpp Tue Jun 10 19:08:33 2014 +0200 +++ b/src/gpu/hsail/vm/gpu_hsail_Frame.hpp Tue Jun 10 22:36:26 2014 +0200 @@ -22,8 +22,8 @@ * */ -#ifndef GPU_HSAIL_FRAME_HPP -#define GPU_HSAIL_FRAME_HPP +#ifndef GPU_HSAIL_VM_GPU_HSAIL_FRAME_HPP +#define GPU_HSAIL_VM_GPU_HSAIL_FRAME_HPP #include "graal/graalEnv.hpp" #include "code/debugInfo.hpp" @@ -43,31 +43,31 @@ jint num_s_regs() {return _num_s_regs; } jint num_d_regs() {return _num_d_regs; } jint num_stack_slots() {return _num_stack_slots; } - jbyte * data_start() {return (jbyte *) this + sizeof(*this); } + jbyte* data_start() {return (jbyte*) this + sizeof(*this); } jlong get_d_reg(int idx) { int ofst = num_s_regs() * 4 + idx * 8; - return(*(jlong *) (data_start() + ofst)); + return(*(jlong*) (data_start() + ofst)); } jint get_s_reg(int idx) { int ofst = idx * 4; - return(*(jint *) (data_start() + ofst)); + return(*(jint*) (data_start() + ofst)); } void put_d_reg(int idx, jlong val) { int ofst = num_s_regs() * 4 + idx * 8; - (*(jlong *) (data_start() + ofst)) = val; + (*(jlong*) (data_start() + ofst)) = val; } jint get_stackslot32(int stackOffset) { int ofst = num_s_regs() * 4 + num_d_regs() * 8 + stackOffset; - return(*(jint *) (data_start() + ofst)); + return(*(jint*) (data_start() + ofst)); } jlong get_stackslot64(int stackOffset) { int ofst = num_s_regs() * 4 + num_d_regs() * 8 + stackOffset; - return(*(jlong *) (data_start() + ofst)); + return(*(jlong*) (data_start() + ofst)); } void put_stackslot64(int stackOffset, jlong val) { int ofst = num_s_regs() * 4 + num_d_regs() * 8 + stackOffset; - (*(jlong *) (data_start() + ofst)) = val; + (*(jlong*) (data_start() + ofst)) = val; } }; -#endif // GPU_HSAIL_FRAME_HPP +#endif // GPU_HSAIL_VM_GPU_HSAIL_FRAME_HPP