brig_object.cc (11308:7d8836fd043d) brig_object.cc (11734:d5ffebd89eb2)
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) {
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 panic("Function calls are not fully supported yet!!: %s\n",
180 getString(p->name));
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");
181
182 const char *name = getString(p->name);
183
184 HsailCode *code_obj = nullptr;
185
186 for (int i = 0; i < functions.size(); ++i) {
187 if (functions[i]->name() == name) {
188 code_obj = functions[i];

--- 5 unchanged lines hidden (view full) ---

194 // create new local storage map for kernel-local symbols
195 code_obj = new HsailCode(name, p, this,
196 new StorageMap(storageMap));
197 functions.push_back(code_obj);
198 } else {
199 panic("Multiple definition of Function!!: %s\n",
200 getString(p->name));
201 }
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 }
202
203 }
204 }
205
204 nextDirPtr = getCodeSectionEntry(p->nextModuleEntry);
205 }
206 break;
207
208 case BRIG_KIND_DIRECTIVE_KERNEL:
209 {
210 const BrigDirectiveExecutable *p =
211 reinterpret_cast<const BrigDirectiveExecutable*>(dirPtr);

--- 263 unchanged lines hidden ---
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 ---