OSDN Git Service

Regenerate cgen files, update copyright year.
[pf3gnuchains/pf3gnuchains3x.git] / sid / component / cgen-cpu / sh / sh4al-write.cxx
1 /* Simulator instruction operand writer for sh.
2
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
4
5 Copyright (C) 2000-2010 Red Hat, Inc.
6
7 This file is part of the Red Hat simulators.
8
9
10 */
11
12
13 #include "sh4al.h"
14
15   template <typename ST> 
16   static void clear_stacks (ST &st)
17   {
18     for (int i = 0; i < sh4al::pipe_sz; i++)
19       st[i].clear();
20   }
21
22   void sh4al::write_stacks::reset ()
23   {
24     clear_stacks (h_pc_writes);
25     clear_stacks (h_pr_writes);
26   }
27   void sh4al::write_stacks::writeback (int tick, sh4al::sh4al_cpu* current_cpu) 
28   {
29
30     // register writeback loops
31     while (! h_pc_writes[tick].empty())
32     {
33       write<UDI> &w = h_pc_writes[tick].top();
34       current_cpu->h_pc_set(w.val);
35       h_pc_writes[tick].pop();
36     }
37
38     while (! h_pr_writes[tick].empty())
39     {
40       write<SI> &w = h_pr_writes[tick].top();
41       current_cpu->h_pr_set(w.val);
42       h_pr_writes[tick].pop();
43     }
44
45
46     // memory writeback loops
47
48   }