2 |
- |
1 |
gorka writes:
|
|
|
2 |
---
|
|
|
3 |
I have userspace on the gumstix [xscale, not omap]. The problem that
|
|
|
4 |
got me in trouble was that in lexception.s (or l.s),
|
|
|
5 |
|
|
|
6 |
MOVM.DB.W [R0-R14], (R13)
|
|
|
7 |
|
|
|
8 |
works differently for this architecture (and probably for others, as
|
|
|
9 |
it is unclear how it should behave by reading the arm specs). This
|
|
|
10 |
happens only for kernel faults as the others (syscall, user faults)
|
|
|
11 |
use MOVM.DB.W.S which uses the banked user registers.
|
|
|
12 |
|
|
|
13 |
The problem is that in this arch the value of R13 saved is the value
|
|
|
14 |
after R13 itself has been modified, whereas in the others (bitsy,
|
|
|
15 |
pico...), it was the value before. Adding 4*15 to the stack before
|
|
|
16 |
the RFE solves the problem.
|
|
|
17 |
---
|
|
|
18 |
|
|
|
19 |
In fact, the 2005 ARM arch. ref. man. (ARM DDI 0100I) says, under STM (1),
|
|
|
20 |
that if Rn appears in the set of registers (and isn't the first one)
|
|
|
21 |
and .W is specified, the stored value of Rn is unpredictable.
|
|
|
22 |
The arm v7-ar arch. ref. man. says such usage is obsolete.
|