BUG about cpse skip adiw

26 views
Skip to first unread message

tw f

unread,
Mar 1, 2020, 5:20:12 AM3/1/20
to simavr
//filename: test.S
.global start
.text
start:
        ldi  r16, 0x5a
        ldi  r17, 0x5a
        cpse r16, r17
        adiw r24, 0x0f // <--if 0x0e or 0x0d, skip to nop;2, else skip to nop;1  
        nop; 1
        nop; 2
        nop; 3

commands:
$ avr-gcc -c -x assembler-with-cpp -mmcu=atmega128 -Wa,-D,-g,--gstabs test.S -o test.o
$ avr-ld test.o -o test.elf -g -mavr51
$ simavr -t -g -v -m atmega128 -f 16000000 test.elf
$ avr-gdb test.elf
(gdb) target remote :1234
Remote debugging using :1234
start () at test.S:4
4 ldi  r16, 0x5a
(gdb) s
5 ldi  r17, 0x5a
(gdb) s
6 cpse r16, r17
(gdb) s
9 nop; 2 <-------------skip two words?
(gdb) 

version:
gcc-avr 5.4
GNU ld (GNU Binutils) 2.26.20160125
gdb-avr 7.7-4
simavr 1.5

OS:
Linux Mint 19



GilesA

unread,
Apr 8, 2021, 6:17:09 AM4/8/21
to simavr
Not reproducible, at least not with the code in my fork.
Reply all
Reply to author
Forward
0 new messages