mem.hh (11435:0f1b46dde3fa) | mem.hh (11534:7106f550afad) |
---|---|
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: --- 443 unchanged lines hidden (view full) --- 452 void 453 initiateAcc(GPUDynInstPtr gpuDynInst) override 454 { 455 typedef typename MemDataType::CType c0; 456 457 gpuDynInst->statusBitVector = gpuDynInst->exec_mask; 458 459 if (num_dest_operands > 1) { | 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: --- 443 unchanged lines hidden (view full) --- 452 void 453 initiateAcc(GPUDynInstPtr gpuDynInst) override 454 { 455 typedef typename MemDataType::CType c0; 456 457 gpuDynInst->statusBitVector = gpuDynInst->exec_mask; 458 459 if (num_dest_operands > 1) { |
460 for (int i = 0; i < VSZ; ++i) | 460 for (int i = 0; i < gpuDynInst->computeUnit()->wfSize(); ++i) |
461 if (gpuDynInst->exec_mask[i]) 462 gpuDynInst->statusVector.push_back(num_dest_operands); 463 else 464 gpuDynInst->statusVector.push_back(0); 465 } 466 467 for (int k = 0; k < num_dest_operands; ++k) { 468 | 461 if (gpuDynInst->exec_mask[i]) 462 gpuDynInst->statusVector.push_back(num_dest_operands); 463 else 464 gpuDynInst->statusVector.push_back(0); 465 } 466 467 for (int k = 0; k < num_dest_operands; ++k) { 468 |
469 c0 *d = &((c0*)gpuDynInst->d_data)[k * VSZ]; | 469 c0 *d = &((c0*)gpuDynInst->d_data) 470 [k * gpuDynInst->computeUnit()->wfSize()]; |
470 | 471 |
471 for (int i = 0; i < VSZ; ++i) { | 472 for (int i = 0; i < gpuDynInst->computeUnit()->wfSize(); ++i) { |
472 if (gpuDynInst->exec_mask[i]) { 473 Addr vaddr = gpuDynInst->addr[i] + k * sizeof(c0); 474 475 if (isLocalMem()) { 476 // load from shared memory 477 *d = gpuDynInst->wavefront()->ldsChunk-> 478 read<c0>(vaddr); 479 } else { --- 519 unchanged lines hidden (view full) --- 999 void 1000 execSt(GPUDynInstPtr gpuDynInst) override 1001 { 1002 typedef typename MemDataType::CType c0; 1003 1004 gpuDynInst->statusBitVector = gpuDynInst->exec_mask; 1005 1006 if (num_src_operands > 1) { | 473 if (gpuDynInst->exec_mask[i]) { 474 Addr vaddr = gpuDynInst->addr[i] + k * sizeof(c0); 475 476 if (isLocalMem()) { 477 // load from shared memory 478 *d = gpuDynInst->wavefront()->ldsChunk-> 479 read<c0>(vaddr); 480 } else { --- 519 unchanged lines hidden (view full) --- 1000 void 1001 execSt(GPUDynInstPtr gpuDynInst) override 1002 { 1003 typedef typename MemDataType::CType c0; 1004 1005 gpuDynInst->statusBitVector = gpuDynInst->exec_mask; 1006 1007 if (num_src_operands > 1) { |
1007 for (int i = 0; i < VSZ; ++i) | 1008 for (int i = 0; i < gpuDynInst->computeUnit()->wfSize(); ++i) |
1008 if (gpuDynInst->exec_mask[i]) 1009 gpuDynInst->statusVector.push_back(num_src_operands); 1010 else 1011 gpuDynInst->statusVector.push_back(0); 1012 } 1013 1014 for (int k = 0; k < num_src_operands; ++k) { | 1009 if (gpuDynInst->exec_mask[i]) 1010 gpuDynInst->statusVector.push_back(num_src_operands); 1011 else 1012 gpuDynInst->statusVector.push_back(0); 1013 } 1014 1015 for (int k = 0; k < num_src_operands; ++k) { |
1015 c0 *d = &((c0*)gpuDynInst->d_data)[k * VSZ]; | 1016 c0 *d = &((c0*)gpuDynInst->d_data) 1017 [k * gpuDynInst->computeUnit()->wfSize()]; |
1016 | 1018 |
1017 for (int i = 0; i < VSZ; ++i) { | 1019 for (int i = 0; i < gpuDynInst->computeUnit()->wfSize(); ++i) { |
1018 if (gpuDynInst->exec_mask[i]) { 1019 Addr vaddr = gpuDynInst->addr[i] + k * sizeof(c0); 1020 1021 if (isLocalMem()) { 1022 //store to shared memory 1023 gpuDynInst->wavefront()->ldsChunk->write<c0>(vaddr, 1024 *d); 1025 } else { --- 371 unchanged lines hidden (view full) --- 1397 gpuDynInst->statusBitVector = gpuDynInst->exec_mask; 1398 1399 typedef typename MemDataType::CType c0; 1400 1401 c0 *d = &((c0*) gpuDynInst->d_data)[0]; 1402 c0 *e = &((c0*) gpuDynInst->a_data)[0]; 1403 c0 *f = &((c0*) gpuDynInst->x_data)[0]; 1404 | 1020 if (gpuDynInst->exec_mask[i]) { 1021 Addr vaddr = gpuDynInst->addr[i] + k * sizeof(c0); 1022 1023 if (isLocalMem()) { 1024 //store to shared memory 1025 gpuDynInst->wavefront()->ldsChunk->write<c0>(vaddr, 1026 *d); 1027 } else { --- 371 unchanged lines hidden (view full) --- 1399 gpuDynInst->statusBitVector = gpuDynInst->exec_mask; 1400 1401 typedef typename MemDataType::CType c0; 1402 1403 c0 *d = &((c0*) gpuDynInst->d_data)[0]; 1404 c0 *e = &((c0*) gpuDynInst->a_data)[0]; 1405 c0 *f = &((c0*) gpuDynInst->x_data)[0]; 1406 |
1405 for (int i = 0; i < VSZ; ++i) { | 1407 for (int i = 0; i < gpuDynInst->computeUnit()->wfSize(); ++i) { |
1406 if (gpuDynInst->exec_mask[i]) { 1407 Addr vaddr = gpuDynInst->addr[i]; 1408 1409 if (isLocalMem()) { 1410 Wavefront *wavefront = gpuDynInst->wavefront(); 1411 *d = wavefront->ldsChunk->read<c0>(vaddr); 1412 1413 switch (this->opType) { --- 219 unchanged lines hidden --- | 1408 if (gpuDynInst->exec_mask[i]) { 1409 Addr vaddr = gpuDynInst->addr[i]; 1410 1411 if (isLocalMem()) { 1412 Wavefront *wavefront = gpuDynInst->wavefront(); 1413 *d = wavefront->ldsChunk->read<c0>(vaddr); 1414 1415 switch (this->opType) { --- 219 unchanged lines hidden --- |