[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Success running the testsuite with avrtest
From: |
Dmitry K. |
Subject: |
Re: [avr-gcc-list] Success running the testsuite with avrtest |
Date: |
Wed, 16 Jan 2008 17:05:17 +1000 |
User-agent: |
KMail/1.5 |
Hi Paulo, hi all.
Very good work!
Possible, you are work with 4.2.2 ?
And is it possible to apply yours 'avrtest' to
avr-gcc 4.1.2 version?
I have try quickly, results are strange: unexpected
abort in both small programs (avr-gcc 4.1.2, -Os,
-mmcu=atmega128).
Below are both programs with compiler listing.
Regards,
Dmitry.
----------------------------------------------------------
#define ABORT_PORT 0x49
#define abort() do { *(volatile char *)ABORT_PORT = 0; } while (0)
int main ()
{
volatile unsigned char a = 1, b = 255;
unsigned char c;
if ((c = a + b) != 0) abort ();
return 0;
}
----------------------------------------------------------
.file "add.c"
__SREG__ = 0x3f
__SP_H__ = 0x3e
__SP_L__ = 0x3d
__tmp_reg__ = 0
__zero_reg__ = 1
.global __do_copy_data
.global __do_clear_bss
.text
.global main
.type main, @function
main:
/* prologue: frame size=2 */
ldi r28,lo8(__stack - 2)
ldi r29,hi8(__stack - 2)
out __SP_H__,r29
out __SP_L__,r28
/* prologue end (size=4) */
ldi r24,lo8(1)
std Y+1,r24
ldi r24,lo8(-1)
std Y+2,r24
ldd r25,Y+1
ldd r24,Y+2
add r24,r25
breq .L2
out 73-0x20,__zero_reg__
.L2:
ldi r24,lo8(0)
ldi r25,hi8(0)
/* epilogue: frame size=2 */
jmp exit
/* epilogue end (size=2) */
/* function main size 18 (12) */
.size main, .-main
/* File "add.c": code 18 = 0x0012 ( 12), prologues 4, epilogues 2 */
---------------------------------------------------------------
#define ABORT_PORT 0x49
#define abort() do { *(volatile char *)ABORT_PORT = 0; } while (0)
int main ()
{
volatile int a = 2, b = 1;
if (a == b) abort ();
return 0;
}
---------------------------------------------------------------
.file "cmp.c"
.arch atmega128
__SREG__ = 0x3f
__SP_H__ = 0x3e
__SP_L__ = 0x3d
__tmp_reg__ = 0
__zero_reg__ = 1
.global __do_copy_data
.global __do_clear_bss
.text
.global main
.type main, @function
main:
/* prologue: frame size=4 */
ldi r28,lo8(__stack - 4)
ldi r29,hi8(__stack - 4)
out __SP_H__,r29
out __SP_L__,r28
/* prologue end (size=4) */
ldi r24,lo8(1)
ldi r25,hi8(1)
std Y+2,r25
std Y+1,r24
ldi r24,lo8(2)
ldi r25,hi8(2)
std Y+4,r25
std Y+3,r24
ldd r18,Y+1
ldd r19,Y+2
ldd r24,Y+3
ldd r25,Y+4
cp r18,r24
cpc r19,r25
brne .L2
out 73-0x20,__zero_reg__
.L2:
ldi r24,lo8(0)
ldi r25,hi8(0)
/* epilogue: frame size=4 */
jmp exit
/* epilogue end (size=2) */
/* function main size 24 (18) */
.size main, .-main
/* File "cmp.c": code 24 = 0x0018 ( 18), prologues 4, epilogues 2 */
- [avr-gcc-list] Success running the testsuite with avrtest, Paulo Marques, 2008/01/15
- Re: [avr-gcc-list] Success running the testsuite with avrtest,
Dmitry K. <=
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Paulo Marques, 2008/01/16
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Dmitry K., 2008/01/16
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Paulo Marques, 2008/01/16
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Paulo Marques, 2008/01/16
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Paulo Marques, 2008/01/17
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Dmitry K., 2008/01/17
- Re: [avr-gcc-list] Success running the testsuite with avrtest, Paulo Marques, 2008/01/17
- RE: [avr-gcc-list] Success running the testsuite with avrtest, Weddington, Eric, 2008/01/17