Mercurial > hg > CbC > old > device
changeset 811:4c13e6784414
i64 stdarg (is this correct?)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 25 Nov 2010 04:36:27 +0900 |
parents | dc7995497552 |
children | 639064060223 |
files | .gdbinit mc-code-i64.c test/tstdarg.c |
diffstat | 3 files changed, 30 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/.gdbinit Thu Nov 25 03:57:56 2010 +0900 +++ b/.gdbinit Thu Nov 25 04:36:27 2010 +0900 @@ -1,34 +1,37 @@ tb main -r -s test/basic.c define regs -printf "pc =%08x lr =%08x r0 =%08x r1 =%08x r3= %08x r4= %08x\n",$pc,$lr,$r0,$r1,$r3,$r4 -printf "r10=%08x r11=%08x r12=%08x r13=%08x r14=%08x r15=%08x\n",$r10,$r11,$r12,$r13,$r14,$r15 -end -define fregs -printf "f1=%g f2=%g f3=%g f4=%g f5=%g f6=%g\n",$f1,$f2,$f3,$f4,$f5,$f6 -printf "f10=%g f11=%g f12=%g f13=%g f14=%g f15=%g\n",$f10,$f11,$f12,$f13,$f14,$f15 -end -define allreg -printf "pc =%08x lr =%08x r0 =%08x r1 =%08x r3= %08x r4= %08x\n",$pc,$lr,$r0,$r1,$r3,$r4 -printf "r5=%08x r6=%08x r7=%08x r8=%08x r9=%08x\n",$r5,$r6,$r7,$r8,$r9 -printf "r10=%08x r11=%08x r12=%08x r13=%08x r14=%08x r15=%08x\n",$r10,$r11,$r12,$r13,$r14,$r15 -printf "r16=%08x r17=%08x r18=%08x r19=%08x r20=%08x r21=%08x\n",$r10,$r11,$r12,$r13,$r14,$r15 -printf "f1=%g f2=%g f3=%g f4=%g f5=%g f6=%g\n",$f1,$f2,$f3,$f4,$f5,$f6 -printf "f10=%g f11=%g f12=%g f13=%g f14=%g f15=%g\n",$f10,$f11,$f12,$f13,$f14,$f15 -printf "f20=%g f21=%g f22=%g f23=%g f24=%g f25=%g\n",$f20,$f21,$f22,$f23,$f24,$f25 -end -define sh -regs -x/20i $pc-36 +call (void)printf("rax=%08lx rbx=%08lx rcx=%08lx rdx=%08lx\nrsi=%08lx rdi=%08lx rbp=%08lx rsp=%08lx rip=%08lx\n",$rax,$rbx,$rcx,$rdx,$rsi,$rdi,$rbp,$rsp,$rip) end define si stepi regs -x/1i $pc +x/1i $rip end define ni nexti regs -x/1i $pc +x/1i $rip end b errmsg +# r -s test/tmp7.c +# r -s -DINLINE=inline test/tmp7.c +# r -s test/int.c +# r -s test/tmp6.c +# r -s test/call.c +# r -s test/static.c +# r -s test/tmpa.c +# r -s test/code-gen-all.c +# r -s mc-code-powerpc.c +# r -s test/macro.c +# r -s test/basic.c +# r -s test/float.c +# r -s test/strinit.c +# r -s test/bitfield.c +# r -s test/tstdarg.c +r -s test/ps2.c +# r -s test/arg.c +# r -s test/obsf2.c +# r -s test/putenemy.c +# r -s -DINLINE=inline test/code-gen-all.c +# r -s -DINLINE=inline test/strinit.c +# r -s test/fact-a.c
--- a/mc-code-i64.c Thu Nov 25 03:57:56 2010 +0900 +++ b/mc-code-i64.c Thu Nov 25 04:36:27 2010 +0900 @@ -65,7 +65,7 @@ if (__builtin_types_compatible_p(type,double) \\\n\ && ap->float_first < ap->stack_top) { \\\n\ ap->float_first = ap->float_first+8; \\\n\ - if (ap->float_first==ap->float_last) \\\n\ + if (ap->float_first==ap->float_last+16) \\\n\ ap->float_first = ap->stack_top;\\\n\ arg = ap->float_first; \\\n\ } else { \\\n\
--- a/test/tstdarg.c Thu Nov 25 03:57:56 2010 +0900 +++ b/test/tstdarg.c Thu Nov 25 04:36:27 2010 +0900 @@ -3,7 +3,7 @@ #include <stdio.h> #include <stdarg.h> - +#if 0 void print(__builtin_va_list *ap) { @@ -23,6 +23,9 @@ ap->top ); #endif } +#else +#define print(d) +#endif void var_args(char *numtypes, ...)