Deleted Added
sdiff udiff text old ( 3520:4f4a2054fd85 ) new ( 3521:0b0b3551def0 )
full compact
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

83 void clear_all()
84 {
85 DPRINTF(Interrupt, "Interrupts all cleared\n");
86
87 memset(interrupts, 0, sizeof(interrupts));
88 intstatus = 0;
89 }
90
91 bool check_interrupt(int int_num) const {
92 if (int_num > NumInterruptLevels)
93 panic("int_num out of bounds\n");
94
95 return interrupts[int_num] != 0;
96 }
97
98 bool check_interrupts() const { return intstatus != 0; }
99
100 void serialize(std::ostream &os)
101 {
102 SERIALIZE_ARRAY(interrupts, NumInterruptLevels);
103 SERIALIZE_SCALAR(intstatus);
104 }
105
106 void unserialize(Checkpoint *cp, const std::string &section)
107 {
108 UNSERIALIZE_ARRAY(interrupts, NumInterruptLevels);
109 UNSERIALIZE_SCALAR(intstatus);
110 }
111
112 Fault getInterrupt(ThreadContext * tc)
113 {
114 int ipl = 0;
115 int summary = 0;
116
117 if (tc->readMiscReg(IPR_ASTRR))
118 panic("asynchronous traps not implemented\n");
119

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

158
159 return new InterruptFault;
160 } else {
161 return NoFault;
162 }
163 }
164
165 private:
166 uint64_t intr_status() const { return intstatus; }
167 };
168}
169
170#endif
171