Skip to contentSkip to conversation

AVR32: Fix bug in __avr32_asr64

PATCH New Haavard Skinnemoen 1 participant 1 message Aug 1, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 AVR32: Fix bug in __avr32_asr64

libgcc uses a logical shift right instruction in one place we're using an arithmetic shift right. I believe libgcc is right.

This fixes some weirdness in the timer code that I've seen lately.

---
 arch/avr32/lib/__avr32_asr64.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/avr32/lib/__avr32_asr64.S +1 -1
index cbbd478..368b6bc 100644
@@ -20,8 +20,8 @@ __avr32_asr64:
 	brle	1f
 
 	lsl	r8, r11, r9
+	lsr	r10, r10, r12
 	asr	r11, r11, r12
-	asr	r10, r10, r12
 	or	r10, r8
 	retal	r12
 
Signature · 1 line
1.4.0