1/* 2 * Copyright (c) 2012-2015 Advanced Micro Devices, Inc. 3 * All rights reserved. 4 * 5 * For use for simulation and test purposes only 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are met: --- 162 unchanged lines hidden (view full) --- 171 const BrigDirectiveExecutable *p M5_VAR_USED = 172 reinterpret_cast<const BrigDirectiveExecutable*>(dirPtr); 173 174 DPRINTF(HSAILObject,"DIRECTIVE_FUNCTION: %s offset: " 175 "%d next: %d\n", getString(p->name), 176 p->firstCodeBlockEntry, p->nextModuleEntry); 177 178 if (p->firstCodeBlockEntry != p->nextModuleEntry) { |
179 // Function calls are not supported. We allow the BRIG 180 // object file to create stubs, but the function calls will 181 // not work properly if the application makes use of them. 182 warn("HSA function invocations are unsupported.\n"); |
183 184 const char *name = getString(p->name); 185 186 HsailCode *code_obj = nullptr; 187 188 for (int i = 0; i < functions.size(); ++i) { 189 if (functions[i]->name() == name) { 190 code_obj = functions[i]; --- 5 unchanged lines hidden (view full) --- 196 // create new local storage map for kernel-local symbols 197 code_obj = new HsailCode(name, p, this, 198 new StorageMap(storageMap)); 199 functions.push_back(code_obj); 200 } else { 201 panic("Multiple definition of Function!!: %s\n", 202 getString(p->name)); 203 } |
204 } |
205 |
206 nextDirPtr = getCodeSectionEntry(p->nextModuleEntry); 207 } 208 break; 209 210 case BRIG_KIND_DIRECTIVE_KERNEL: 211 { 212 const BrigDirectiveExecutable *p = 213 reinterpret_cast<const BrigDirectiveExecutable*>(dirPtr); --- 263 unchanged lines hidden --- |