mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-03 16:14:06 +00:00
Merge pull request #2219 from magumagu/no-volatile-processorinterface
Remove useless volatile from ProcessorInterface.
This commit is contained in:
commit
0b6562b53f
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
#include "Common/Atomic.h"
|
|
||||||
#include "Common/ChunkFile.h"
|
#include "Common/ChunkFile.h"
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
|
|
||||||
@ -37,8 +36,8 @@ enum
|
|||||||
|
|
||||||
|
|
||||||
// STATE_TO_SAVE
|
// STATE_TO_SAVE
|
||||||
volatile u32 m_InterruptCause;
|
u32 m_InterruptCause;
|
||||||
volatile u32 m_InterruptMask;
|
u32 m_InterruptMask;
|
||||||
// addresses for CPU fifo accesses
|
// addresses for CPU fifo accesses
|
||||||
u32 Fifo_CPUBase;
|
u32 Fifo_CPUBase;
|
||||||
u32 Fifo_CPUEnd;
|
u32 Fifo_CPUEnd;
|
||||||
@ -98,7 +97,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||||||
mmio->Register(base | PI_INTERRUPT_CAUSE,
|
mmio->Register(base | PI_INTERRUPT_CAUSE,
|
||||||
MMIO::DirectRead<u32>(&m_InterruptCause),
|
MMIO::DirectRead<u32>(&m_InterruptCause),
|
||||||
MMIO::ComplexWrite<u32>([](u32, u32 val) {
|
MMIO::ComplexWrite<u32>([](u32, u32 val) {
|
||||||
Common::AtomicAnd(m_InterruptCause, ~val);
|
m_InterruptCause &= ~val;
|
||||||
UpdateException();
|
UpdateException();
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@ -204,9 +203,9 @@ void SetInterrupt(u32 _causemask, bool _bSet)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_bSet)
|
if (_bSet)
|
||||||
Common::AtomicOr(m_InterruptCause, _causemask);
|
m_InterruptCause |= _causemask;
|
||||||
else
|
else
|
||||||
Common::AtomicAnd(m_InterruptCause, ~_causemask);// is there any reason to have this possibility?
|
m_InterruptCause &= ~_causemask;// is there any reason to have this possibility?
|
||||||
// F|RES: i think the hw devices reset the interrupt in the PI to 0
|
// F|RES: i think the hw devices reset the interrupt in the PI to 0
|
||||||
// if the interrupt cause is eliminated. that isnt done by software (afaik)
|
// if the interrupt cause is eliminated. that isnt done by software (afaik)
|
||||||
UpdateException();
|
UpdateException();
|
||||||
@ -214,10 +213,7 @@ void SetInterrupt(u32 _causemask, bool _bSet)
|
|||||||
|
|
||||||
static void SetResetButton(bool _bSet)
|
static void SetResetButton(bool _bSet)
|
||||||
{
|
{
|
||||||
if (_bSet)
|
SetInterrupt(INT_CAUSE_RST_BUTTON, !_bSet);
|
||||||
Common::AtomicAnd(m_InterruptCause, ~INT_CAUSE_RST_BUTTON);
|
|
||||||
else
|
|
||||||
Common::AtomicOr(m_InterruptCause, INT_CAUSE_RST_BUTTON);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToggleResetButtonCallback(u64 userdata, int cyclesLate)
|
void ToggleResetButtonCallback(u64 userdata, int cyclesLate)
|
||||||
|
@ -35,8 +35,8 @@ enum InterruptCause
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern volatile u32 m_InterruptCause;
|
extern u32 m_InterruptCause;
|
||||||
extern volatile u32 m_InterruptMask;
|
extern u32 m_InterruptMask;
|
||||||
extern u32 Fifo_CPUBase;
|
extern u32 Fifo_CPUBase;
|
||||||
extern u32 Fifo_CPUEnd;
|
extern u32 Fifo_CPUEnd;
|
||||||
extern u32 Fifo_CPUWritePointer;
|
extern u32 Fifo_CPUWritePointer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user