diff options
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/SConscript | 1 | ||||
-rw-r--r-- | src/arch/hsail/gpu_isa.hh | 82 |
2 files changed, 83 insertions, 0 deletions
diff --git a/src/arch/SConscript b/src/arch/SConscript index b022cb01f..54d97a4d9 100644 --- a/src/arch/SConscript +++ b/src/arch/SConscript @@ -71,6 +71,7 @@ make_switching_dir('arch', isa_switch_hdrs, env) if env['BUILD_GPU']: gpu_isa_switch_hdrs = Split(''' gpu_decoder.hh + gpu_isa.hh gpu_types.hh ''') diff --git a/src/arch/hsail/gpu_isa.hh b/src/arch/hsail/gpu_isa.hh new file mode 100644 index 000000000..dbd816d91 --- /dev/null +++ b/src/arch/hsail/gpu_isa.hh @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2016 Advanced Micro Devices, Inc. + * All rights reserved. + * + * For use for simulation and test purposes only + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * Authors: Anthony Gutierrez + */ + +#ifndef __ARCH_HSAIL_GPU_ISA_HH__ +#define __ARCH_HSAIL_GPU_ISA_HH__ + +#include <cstdint> + +#include "base/misc.hh" +#include "gpu-compute/misc.hh" + +class Wavefront; + +namespace HsailISA +{ + typedef uint64_t MiscReg; + + class GPUISA + { + public: + GPUISA(Wavefront &wf) : wavefront(wf) + { + } + + void + writeMiscReg(int opIdx, MiscReg operandVal) + { + fatal("HSAIL does not implement misc registers yet\n"); + } + + MiscReg + readMiscReg(int opIdx) const + { + fatal("HSAIL does not implement misc registers yet\n"); + } + + bool hasScalarUnit() const { return false; } + + uint32_t + advancePC(uint32_t old_pc, GPUDynInstPtr gpuDynInst) + { + return old_pc + 1; + } + + private: + Wavefront &wavefront; + }; +} + +#endif // __ARCH_HSAIL_GPU_ISA_HH__ |