avr-objdump or avr-gcc bug?

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, All!

subj:

    18e4:	86 a1       	lds	r24, 0x46
    18e6:	97 a1       	lds	r25, 0x47
    18e8:	96 95       	lsr	r25
    18ea:	87 95       	ror	r24
	TCC0.CNT = TCC0.PER / 2;
    18ec:	80 a3       	lds	r24, 0x50
    18ee:	91 a3       	lds	r25, 0x51
    18f0:	83 e0       	ldi	r24, 0x03 ; 3
    18f2:	86 83       	std	Z+6, r24  ; 0x06
    18f4:	81 e0       	ldi	r24, 0x01 ; 1
    18f6:	84 87       	std	Z+12, r24 ; 0x0c
    18f8:	78 94       	sei
    18fa:	80 93 1d 26 	sts	0x261D, r24
	TCC0.INTCTRLA = TC_ERRINTLVL_OFF_gc | TC_OVFINTLVL_HI_gc;
    18fe:	08 95       	ret

GNU objdump (AVR_8_bit_GNU_Toolchain_3.4.1_830) 2.22
avr-gcc (AVR_8_bit_GNU_Toolchain_3.4.1_830) 4.6.2

Ilya

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi!

test.c

#include 


int main( void )
{
	TCC0.CNT = TCC0.PER / 2;
}

Commands:

avr-gcc -O2 -mmcu=atxmega64a3 -g test.c
avr-objdump a.out -S

test.lst:

int main( void )
{
	TCC0.CNT = TCC0.PER / 2;
 22c:	e0 e0       	ldi	r30, 0x00	; 0
 22e:	f8 e0       	ldi	r31, 0x08	; 8
 230:	86 a1       	lds	r24, 0x46
 232:	97 a1       	lds	r25, 0x47
 234:	96 95       	lsr	r25
 236:	87 95       	ror	r24
 238:	80 a3       	lds	r24, 0x50
 23a:	91 a3       	lds	r25, 0x51
}
 23c:	08 95       	ret

Ilya

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, All!

It was avr-objdump bug.

In 2.23.51.20120813 it fixed.

Ilya