- add blur-opcode and all its variations into the Makefile
This commit is contained in:
parent
0995c43dd6
commit
5605922ddc
@ -1,12 +1,13 @@
|
||||
all: blur
|
||||
all: blur-no-opt blur-opcode
|
||||
|
||||
|
||||
blur: blur.c
|
||||
blur-no-opt: blur.c blur-opcode.c
|
||||
gcc -S blur.c -o blur.s
|
||||
gcc -o blur-no-opt blur.c
|
||||
gcc -O2 -S blur.c -o blur-O2.s
|
||||
gcc -O2 -o blur-O2 blur.c
|
||||
gcc -O2 -pg -fprofile-arcs -ftest-coverage blur.c -o blur-profile
|
||||
gcc -O2 -DBLUR_UNROLL_INNER -o blur-O2-unroll blur.c
|
||||
gcc -O2 -DBLUR_UNROLL_INNER -o blur-O2-unroll.s -S blur.c
|
||||
gcc -O2 -DBLUR_USE_FUNCTION_CALL -o blur-O2-func blur.c
|
||||
gcc -O2 -DBLUR_USE_FUNCTION_CALL -o blur-O2-func.s -S blur.c
|
||||
gcc -O2 -DBLUR_USE_SWITCH -o blur-O2-switch blur.c
|
||||
@ -17,6 +18,33 @@ blur: blur.c
|
||||
gcc -O2 -DBLUR_FNPTR_SWITCH -o blur-O2-fnptr-switch.s -S blur.c
|
||||
gcc -O2 -DBLUR_FNPTR_TABLE -o blur-O2-fnptr-table blur.c
|
||||
gcc -O2 -DBLUR_FNPTR_TABLE -o blur-O2-fnptr-table.s -S blur.c
|
||||
gcc -O2 -DBLUR_USE_SWITCH -o blur-O2-opcode-switch blur-opcode.c
|
||||
gcc -O2 -DBLUR_USE_SWITCH -o blur-O2-opcode-switch.s -S blur-opcode.c
|
||||
gcc -O2 -DBLUR_USE_FNPTR -o blur-O2-opcode-fnptr blur-opcode.c
|
||||
gcc -O2 -DBLUR_USE_FNPTR -o blur-O2-opcode-fnptr.s -S blur-opcode.c
|
||||
gcc -O2 -DBLUR_TRANSLATED1 -o blur-O2-opcode-translated1 blur-opcode.c
|
||||
gcc -O2 -DBLUR_TRANSLATED1 -o blur-O2-opcode-translated1.s -S blur-opcode.c
|
||||
gcc -O2 -DBLUR_TRANSLATED2 -o blur-O2-opcode-translated2 blur-opcode.c
|
||||
gcc -O2 -DBLUR_TRANSLATED2 -o blur-O2-opcode-translated2.s -S blur-opcode.c
|
||||
gcc -O2 -DBLUR_TRANSLATED3 -o blur-O2-opcode-translated3 blur-opcode.c
|
||||
gcc -O2 -DBLUR_TRANSLATED3 -o blur-O2-opcode-translated3.s -S blur-opcode.c
|
||||
|
||||
run-all::
|
||||
./blur-no-opt
|
||||
./blur-O2
|
||||
./blur-O2-unroll
|
||||
./blur-O2-func
|
||||
./blur-O2-switch
|
||||
./blur-O2-switch-call
|
||||
./blur-O2-fnptr-switch
|
||||
./blur-O2-fnptr-table
|
||||
./blur-O2-opcode-switch
|
||||
./blur-O2-opcode-translated1
|
||||
./blur-O2-opcode-translated2
|
||||
./blur-O2-opcode-translated3
|
||||
|
||||
blur-opcode: blur-opcode.c
|
||||
gcc -g blur-opcode.c -o blur-opcode
|
||||
|
||||
clean::
|
||||
rm -rf *.o *.s blur-no-opt blur-O* blur-profile gmon.out blur.out *.bb *.bbg *.da *.gcov
|
||||
|
@ -196,3 +196,17 @@ blur:
|
||||
.Lfe1:
|
||||
.size blur,.Lfe1-blur
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
----------------------------------
|
||||
|
||||
|
||||
blur-opcode.c
|
||||
|
||||
In a past email, I described a way to use gcc and gas to produce
|
||||
native code, so that Bochs would not need its own code generator for
|
||||
every supported platform. I will attempt a proof of concept here.
|
||||
|
||||
I will try to create a system in which snippets of C++ code can be compiled
|
||||
by gcc, then extracted to form a chunk of native binary code. The chunks
|
||||
will be designed so that they can be pasted together efficiently.
|
||||
|
||||
I haven't tried anything like this before....
|
||||
|
Loading…
Reference in New Issue
Block a user