change makefile for a VEX benchmark to use in LLVM-to-VEX chain
Hi Everyone,
The thing I would like to do is changing a benchmark Makefile; to be precise "H264decoder", which is placed inside the VEX open-source compiler "apps" folder; in a way that I can reuse it in my so-far built automated scripts. My scripts gett the .c file as the input and enter it to a chain of LLVM-to-VEX compilation with optimization parameters. The only difference between the (gsm.c) becnhmark (which I already did) and the new one is that h264decoder has lots of inter-nested source and header files in which practically there won't be an easy way to combine them into just one clean file ( I tried, you can see the the thread still opens after a month here : Code:
http://www.linuxquestions.org/questions/programming-9/combining-a-project-with-multiple-c-file-into-one-c-947142/ my Scripts: Code:
######################################################### H264- VEX Makefile (Uses the VEX cc): Code:
### 1- get the parameters 2- Compile with LLVM (with the mentioned -o levels) 3- get the transformed files 4- input and compile with VEX 5- ./RUN 6- get the log file BUT, h264 has to be like this: 1- get the parameters 2- for each of the .c files (around 10-15 files) { - Compile with LLVM - get the transformed file - input and compile with VEX } 3- ./RUN 4- get the log file Appreciate your help ;) Amir |
First some general comments:
Code:
sed -i 's/0ull/0ul/g' opt/llvm_transformed.c Code:
sed -i 's/\([0-9]\)ull/\1ul/g' opt/llvm_transformed.c Code:
echo "C to Vex" # this is really "C to Vex obj" Code:
for cfile in opt/*.c ; do |
Thanks ntubski for the reply.
I think the loop part seems fine but as I traced the error, the execution fails in the Code:
echo "Compiling\n" Code:
annexb.c cabac.c erc_do_i.c filehandle.c image.c loopFilter.c mbuffer.c nal.c output.c quant.c tmp vlc.c Thanks, Amir |
Oh Sorry, I forgot to comment the first remaining line (mv opt/*.c opt/llvm_transformed.c) , you nicely included those loop in your codes before as I saw now ;)
I executed the iterations, these are the errors now: Code:
Compiling Amir |
It's hard to say much without seeing the actual C code, but I would guess that
Code:
error: value too large to represent |
1 Attachment(s)
I see ;)
Here I attached the .c file. (opt/llvm_transformed_annexb.c) Thanks for your time my friend. Amir |
Quote:
Is the Vex a 16bit machine? It looks like the code assumes ints are 32bit. |
1 Attachment(s)
Sorry man, the point is I think, i attached the wrong file. Since each iteration error's line is different from the other!!
so this is the new errors : Code:
C to C Thanks ;) Amir |
The line numbers are still a little off it seems.
Code:
line 1583: error: value too large to represent Code:
*(&pBuf_OC_5251) = ((&llvm_cbe_tmp__65[((signed long long )18446744073709551615ul)])); Then there's the Code:
error: redeclaration of formal parameter, X |
I see, then what do you suggest to do in case of fixing this problem ?
Didn't we add Code:
sed -i 's/\([0-9]\)ull/\1ul/g' "$llvm_cfile" Best, Amir |
Quote:
|
I just took a look at the h264 MakeFile ( you can see in my first question above), there is a parameter names :
"DBG?= 0 ### Generate 32 bit executable : 1=yes, 0=no" Do you if I place the actual MakeFile of h264 inside our (HOW ?!) loop script and set this DBG =1 the problem will be solved ?? Best, Amir |
The comment goes with following code line, not the preceding:
Code:
### Generate 32 bit executable : 1=yes, 0=no You never explained why you have the sed ull --> ul thing in the first place; did you try removing it? |
As far as I know, we used this to change from unsigned long long to long format in case of inputting them into vex which has the 32bit input architecture, but I don't know why it is working with gsm.c but not with h264, the point is I am using the h264decoder which is placed inside the vex embedded benchmarks, so it should be a problem with my scripts because when I directly use the make command, the MakeFile use the cc of the vex and make it without any problem...
Amir |
Quote:
Quote:
|
All times are GMT -5. The time now is 02:24 AM. |