LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   change makefile for a VEX benchmark to use in LLVM-to-VEX chain (https://www.linuxquestions.org/questions/programming-9/change-makefile-for-a-vex-benchmark-to-use-in-llvm-to-vex-chain-4175416535/)

AmirJamez 07-13-2012 10:24 AM

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/
So to wrap up the question, Does anyone can help me change this part of my scripts (which was for gsm.c- one file) and use the h264 makefile of VEX to do the same for h264 ?

my Scripts:
Code:

#########################################################

echo "Compiling\n"
mkdir -p log bin opt opt/tmp
echo "C to C"

/home/user/gw_opt_order/tools/C2C/C-opt-C.sh -c opt.cfg -s $TARGET_FILE_DIR  -w opt/tmp -o opt > log/swat_opt.log 2>&1

mv opt/*.c opt/llvm_transformed.c
#mv opt/ldecod.c opt/llvm_transformed.c

#sed -i 's/signed long long/unsigned long/g' opt/llvm_transformed.c
sed -i 's/0ull/0ul/g' opt/llvm_transformed.c
sed -i 's/1ull/1ul/g' opt/llvm_transformed.c
sed -i 's/2ull/2ul/g' opt/llvm_transformed.c
sed -i 's/3ull/3ul/g' opt/llvm_transformed.c
sed -i 's/4ull/4ul/g' opt/llvm_transformed.c
sed -i 's/5ull/5ul/g' opt/llvm_transformed.c
sed -i 's/6ull/6ul/g' opt/llvm_transformed.c
sed -i 's/7ull/7ul/g' opt/llvm_transformed.c
sed -i 's/8ull/8ul/g' opt/llvm_transformed.c
sed -i 's/9ull/9ul/g' opt/llvm_transformed.c

echo "C to Vex"
#/home/user/VEX/vex-3.43/bin/cc -ms -O1 -c99inline -fmm=MachConf.mm -I/usr/include/ -c opt/llvm_transformed.c > log/vex.log 2>&1
/home/user/VEX/vex-3.43/bin/cc -ms -O1 -c99inline -fmm=MachConf.mm -I/usr/include/ -c opt/llvm_transformed.c
echo "Vex to obj"
/home/user/VEX/vex-3.43/bin/cc -o bin/run_inst llvm_transformed.o -lm
bin/run_inst


H264- VEX Makefile (Uses the VEX cc):
Code:

###
###    Makefile for H.264/AVC decoder
###
###            generated for UNIX/LINUX environments
###            by H. Schwarz, Limin Wang
###

NAME=  ldecod

### include debug information: 1=yes, 0=no
DBG?= 0
### Generate 32 bit executable : 1=yes, 0=no
M32?= 0
### include O level optimization : 0-3
OPT?= 3
### Static Compilation
STC?= 0

DEPEND= dependencies

BINDIR= .
INCDIR= inc
SRCDIR= src
OBJDIR= obj


# CC=/home/opt/vex/vex-3.42/bin/cc
CC=/home/user/VEX/vex-3.43/bin/cc
CFLAGS= -O3 -mfinline -ms -mP1COPT_inline_limit=1000000 -mas_G -ms -mas_g
# CFLAGS= -O3 -mas_G -ms -mas_g
# CC = gcc
# CFLAGS = -O2 -g
LIBS= -lm
FLAGS=  $(CFLAGS) -I$(INCDIR)

OPT_FLAG = -O$(OPT)
ifeq ($(DBG),1)
SUFFIX= .dbg
FLAGS+= -g
else
SUFFIX=
FLAGS+= $(OPT_FLAG)
endif

OBJSUF= .o$(SUFFIX)

SRC=    $(wildcard $(SRCDIR)/*.c)
ADDSRC= $(wildcard $(ADDSRCDIR)/*.c)
OBJ=    $(SRC:$(SRCDIR)/%.c=$(OBJDIR)/%.o$(SUFFIX)) $(ADDSRC:$(ADDSRCDIR)/%.c=$(OBJDIR)/%.o$(SUFFIX))
BIN=    $(BINDIR)/$(NAME)$(SUFFIX).exe

.PHONY: default distclean clean depend

default: messages objdir_mk depend bin

messages:
ifeq ($(M32),1)
        @echo 'Compiling with M32 support...'
endif
ifeq ($(DBG),1)
        @echo 'Compiling with Debug support...'
        @echo 'Note static compilation not supported in this mode.'
endif
ifeq ($(STC),1)
        @echo 'Compiling with -static support...'
endif

clean:
        @echo remove all objects
        @rm -rf $(OBJDIR) *.s *.cs.c ta.log.* $(BIN)

bin:    $(OBJ)
        @echo
        @echo 'creating binary "$(BIN)"'
        @$(CC) $(CFLAGS) -o $(BIN) $(OBJ) $(LIBS)
        @echo '... done'
        @echo

depend:
        echo 'checking dependencies'; \
        $(SHELL) -ec '$(CC) $(AFLAGS) -MM $(CFLAGS) -I$(INCDIR) $(SRC) $(ADDSRC)                  \
        | sed '\''s@\(.*\)\.o[ :]@$(OBJDIR)/\1.o$(SUFFIX):@g'\''              \
        >$(DEPEND)'; \

$(OBJDIR)/%.o$(SUFFIX): $(SRCDIR)/%.c
        @echo 'compiling object file "$@" ...'
        $(CC) -c -o $@ $(FLAGS) $<

$(OBJDIR)/%.o$(SUFFIX): $(ADDSRCDIR)/%.c
        @echo 'compiling object file "$@" ...'
        $(CC) -c -o $@ $(FLAGS) $<

objdir_mk:
        @echo 'Creating $(OBJDIR) ...'
        @mkdir -p $(OBJDIR)

test: $(BIN)
        cd test; ../$(BIN) tiny.cfg

-include $(DEPEND)

So the Gsm.c was run like this:

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

ntubski 07-13-2012 12:29 PM

First some general comments:
Code:

sed -i 's/0ull/0ul/g' opt/llvm_transformed.c
sed -i 's/1ull/1ul/g' opt/llvm_transformed.c
sed -i 's/2ull/2ul/g' opt/llvm_transformed.c
sed -i 's/3ull/3ul/g' opt/llvm_transformed.c
sed -i 's/4ull/4ul/g' opt/llvm_transformed.c
sed -i 's/5ull/5ul/g' opt/llvm_transformed.c
sed -i 's/6ull/6ul/g' opt/llvm_transformed.c
sed -i 's/7ull/7ul/g' opt/llvm_transformed.c
sed -i 's/8ull/8ul/g' opt/llvm_transformed.c
sed -i 's/9ull/9ul/g' opt/llvm_transformed.c

Can be replaced with
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"
#/home/user/VEX/vex-3.43/bin/cc -ms -O1 -c99inline -fmm=MachConf.mm -I/usr/include/ -c opt/llvm_transformed.c > log/vex.log 2>&1
/home/user/VEX/vex-3.43/bin/cc -ms -O1 -c99inline -fmm=MachConf.mm -I/usr/include/ -c opt/llvm_transformed.c
echo "Vex to obj" # this is really "Vex obj to Vex executable"
/home/user/VEX/vex-3.43/bin/cc -o bin/run_inst llvm_transformed.o -lm
bin/run_inst

Putting the transformation and compilation in a loop should go something like this (untested):
Code:

for cfile in opt/*.c ; do
  llvm_cfile=opt/llvm_transformed_$(basename "$cfile")
  mv "$cfile" "$llvm_cfile"

  sed -i 's/\([0-9]\)ull/\1ul/g' "$llvm_cfile"

  echo "C to Vex obj"
  /home/user/VEX/vex-3.43/bin/cc -ms -O1 -c99inline -fmm=MachConf.mm -I/usr/include/ -c "$llvm_cfile"
done
echo "Vex objs to Vex executable"
/home/user/VEX/vex-3.43/bin/cc -o bin/run_inst llvm_transformed_*.o -lm
bin/run_inst


AmirJamez 07-13-2012 07:36 PM

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"
mkdir -p log bin opt opt/tmp
echo "C to C"

/home/user/gw_opt_order/tools/C2C/C-opt-C.sh -c opt.cfg -s $TARGET_FILE_DIR  -w opt/tmp -o opt > log/swat_opt.log 2>&1

mv opt/*.c opt/llvm_transformed.c
#mv opt/ldecod.c opt/llvm_transformed.c

phase, since h264 generates near 30 .c files, but here it supposed to be just one ( since it was for gsm.c), the .c files are :
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
biaridecod.c  context_ini.c  erc_do_p.c          fmo.c        ldecod.c        macroblock.c  mc_prediction.c  nalu.c        parset.c        rtp.c    transform8x8.c  win32.c
block.c      erc_api.c      errorconcealment.c  header.c      leaky_bucket.c  mb_access.c  memalloc.c      nalucommon.c  parsetcommon.c  sei.c    transform.c

I think we have to find a way to make them llvm_transformed_#[1,30] and change the long-long to long format, then use a new loop for LLVM-to-VEX.

Thanks,

Amir

AmirJamez 07-13-2012 07:57 PM

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

C to C
C to Vex obj
opt/llvm_transformed_annexb.c:30: warning: `__attribute__' redefined
/usr/include/sys/cdefs.h:200: warning: this is the location of the previous definition
"opt/llvm_transformed_annexb.c", line 1416: warning: loop not entered at top
"opt/llvm_transformed_annexb.c", line 1435: warning: statement not reached
"opt/llvm_transformed_annexb.c", line 1445: warning: loop not entered at top
"opt/llvm_transformed_annexb.c", line 1521: warning: statement not reached
"opt/llvm_transformed_annexb.c", line 1597: warning: loop not entered at top
"opt/llvm_transformed_annexb.c", line 1631: warning: loop not entered at top
"opt/llvm_transformed_annexb.c", line 1658: warning: statement not reached
"opt/llvm_transformed_annexb.c", line 1670: warning: loop not entered at top
"opt/llvm_transformed_annexb.c", line 1713: warning: loop not entered at top
"opt/llvm_transformed_annexb.c", line 1740: warning: statement not reached
"opt/llvm_transformed_annexb.c", line 1814: warning: statement not reached
"opt/llvm_transformed_annexb.c", line 1824: error: value too large to represent
"opt/llvm_transformed_annexb.c", line 1833: warning: loop not entered at top
"opt/llvm_transformed_annexb.c", line 1839: error: value too large to represent
"opt/llvm_transformed_annexb.c", line 1848: warning: statement not reached
"opt/llvm_transformed_annexb.c", line 1884: error: value too large to represent
"opt/llvm_transformed_annexb.c", line 1893: warning: loop not entered at top
"opt/llvm_transformed_annexb.c", line 1899: error: value too large to represent
"opt/llvm_transformed_annexb.c", line 1908: warning: statement not reached
"opt/llvm_transformed_annexb.c", line 1987: error: parameter of incompatible type passed to arg `1'
"opt/llvm_transformed_annexb.c", line 904: error: redeclaration of formal parameter, llvm_cbe_fn
"opt/llvm_transformed_annexb.c", line 1020: warning: illegal combination of pointer and integer, op ==
"opt/llvm_transformed_annexb.c", line 1020: warning: illegal combination of pointer and integer, op ==
"opt/llvm_transformed_annexb.c", line 1021: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1021: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1021: warning: illegal combination of pointer and integer, op !=
"opt/llvm_transformed_annexb.c", line 1021: warning: illegal combination of pointer and integer, op !=
"opt/llvm_transformed_annexb.c", line 1022: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1022: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1022: warning: illegal combination of pointer and integer, op ==
"opt/llvm_transformed_annexb.c", line 1023: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1023: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1023: warning: illegal combination of pointer and integer, op !=
"opt/llvm_transformed_annexb.c", line 1024: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1024: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1024: warning: illegal combination of pointer and integer, op <
"opt/llvm_transformed_annexb.c", line 1025: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1025: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1025: warning: illegal combination of pointer and integer, op >
"opt/llvm_transformed_annexb.c", line 1026: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1026: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1026: warning: illegal combination of pointer and integer, op <=
"opt/llvm_transformed_annexb.c", line 1027: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1027: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1027: warning: illegal combination of pointer and integer, op >=
"opt/llvm_transformed_annexb.c", line 1028: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1028: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1028: warning: illegal combination of pointer and integer, op ==
"opt/llvm_transformed_annexb.c", line 1029: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1029: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1029: warning: illegal combination of pointer and integer, op !=
"opt/llvm_transformed_annexb.c", line 1030: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1030: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1030: warning: illegal combination of pointer and integer, op <
"opt/llvm_transformed_annexb.c", line 1031: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1031: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1031: warning: illegal combination of pointer and integer, op >
"opt/llvm_transformed_annexb.c", line 1032: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1032: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1032: warning: illegal combination of pointer and integer, op <=
"opt/llvm_transformed_annexb.c", line 1033: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1033: compiler error: too many errors
 --(MGW)-->  WARNING Execution Failed

Thanks for your time buddy ;)

Amir

ntubski 07-14-2012 10:04 AM

It's hard to say much without seeing the actual C code, but I would guess that
Code:

error: value too large to represent
is caused by unsigned long long --> unsigned long transformation.

AmirJamez 07-14-2012 11:47 AM

1 Attachment(s)
I see ;)

Here I attached the .c file. (opt/llvm_transformed_annexb.c)

Thanks for your time my friend.

Amir

ntubski 07-14-2012 01:04 PM

Quote:

Originally Posted by AmirJamez (Post 4728065)
Here I attached the .c file. (opt/llvm_transformed_annexb.c)

The line numbers in the error messages don't seem to match up to the file you attached. The error messages mention line 1987, but there are only 1938 lines in the file you attached.

Is the Vex a 16bit machine? It looks like the code assumes ints are 32bit.

AmirJamez 07-14-2012 06:17 PM

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
C to Vex obj
opt/llvm_transformed_annexb.c:30: warning: `__attribute__' redefined
/usr/include/sys/cdefs.h:200: warning: this is the location of the previous definition
"opt/llvm_transformed_annexb.c", line 1386: warning: loop not entered at top
"opt/llvm_transformed_annexb.c", line 1408: warning: statement not reached
"opt/llvm_transformed_annexb.c", line 1418: warning: loop not entered at top
"opt/llvm_transformed_annexb.c", line 1493: warning: statement not reached
"opt/llvm_transformed_annexb.c", line 1578: warning: loop not entered at top
"opt/llvm_transformed_annexb.c", line 1583: error: value too large to represent
"opt/llvm_transformed_annexb.c", line 1596: warning: statement not reached
"opt/llvm_transformed_annexb.c", line 1617: warning: loop not entered at top
"opt/llvm_transformed_annexb.c", line 1644: warning: loop not entered at top
"opt/llvm_transformed_annexb.c", line 1671: warning: statement not reached
"opt/llvm_transformed_annexb.c", line 1760: warning: loop not entered at top
"opt/llvm_transformed_annexb.c", line 1787: warning: statement not reached
"opt/llvm_transformed_annexb.c", line 1802: warning: statement not reached
"opt/llvm_transformed_annexb.c", line 1819: warning: loop not entered at top
"opt/llvm_transformed_annexb.c", line 1824: error: value too large to represent
"opt/llvm_transformed_annexb.c", line 1837: warning: statement not reached
"opt/llvm_transformed_annexb.c", line 1912: error: parameter of incompatible type passed to arg `1'
"opt/llvm_transformed_annexb.c", line 904: error: redeclaration of formal parameter, llvm_cbe_fn
"opt/llvm_transformed_annexb.c", line 1020: warning: illegal combination of pointer and integer, op ==
"opt/llvm_transformed_annexb.c", line 1020: warning: illegal combination of pointer and integer, op ==
"opt/llvm_transformed_annexb.c", line 1021: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1021: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1021: warning: illegal combination of pointer and integer, op !=
"opt/llvm_transformed_annexb.c", line 1021: warning: illegal combination of pointer and integer, op !=
"opt/llvm_transformed_annexb.c", line 1022: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1022: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1022: warning: illegal combination of pointer and integer, op ==
"opt/llvm_transformed_annexb.c", line 1023: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1023: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1023: warning: illegal combination of pointer and integer, op !=
"opt/llvm_transformed_annexb.c", line 1024: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1024: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1024: warning: illegal combination of pointer and integer, op <
"opt/llvm_transformed_annexb.c", line 1025: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1025: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1025: warning: illegal combination of pointer and integer, op >
"opt/llvm_transformed_annexb.c", line 1026: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1026: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1026: warning: illegal combination of pointer and integer, op <=
"opt/llvm_transformed_annexb.c", line 1027: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1027: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1027: warning: illegal combination of pointer and integer, op >=
"opt/llvm_transformed_annexb.c", line 1028: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1028: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1028: warning: illegal combination of pointer and integer, op ==
"opt/llvm_transformed_annexb.c", line 1029: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1029: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1029: warning: illegal combination of pointer and integer, op !=
"opt/llvm_transformed_annexb.c", line 1030: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1030: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1030: warning: illegal combination of pointer and integer, op <
"opt/llvm_transformed_annexb.c", line 1031: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1031: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1031: warning: illegal combination of pointer and integer, op >
"opt/llvm_transformed_annexb.c", line 1032: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1032: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1032: warning: illegal combination of pointer and integer, op <=
"opt/llvm_transformed_annexb.c", line 1033: error: redeclaration of formal parameter, X
"opt/llvm_transformed_annexb.c", line 1033: error: redeclaration of formal parameter, Y
"opt/llvm_transformed_annexb.c", line 1033: warning: illegal combination of pointer and integer, op >=
"opt/llvm_transformed_annexb.c", line 1047: warning: illegal combination of pointer and integer, op =
"opt/llvm_transformed_annexb.c", line 1048: warning: illegal combination of pointer and integer, op =
"opt/llvm_transformed_annexb.c", line 1059: error: redeclaration of formal parameter, llvm_cbe_a
"opt/llvm_transformed_annexb.c", line 1059: compiler error: too many errors
 --(MGW)-->  WARNING Execution Failed

and attached please consider the corresponding .c file.

Thanks ;)

Amir

ntubski 07-15-2012 10:55 AM

The line numbers are still a little off it seems.
Code:

line 1583: error: value too large to represent
Seems to match line 1581:
Code:

*(&pBuf_OC_5251) = ((&llvm_cbe_tmp__65[((signed long long )18446744073709551615ul)]));
The constant I bolded needs 64 bits to represent, if unsigned long is only 32 bits then your ull --> ul sed transformation will break the code.


Then there's the
Code:

error: redeclaration of formal parameter, X
errors, which appear to be complaining about the llvm_fcmp_*() functions, I can't see why.

AmirJamez 07-15-2012 11:02 AM

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"
in the loop to fix this ? I got confused :|

Best,

Amir

ntubski 07-15-2012 11:47 AM

Quote:

Originally Posted by AmirJamez (Post 4728738)
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"
in the loop to fix this ? I got confused :|

You had the sed transformation in your initial script, I don't know why...

AmirJamez 07-15-2012 02:37 PM

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

ntubski 07-15-2012 05:09 PM

The comment goes with following code line, not the preceding:
Code:

### Generate 32 bit executable : 1=yes, 0=no
M32?= 0

The rest of the Makefile doesn't actually use M32 for anything, so I'm not sure what it's good for. Also it's unclear to me what happens when 32bit is no: do we get a 16bit or 64bit executable?

You never explained why you have the sed ull --> ul thing in the first place; did you try removing it?

AmirJamez 07-15-2012 05:36 PM

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

ntubski 07-15-2012 08:48 PM

Quote:

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
Maybe gsm.c didn't use long long constants so your sed command didn't do anything. In general, I don't think that command makes sense.

Quote:

the MakeFile use the cc of the vex and make it without any problem...
The Makefile is compiling completely different source files, ie the ones before the "C to C" transformation. Perhaps you need to tell C-opt-C.sh to use only 32bit constants (by changing opt.cfg)?


All times are GMT -5. The time now is 02:24 AM.