[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] Xilinx QUIZ: 4=4 or 4=3 ?? EDK C compiler bugs again !!



please mercy -
working too hard seeing ripples
sure its the \n that makes the second printout to disappear!

anttti

----- Original Message ----- 
From: "Antti Lukats" <lukats@eubus.net>
To: <microblaze-uclinux@itee.uq.edu.au>
Sent: Monday, June 13, 2005 2:03 PM
Subject: [microblaze-uclinux] Xilinx QUIZ: 4=4 or 4=3 ?? EDK C compiler bugs
again !!


> just posting here too,
>
> -----------------------------------------------------
>
> A small Quiz, for C programmers
>
> ****** c code starts here *****
>  temp = docrc(temp2);
>  xil_printf("CRC: %08X\r",temp);
>  temp = docrc(temp2+1);
>  xil_printf("CRC: %08X\r",temp);
>
> xil_printf("\r\n-- 1");
>  temp = docrc(temp2);
>  xil_printf("CRC: %08X\r",temp);
> xil_printf("\r\n-- 2");
>  temp = docrc(temp2+1);
>  xil_printf("CRC: %08X\r",temp);
> xil_printf("\r\n-- 3");
>
> ****** c code ends here *****
>
> the above c program should print "CRC: " how many times?
> did you guess 4?
>
> wrong! Correct answer is 3 if the code is compiled with microblaze GCC
> provided by Xilinx, here is the terminal log:
>
> ******  terminal log starts here *****
> CRC: 53EE6CD2
> -- 1CRC: 1142FDE5
> -- 2CRC: 53EE6CD2
> -- 3
> ****** terminal log ends here *****
>
> the first printout is defenetly missing. I am not dreaming, another person
> did verify the c code and terminal print.
>
> This is exactly the same kind of problem I had with mb gcc llooooong time
> ago, then I also was forced to add
>
> call_donothing_bullshit();
>
> in some places of my code! thoes where really dummy call's but without
them
> the code did not work.
>
> I did expect this kind of problem not to exist any more. But now I dont
> wonder any more why John Williams can not use EDK 7.1 GCC for uClinux
> compiling, if such type of bugs exist I would be real surprised if the
> compiled linux kernel would work
>
> Antti
> PS I will ZIP the full project archive and send to some Xilinx personel if
> they are interested, but I am not opening a webcase. Even if the webcase
> management takes only 30 minutes of my time. I dont have that time right
now
> (to be wasted).
>
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@itee.uq.edu.au
> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> Mailing List Archive :
http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/