Commit 427c1073 authored by Helge Deller's avatar Helge Deller

parisc/unaligned: Rewrite 32-bit inline assembly of emulate_ldd()

Convert to use real temp variables instead of clobbering processor
registers.
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent e8aa7b17
...@@ -201,26 +201,24 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop) ...@@ -201,26 +201,24 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop)
: "r19", "r20" ); : "r19", "r20" );
#else #else
{ {
unsigned long valh=0,vall=0; unsigned long shift, temp1;
__asm__ __volatile__ ( __asm__ __volatile__ (
" zdep %5,29,2,%%r19\n" /* r19=(ofs&3)*8 */ " zdep %2,29,2,%3\n" /* r19=(ofs&3)*8 */
" mtsp %6, %%sr1\n" " mtsp %5, %%sr1\n"
" dep %%r0,31,2,%5\n" " dep %%r0,31,2,%2\n"
"1: ldw 0(%%sr1,%5),%0\n" "1: ldw 0(%%sr1,%2),%0\n"
"2: ldw 4(%%sr1,%5),%1\n" "2: ldw 4(%%sr1,%2),%R0\n"
"3: ldw 8(%%sr1,%5),%%r20\n" "3: ldw 8(%%sr1,%2),%4\n"
" subi 32,%%r19,%%r19\n" " subi 32,%3,%3\n"
" mtsar %%r19\n" " mtsar %3\n"
" vshd %0,%1,%0\n" " vshd %0,%R0,%0\n"
" vshd %1,%%r20,%1\n" " vshd %R0,%4,%R0\n"
"4: \n" "4: \n"
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 4b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 4b)
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 4b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 4b)
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(3b, 4b) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(3b, 4b)
: "=r" (valh), "=r" (vall), "+r" (ret) : "+r" (val), "+r" (ret), "+r" (saddr), "=&r" (shift), "=&r" (temp1)
: "0" (valh), "1" (vall), "r" (saddr), "r" (regs->isr) : "r" (regs->isr) );
: "r19", "r20" );
val=((__u64)valh<<32)|(__u64)vall;
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment