Revision e64d7d59 hw/sbi.c
b/hw/sbi.c | ||
---|---|---|
46 | 46 |
} SBIState; |
47 | 47 |
|
48 | 48 |
#define SBI_SIZE (SBI_NREGS * 4) |
49 |
#define SBI_MASK (SBI_SIZE - 1) |
|
50 | 49 |
|
51 | 50 |
static void sbi_check_interrupts(void *opaque) |
52 | 51 |
{ |
... | ... | |
65 | 64 |
SBIState *s = opaque; |
66 | 65 |
uint32_t saddr, ret; |
67 | 66 |
|
68 |
saddr = (addr & SBI_MASK) >> 2;
|
|
67 |
saddr = addr >> 2;
|
|
69 | 68 |
switch (saddr) { |
70 | 69 |
default: |
71 | 70 |
ret = s->regs[saddr]; |
... | ... | |
81 | 80 |
SBIState *s = opaque; |
82 | 81 |
uint32_t saddr; |
83 | 82 |
|
84 |
saddr = (addr & SBI_MASK) >> 2;
|
|
83 |
saddr = addr >> 2;
|
|
85 | 84 |
DPRINTF("write system reg 0x" TARGET_FMT_plx " = %x\n", addr, val); |
86 | 85 |
switch (saddr) { |
87 | 86 |
default: |
Also available in: Unified diff