[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] Strange asm output
From: |
Nicolas Schodet |
Subject: |
[avr-libc-dev] Strange asm output |
Date: |
Sun, 7 Nov 2004 17:52:42 +0100 |
User-agent: |
Mutt/1.5.6+20040722i |
Hello,
I have a little piece of code which produce a very strange code:
int32_t a;
if (a & (1L << 23))
1f6: da 01 movw r26, r20
1f8: c9 01 movw r24, r18
1fa: 77 e1 ldi r23, 0x17 ; 23
1fc: b6 95 lsr r27
1fe: a7 95 ror r26
200: 97 95 ror r25
202: 87 95 ror r24
204: 7a 95 dec r23
206: d1 f7 brne .-12 ; 0x1fc
208: 81 70 andi r24, 0x01 ; 1
20a: 90 70 andi r25, 0x00 ; 0
20c: 89 2b or r24, r25
20e: 51 f0 breq .+20 ; 0x224
I can not understand why gcc do not just test the 23th bit.
/Nicolas Schodet
- [avr-libc-dev] Strange asm output,
Nicolas Schodet <=
- Re: [avr-libc-dev] Strange asm output, Dmitry K., 2004/11/10
- Re: [avr-libc-dev] Strange asm output, Nicolas Schodet, 2004/11/10
- Re: [avr-libc-dev] Strange asm output, Dmitry K., 2004/11/10
- Re: [avr-libc-dev] Strange asm output, Paul Schlie, 2004/11/10
- Re: [avr-libc-dev] Strange asm output, Paul Schlie, 2004/11/11
- Re: [avr-libc-dev] Strange asm output, Nicolas Schodet, 2004/11/11
- Re: [avr-libc-dev] Strange asm output, Paul Schlie, 2004/11/11
- [avr-libc-dev] soliciting feedback/thoughts on potential value of a few gcc 4.0 tweaks., Paul Schlie, 2004/11/19
- Re: [avr-libc-dev] soliciting feedback/thoughts on potential value of a few gcc 4.0 tweaks., Theodore A. Roth, 2004/11/19
- Re: [avr-libc-dev] soliciting feedback/thoughts on potential value of a few gcc 4.0 tweaks., Paul Schlie, 2004/11/20