Skip to content

Commit

Permalink
microblaze: Do not use "la" pseudo instruction - use addik instead
Browse files Browse the repository at this point in the history
"la" pseudo instruction is only translation to "addik".
Use directly "addik" which is described in the MB reference guide.

Signed-off-by: Michal Simek <monstr@monstr.eu>
  • Loading branch information
Michal Simek committed Mar 9, 2011
1 parent 6e83557 commit cd34157
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions arch/microblaze/kernel/entry-nommu.S
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ ENTRY(_interrupt)
/* restore r31 */
lwi r31, r0, PER_CPU(CURRENT_SAVE)
/* prepare the link register, the argument and jump */
la r15, r0, ret_from_intr - 8
addik r15, r0, ret_from_intr - 8
addk r6, r0, r15
braid do_IRQ
add r5, r0, r1
Expand Down Expand Up @@ -283,7 +283,7 @@ ENTRY(_user_exception)
add r12, r12, r12 /* convert num -> ptr */
add r12, r12, r12
lwi r12, r12, sys_call_table /* Get function pointer */
la r15, r0, ret_to_user-8 /* set return address */
addik r15, r0, ret_to_user-8 /* set return address */
bra r12 /* Make the system call. */
bri 0 /* won't reach here */
1:
Expand Down
2 changes: 1 addition & 1 deletion arch/microblaze/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ C_ENTRY(_debug_exception):
tovirt(r1,r1)
#ifdef CONFIG_KGDB
addi r5, r1, 0 /* pass pt_reg address as the first arg */
la r15, r0, dbtrap_call; /* return address */
addik r15, r0, dbtrap_call; /* return address */
rtbd r0, microblaze_kgdb_break
nop;
#endif
Expand Down
12 changes: 6 additions & 6 deletions arch/microblaze/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -224,26 +224,26 @@ start_here:
#endif /* CONFIG_MMU */

/* Initialize small data anchors */
la r13, r0, _KERNEL_SDA_BASE_
la r2, r0, _KERNEL_SDA2_BASE_
addik r13, r0, _KERNEL_SDA_BASE_
addik r2, r0, _KERNEL_SDA2_BASE_

/* Initialize stack pointer */
la r1, r0, init_thread_union + THREAD_SIZE - 4
addik r1, r0, init_thread_union + THREAD_SIZE - 4

/* Initialize r31 with current task address */
la r31, r0, init_task
addik r31, r0, init_task

/*
* Call platform dependent initialize function.
* Please see $(ARCH)/mach-$(SUBARCH)/setup.c for
* the function.
*/
la r9, r0, machine_early_init
addik r9, r0, machine_early_init
brald r15, r9
nop

#ifndef CONFIG_MMU
la r15, r0, machine_halt
addik r15, r0, machine_halt
braid start_kernel
nop
#else
Expand Down
12 changes: 6 additions & 6 deletions arch/microblaze/kernel/hw_exception_handler.S
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ ex_lw_tail:
/* Get the destination register number into r5 */
lbui r5, r0, TOPHYS(ex_reg_op);
/* Form load_word jump table offset (lw_table + (8 * regnum)) */
la r6, r0, TOPHYS(lw_table);
addik r6, r0, TOPHYS(lw_table);
addk r5, r5, r5;
addk r5, r5, r5;
addk r5, r5, r5;
Expand All @@ -501,7 +501,7 @@ ex_sw:
/* Get the destination register number into r5 */
lbui r5, r0, TOPHYS(ex_reg_op);
/* Form store_word jump table offset (sw_table + (8 * regnum)) */
la r6, r0, TOPHYS(sw_table);
addik r6, r0, TOPHYS(sw_table);
add r5, r5, r5;
add r5, r5, r5;
add r5, r5, r5;
Expand Down Expand Up @@ -912,7 +912,7 @@ ex_lw_vm:
beqid r6, ex_lhw_vm;
load1: lbui r5, r4, 0; /* Exception address in r4 - delay slot */
/* Load a word, byte-by-byte from destination address and save it in tmp space*/
la r6, r0, ex_tmp_data_loc_0;
addik r6, r0, ex_tmp_data_loc_0;
sbi r5, r6, 0;
load2: lbui r5, r4, 1;
sbi r5, r6, 1;
Expand All @@ -926,7 +926,7 @@ load4: lbui r5, r4, 3;
ex_lhw_vm:
/* Load a half-word, byte-by-byte from destination address and
* save it in tmp space */
la r6, r0, ex_tmp_data_loc_0;
addik r6, r0, ex_tmp_data_loc_0;
sbi r5, r6, 0;
load5: lbui r5, r4, 1;
sbi r5, r6, 1;
Expand All @@ -942,7 +942,7 @@ ex_sw_vm:
addik r5, r8, sw_table_vm;
bra r5;
ex_sw_tail_vm:
la r5, r0, ex_tmp_data_loc_0;
addik r5, r0, ex_tmp_data_loc_0;
beqid r6, ex_shw_vm;
swi r3, r5, 0; /* Get the word - delay slot */
/* Store the word, byte-by-byte into destination address */
Expand Down Expand Up @@ -985,7 +985,7 @@ ex_unaligned_fixup:
addik r7, r0, SIGSEGV
/* call bad_page_fault for finding aligned fixup, fixup address is saved
* in PT_PC which is used as return address from exception */
la r15, r0, ret_from_exc-8 /* setup return address */
addik r15, r0, ret_from_exc-8 /* setup return address */
brid bad_page_fault
nop

Expand Down

0 comments on commit cd34157

Please sign in to comment.