summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/powerpc/ppc-context-validate.S
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-24 15:21:46 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-11-18 14:56:43 +0100
commit39a4574652f2f7bae2f18b4eb6f5f9bf788466a6 (patch)
treebbe29cd999cf4e89d4e01f8cc983a9938d83a22a /cpukit/score/cpu/powerpc/ppc-context-validate.S
parentpowerpc: Do not validate reserved XER bits (diff)
downloadrtems-39a4574652f2f7bae2f18b4eb6f5f9bf788466a6.tar.bz2
powerpc: Add r2 to CPU context
The r2 may be used for thread-local storage.
Diffstat (limited to '')
-rw-r--r--cpukit/score/cpu/powerpc/ppc-context-validate.S13
1 files changed, 4 insertions, 9 deletions
diff --git a/cpukit/score/cpu/powerpc/ppc-context-validate.S b/cpukit/score/cpu/powerpc/ppc-context-validate.S
index ecf84d6eb8..c7f16591ae 100644
--- a/cpukit/score/cpu/powerpc/ppc-context-validate.S
+++ b/cpukit/score/cpu/powerpc/ppc-context-validate.S
@@ -110,7 +110,9 @@ _CPU_Context_validate:
addi r25, r3, 20
addi r26, r3, 21
addi r27, r3, 22
- addi r28, r3, 23
+
+ /* GPR28 contains the GPR2 pattern */
+ xor r28, r2, r3
/* GPR29 and CR are equal most of the time */
addi r29, r3, 24
@@ -197,7 +199,7 @@ check:
addi r4, r3, 22
cmpw r4, r27
bne restore
- addi r4, r3, 23
+ xor r4, r2, r3
cmpw r4, r28
bne restore
addi r4, r3, 24
@@ -224,13 +226,6 @@ check:
bne restore
cmpw r31, r1
bne restore
-#if 0
- /* This is only valid if we use the EABI */
- lis r4, _SDA2_BASE_@h
- ori r4, r4, _SDA2_BASE_@l
- cmpw r4, r2
- bne restore
-#endif
mtcr r29
addi r5, r3, 1
b check