mem.isa (4027:53292b42ee1c) | mem.isa (4040:eb894f3fc168) |
---|---|
1// -*- mode:c++ -*- 2 3// Copyright (c) 2003-2005 The Regents of The University of Michigan 4// All rights reserved. 5// 6// Redistribution and use in source and binary forms, with or without 7// modification, are permitted provided that the following conditions are 8// met: redistributions of source code must retain the above copyright --- 336 unchanged lines hidden (view full) --- 345 346def template StoreMemAccExecute {{ 347 Fault 348 %(class_name)s::MemAcc::execute(%(CPU_exec_context)s *xc, 349 Trace::InstRecord *traceData) const 350 { 351 Addr EA; 352 Fault fault = NoFault; | 1// -*- mode:c++ -*- 2 3// Copyright (c) 2003-2005 The Regents of The University of Michigan 4// All rights reserved. 5// 6// Redistribution and use in source and binary forms, with or without 7// modification, are permitted provided that the following conditions are 8// met: redistributions of source code must retain the above copyright --- 336 unchanged lines hidden (view full) --- 345 346def template StoreMemAccExecute {{ 347 Fault 348 %(class_name)s::MemAcc::execute(%(CPU_exec_context)s *xc, 349 Trace::InstRecord *traceData) const 350 { 351 Addr EA; 352 Fault fault = NoFault; |
353 354 %(fp_enable_check)s; 355 %(op_decl)s; 356 %(op_rd)s; 357 EA = xc->getEA(); 358 359 if (fault == NoFault) { 360 %(memacc_code)s; 361 } 362 363 if (fault == NoFault) { 364 fault = xc->write((uint%(mem_acc_size)d_t&)Mem, EA, 365 memAccessFlags, NULL); 366 if (traceData) { traceData->setData(Mem); } 367 } 368 369 if (fault == NoFault) { 370 %(postacc_code)s; 371 } 372 373 if (fault == NoFault) { 374 %(op_wb)s; 375 } 376 377 return fault; 378 } 379}}; 380 381def template StoreCondMemAccExecute {{ 382 Fault 383 %(class_name)s::MemAcc::execute(%(CPU_exec_context)s *xc, 384 Trace::InstRecord *traceData) const 385 { 386 Addr EA; 387 Fault fault = NoFault; | |
388 uint64_t write_result = 0; 389 390 %(fp_enable_check)s; 391 %(op_decl)s; 392 %(op_rd)s; 393 EA = xc->getEA(); 394 395 if (fault == NoFault) { --- 20 unchanged lines hidden (view full) --- 416 417 418def template StoreExecute {{ 419 Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, 420 Trace::InstRecord *traceData) const 421 { 422 Addr EA; 423 Fault fault = NoFault; | 353 uint64_t write_result = 0; 354 355 %(fp_enable_check)s; 356 %(op_decl)s; 357 %(op_rd)s; 358 EA = xc->getEA(); 359 360 if (fault == NoFault) { --- 20 unchanged lines hidden (view full) --- 381 382 383def template StoreExecute {{ 384 Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, 385 Trace::InstRecord *traceData) const 386 { 387 Addr EA; 388 Fault fault = NoFault; |
424 425 %(fp_enable_check)s; 426 %(op_decl)s; 427 %(op_rd)s; 428 %(ea_code)s; 429 430 if (fault == NoFault) { 431 %(memacc_code)s; 432 } 433 434 if (fault == NoFault) { 435 fault = xc->write((uint%(mem_acc_size)d_t&)Mem, EA, 436 memAccessFlags, NULL); 437 if (traceData) { traceData->setData(Mem); } 438 } 439 440 if (fault == NoFault) { 441 %(postacc_code)s; 442 } 443 444 if (fault == NoFault) { 445 %(op_wb)s; 446 } 447 448 return fault; 449 } 450}}; 451 452def template StoreCondExecute {{ 453 Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, 454 Trace::InstRecord *traceData) const 455 { 456 Addr EA; 457 Fault fault = NoFault; | |
458 uint64_t write_result = 0; 459 460 %(fp_enable_check)s; 461 %(op_decl)s; 462 %(op_rd)s; 463 %(ea_code)s; 464 465 if (fault == NoFault) { --- 73 unchanged lines hidden (view full) --- 539 %(CPU_exec_context)s *xc, 540 Trace::InstRecord *traceData) const 541 { 542 Fault fault = NoFault; 543 544 %(fp_enable_check)s; 545 %(op_dest_decl)s; 546 | 389 uint64_t write_result = 0; 390 391 %(fp_enable_check)s; 392 %(op_decl)s; 393 %(op_rd)s; 394 %(ea_code)s; 395 396 if (fault == NoFault) { --- 73 unchanged lines hidden (view full) --- 470 %(CPU_exec_context)s *xc, 471 Trace::InstRecord *traceData) const 472 { 473 Fault fault = NoFault; 474 475 %(fp_enable_check)s; 476 %(op_dest_decl)s; 477 |
547 uint64_t write_result = pkt->req->getScResult(); | 478 uint64_t write_result = pkt->req->getExtraData(); |
548 549 if (fault == NoFault) { 550 %(postacc_code)s; 551 } 552 553 if (fault == NoFault) { 554 %(op_wb)s; 555 } --- 122 unchanged lines hidden (view full) --- 678 679 if mem_flags: 680 s = '\n\tmemAccessFlags = ' + string.join(mem_flags, '|') + ';' 681 iop.constructor += s 682 memacc_iop.constructor += s 683 684 # select templates 685 | 479 480 if (fault == NoFault) { 481 %(postacc_code)s; 482 } 483 484 if (fault == NoFault) { 485 %(op_wb)s; 486 } --- 122 unchanged lines hidden (view full) --- 609 610 if mem_flags: 611 s = '\n\tmemAccessFlags = ' + string.join(mem_flags, '|') + ';' 612 iop.constructor += s 613 memacc_iop.constructor += s 614 615 # select templates 616 |
686 # The InitiateAcc template is the same for StoreCond templates as the 687 # corresponding Store template.. | 617 # define aliases... most StoreCond templates are the same as the 618 # corresponding Store templates (only CompleteAcc is different). 619 StoreCondMemAccExecute = StoreMemAccExecute 620 StoreCondExecute = StoreExecute |
688 StoreCondInitiateAcc = StoreInitiateAcc 689 690 memAccExecTemplate = eval(exec_template_base + 'MemAccExecute') 691 fullExecTemplate = eval(exec_template_base + 'Execute') 692 initiateAccTemplate = eval(exec_template_base + 'InitiateAcc') 693 completeAccTemplate = eval(exec_template_base + 'CompleteAcc') 694 695 # (header_output, decoder_output, decode_block, exec_output) --- 78 unchanged lines hidden --- | 621 StoreCondInitiateAcc = StoreInitiateAcc 622 623 memAccExecTemplate = eval(exec_template_base + 'MemAccExecute') 624 fullExecTemplate = eval(exec_template_base + 'Execute') 625 initiateAccTemplate = eval(exec_template_base + 'InitiateAcc') 626 completeAccTemplate = eval(exec_template_base + 'CompleteAcc') 627 628 # (header_output, decoder_output, decode_block, exec_output) --- 78 unchanged lines hidden --- |