Mercurial > hg > graal-compiler
view src/gpu/hsail/vm/gpu_hsail_Frame.hpp @ 15334:abebb5c2dc09
Use NodeLIRBuilderTool in LIRGenLowerable.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Wed, 23 Apr 2014 11:49:12 +0200 |
parents | 3e9a960f0da1 |
children | a250a512434d |
line wrap: on
line source
#ifndef GPU_HSAIL_FRAME_HPP #define GPU_HSAIL_FRAME_HPP #include "graal/graalEnv.hpp" #include "code/debugInfo.hpp" #include "code/location.hpp" // maximum registers that could be saved for now #define MAX_SREGS 32 #define MAX_DREGS 16 class HSAILFrame { friend class VMStructs; private: jint _pc_offset; // The HSAIL "pc_offset" where the exception happens jbyte _num_s_regs; jbyte _num_d_regs; jshort _dreg_oops_map; // bits = 1 if that dreg is an oop jlong _save_area[MAX_SREGS/2 + MAX_DREGS]; public: // Accessors jint pc_offset() { return _pc_offset; } jint num_s_regs() {return _num_s_regs; } jint num_d_regs() {return _num_d_regs; } jint dreg_oops_map() {return _dreg_oops_map; } jlong get_d_reg(int idx) { char *p = (char *) _save_area; int ofst = num_s_regs() * 4 + idx * 8; return(*(jlong *) (p + ofst)); } jint get_s_reg(int idx) { char *p = (char *) _save_area; int ofst = idx * 4; return(*(jint *) (p + ofst)); } void put_d_reg(int idx, jlong val) { char *p = (char *) _save_area; int ofst = num_s_regs() * 4 + idx * 8; (*(jlong *) (p + ofst)) = val; } }; #endif // GPU_HSAIL_FRAME_HPP