gpu_isa.hh revision 11696
111696Santhony.gutierrez@amd.com/* 211696Santhony.gutierrez@amd.com * Copyright (c) 2016 Advanced Micro Devices, Inc. 311696Santhony.gutierrez@amd.com * All rights reserved. 411696Santhony.gutierrez@amd.com * 511696Santhony.gutierrez@amd.com * For use for simulation and test purposes only 611696Santhony.gutierrez@amd.com * 711696Santhony.gutierrez@amd.com * Redistribution and use in source and binary forms, with or without 811696Santhony.gutierrez@amd.com * modification, are permitted provided that the following conditions are met: 911696Santhony.gutierrez@amd.com * 1011696Santhony.gutierrez@amd.com * 1. Redistributions of source code must retain the above copyright notice, 1111696Santhony.gutierrez@amd.com * this list of conditions and the following disclaimer. 1211696Santhony.gutierrez@amd.com * 1311696Santhony.gutierrez@amd.com * 2. Redistributions in binary form must reproduce the above copyright notice, 1411696Santhony.gutierrez@amd.com * this list of conditions and the following disclaimer in the documentation 1511696Santhony.gutierrez@amd.com * and/or other materials provided with the distribution. 1611696Santhony.gutierrez@amd.com * 1711696Santhony.gutierrez@amd.com * 3. Neither the name of the copyright holder nor the names of its contributors 1811696Santhony.gutierrez@amd.com * may be used to endorse or promote products derived from this software 1911696Santhony.gutierrez@amd.com * without specific prior written permission. 2011696Santhony.gutierrez@amd.com * 2111696Santhony.gutierrez@amd.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 2211696Santhony.gutierrez@amd.com * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2311696Santhony.gutierrez@amd.com * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2411696Santhony.gutierrez@amd.com * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 2511696Santhony.gutierrez@amd.com * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2611696Santhony.gutierrez@amd.com * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2711696Santhony.gutierrez@amd.com * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2811696Santhony.gutierrez@amd.com * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2911696Santhony.gutierrez@amd.com * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 3011696Santhony.gutierrez@amd.com * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 3111696Santhony.gutierrez@amd.com * POSSIBILITY OF SUCH DAMAGE. 3211696Santhony.gutierrez@amd.com * 3311696Santhony.gutierrez@amd.com * Authors: Anthony Gutierrez 3411696Santhony.gutierrez@amd.com */ 3511696Santhony.gutierrez@amd.com 3611696Santhony.gutierrez@amd.com#ifndef __ARCH_HSAIL_GPU_ISA_HH__ 3711696Santhony.gutierrez@amd.com#define __ARCH_HSAIL_GPU_ISA_HH__ 3811696Santhony.gutierrez@amd.com 3911696Santhony.gutierrez@amd.com#include <cstdint> 4011696Santhony.gutierrez@amd.com 4111696Santhony.gutierrez@amd.com#include "base/misc.hh" 4211696Santhony.gutierrez@amd.com#include "gpu-compute/misc.hh" 4311696Santhony.gutierrez@amd.com 4411696Santhony.gutierrez@amd.comclass Wavefront; 4511696Santhony.gutierrez@amd.com 4611696Santhony.gutierrez@amd.comnamespace HsailISA 4711696Santhony.gutierrez@amd.com{ 4811696Santhony.gutierrez@amd.com typedef uint64_t MiscReg; 4911696Santhony.gutierrez@amd.com 5011696Santhony.gutierrez@amd.com class GPUISA 5111696Santhony.gutierrez@amd.com { 5211696Santhony.gutierrez@amd.com public: 5311696Santhony.gutierrez@amd.com GPUISA(Wavefront &wf) : wavefront(wf) 5411696Santhony.gutierrez@amd.com { 5511696Santhony.gutierrez@amd.com } 5611696Santhony.gutierrez@amd.com 5711696Santhony.gutierrez@amd.com void 5811696Santhony.gutierrez@amd.com writeMiscReg(int opIdx, MiscReg operandVal) 5911696Santhony.gutierrez@amd.com { 6011696Santhony.gutierrez@amd.com fatal("HSAIL does not implement misc registers yet\n"); 6111696Santhony.gutierrez@amd.com } 6211696Santhony.gutierrez@amd.com 6311696Santhony.gutierrez@amd.com MiscReg 6411696Santhony.gutierrez@amd.com readMiscReg(int opIdx) const 6511696Santhony.gutierrez@amd.com { 6611696Santhony.gutierrez@amd.com fatal("HSAIL does not implement misc registers yet\n"); 6711696Santhony.gutierrez@amd.com } 6811696Santhony.gutierrez@amd.com 6911696Santhony.gutierrez@amd.com bool hasScalarUnit() const { return false; } 7011696Santhony.gutierrez@amd.com 7111696Santhony.gutierrez@amd.com uint32_t 7211696Santhony.gutierrez@amd.com advancePC(uint32_t old_pc, GPUDynInstPtr gpuDynInst) 7311696Santhony.gutierrez@amd.com { 7411696Santhony.gutierrez@amd.com return old_pc + 1; 7511696Santhony.gutierrez@amd.com } 7611696Santhony.gutierrez@amd.com 7711696Santhony.gutierrez@amd.com private: 7811696Santhony.gutierrez@amd.com Wavefront &wavefront; 7911696Santhony.gutierrez@amd.com }; 8011696Santhony.gutierrez@amd.com} 8111696Santhony.gutierrez@amd.com 8211696Santhony.gutierrez@amd.com#endif // __ARCH_HSAIL_GPU_ISA_HH__ 83