Description: Change PRE-UAL to UAL code and add thumb2 compatibility.
 Changes:
 1) MOV Rd, Rn, LSL shift to LSL Rd, Rn, shift
 2) ORR Rd,Rn,Rm,LSL Rs is equivalent to Rd = Rn | (Rm << Rs)
    This is not a legal thumb2 instruction since only constant shifts are
    permitted when the shift is combined with another operation.
    .
    Split into:
    lsl Rm, Rm, Rs	Rm = (Rm << Rs)
    orr Rd, Rn, Rm	Rd = Rn | Rm
    .
    If possible the better lsls/orrs 16-bit thumb1 instructions could be used.
 This compiles with -marm and -mthumb.
Author: Miguel Colon <debian.micove@gmail.com>
Forwarded: yes
Last-Update: 2012-04-06

--- mpg123-1.13.7.orig/src/libmpg123/mpg123lib_intern.h
+++ mpg123-1.13.7/src/libmpg123/mpg123lib_intern.h
@@ -165,8 +165,9 @@ static inline long scale_rounded(long x,
 	long _x=(x), _y=(y), _mull, _mulh; \
 	__asm__ ( \
 		"smull %0, %1, %2, %3 \n\t" \
-		"mov %0, %0, lsr %4 \n\t" \
-		"orr %0, %0, %1, lsl %5 \n\t" \
+		"lsr %0, %0, %4 \n\t" \
+		"lsl %1, %1, %5 \n\t" \
+		"orr %0, %0, %1 \n\t" \
 		: "=&r" (_mull), "=&r" (_mulh) \
 		: "%r" (_x), "r" (_y), "M" (radix), "M" (32-(radix)) \
 	); \
@@ -178,9 +179,10 @@ static inline long scale_rounded(long x,
 	long _x=(x), _y=(y), _radix=(radix), _mull, _mulh, _radix2; \
 	__asm__ ( \
 		"smull %0, %1, %3, %4 \n\t" \
-		"mov %0, %0, lsr %5 \n\t" \
+		"lsr %0, %0, %5 \n\t" \
 		"rsb %2, %5, #32 \n\t" \
-		"orr %0, %0, %1, lsl %2 \n\t" \
+		"lsl %1, %1, %2 \n\t" \
+		"orr %0, %0, %1 \n\t" \
 		: "=&r" (_mull), "=&r" (_mulh), "=&r" (_radix2) \
 		: "%r" (_x), "r" (_y), "r" (_radix) \
 	); \
