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; |
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) { --- 212 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 |
686 # The InitiateAcc template is the same for StoreCond templates as the 687 # corresponding Store template.. |
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 --- |