aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2010-06-22 12:16:07 -0400
committerMichal Simek <monstr@monstr.eu>2010-08-04 04:44:56 -0400
commit287503fabd9910cc77266142c7c8acbdb8efbf6b (patch)
tree93a3d4c9d93a377e67a48a172026a7abcd2793de /arch
parent9814cc11e559d982874f6ebac2bc795e33cb0244 (diff)
microblaze: Put together addik instructions
Saving instructions by adding 2/3 addik instructions to one. Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch')
-rw-r--r--arch/microblaze/kernel/entry.S14
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S
index 34100a526194..e7abf7426c8c 100644
--- a/arch/microblaze/kernel/entry.S
+++ b/arch/microblaze/kernel/entry.S
@@ -279,8 +279,10 @@
279 /* Kernel-mode state save. */ \ 279 /* Kernel-mode state save. */ \
280 /* Reload kernel stack-ptr. */ \ 280 /* Reload kernel stack-ptr. */ \
281 lwi r1, r0, TOPHYS(PER_CPU(ENTRY_SP)); \ 281 lwi r1, r0, TOPHYS(PER_CPU(ENTRY_SP)); \
282 tophys(r1,r1); \ 282 /* FIXME: I can add these two lines to one */ \
283 addik r1, r1, -STATE_SAVE_SIZE; /* Make room on the stack. */\ 283 /* tophys(r1,r1); */ \
284 /* addik r1, r1, -STATE_SAVE_SIZE; */ \
285 addik r1, r1, CONFIG_KERNEL_BASE_ADDR - CONFIG_KERNEL_START - STATE_SAVE_SIZE; \
284 SAVE_REGS \ 286 SAVE_REGS \
285 brid 2f; \ 287 brid 2f; \
286 swi r1, r1, PTO+PT_MODE; \ 288 swi r1, r1, PTO+PT_MODE; \
@@ -288,9 +290,11 @@
288 lwi r1, r0, TOPHYS(PER_CPU(CURRENT_SAVE)); /* get saved current */\ 290 lwi r1, r0, TOPHYS(PER_CPU(CURRENT_SAVE)); /* get saved current */\
289 tophys(r1,r1); \ 291 tophys(r1,r1); \
290 lwi r1, r1, TS_THREAD_INFO; /* get the thread info */ \ 292 lwi r1, r1, TS_THREAD_INFO; /* get the thread info */ \
291 addik r1, r1, THREAD_SIZE; /* calculate kernel stack pointer */\ 293 /* MS these three instructions can be added to one */ \
292 tophys(r1,r1); \ 294 /* addik r1, r1, THREAD_SIZE; */ \
293 addik r1, r1, -STATE_SAVE_SIZE; /* Make room on the stack. */\ 295 /* tophys(r1,r1); */ \
296 /* addik r1, r1, -STATE_SAVE_SIZE; */ \
297 addik r1, r1, THREAD_SIZE + CONFIG_KERNEL_BASE_ADDR - CONFIG_KERNEL_START - STATE_SAVE_SIZE; \
294 SAVE_REGS \ 298 SAVE_REGS \
295 lwi r11, r0, TOPHYS(PER_CPU(ENTRY_SP)); \ 299 lwi r11, r0, TOPHYS(PER_CPU(ENTRY_SP)); \
296 swi r11, r1, PTO+PT_R1; /* Store user SP. */ \ 300 swi r11, r1, PTO+PT_R1; /* Store user SP. */ \