ag++ is now called with a list of currently active aspect headers
(ag++ -a aspect1.ah -a aspect2.ah ...). This resolves several problems at
once:
- Build directories may be positioned arbitrarily now, they need not be
a subdirectory of the project anymore.
- Multiple build directories can coexist within the project tree. Before
this commit, the generated instantiate-*.ah aspect headers disturbed
neighboring build trees.
- Due to this, the regression test should be runnable much more easily
now.
- The build time was reduced by an average of about 10%.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1753 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
34 lines
939 B
Plaintext
34 lines
939 B
Plaintext
#ifndef __INTERRUPT_AH__
|
|
#define __INTERRUPT_AH__
|
|
|
|
#include "bochs.h"
|
|
#include "cpu/cpu.h"
|
|
|
|
#include "../SALInst.hpp"
|
|
|
|
aspect Interrupt {
|
|
pointcut interrupt_method() = "void bx_cpu_c::interrupt(...)"; // cpu/exception.cc
|
|
|
|
advice execution (interrupt_method()) : before ()
|
|
{
|
|
// There are six different type-arguments for the interrupt-method
|
|
// in cpu.h (lines 3867-3872):
|
|
// - BX_EXTERNAL_INTERRUPT = 0,
|
|
// - BX_NMI = 2,
|
|
// - BX_HARDWARE_EXCEPTION = 3,
|
|
// - BX_SOFTWARE_INTERRUPT = 4,
|
|
// - BX_PRIVILEGED_SOFTWARE_INTERRUPT = 5,
|
|
// - BX_SOFTWARE_EXCEPTION = 6
|
|
// Only the first and the second types are relevant for this aspect.
|
|
|
|
unsigned vector = *(tjp->arg<0>());
|
|
unsigned type = *(tjp->arg<1>());
|
|
if (type == BX_EXTERNAL_INTERRUPT)
|
|
fail::simulator.onInterrupt(vector, false);
|
|
else if (type == BX_NMI)
|
|
fail::simulator.onInterrupt(vector, true);
|
|
}
|
|
};
|
|
|
|
#endif // __INTERRUPT_AH__
|