Mercurial > hg > CbC > CbC_gcc
changeset 40:3367c5a7ec79
modify quicksort for benchmark.
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 Jan 2010 16:51:28 +0900 |
parents | 9117c3b65bc3 |
children | c816ae4380d7 |
files | CbC-examples/quicksort/Makefile CbC-examples/quicksort/quicksort_cbc.cbc |
diffstat | 2 files changed, 5 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/CbC-examples/quicksort/Makefile Mon Jan 25 16:14:42 2010 +0900 +++ b/CbC-examples/quicksort/Makefile Mon Jan 25 16:51:28 2010 +0900 @@ -1,15 +1,15 @@ -CbCC=../../../build_cbc44/INSTALL_DIR/bin/gcc +CbCC=../../../build-gcc/INSTALL_DIR/bin/cbc-gcc #CC=gcc -CC=../../../build_cbc44/INSTALL_DIR/bin/gcc +CC=../../../build-gcc/INSTALL_DIR/bin/cbc-gcc HEADERMAKER=../../CbC-scripts/make_headers.py2 # fastcall版では-O0,-O2は動作確認、-O3以上はだめ -CFLAGS=-g -O2 -fomit-frame-pointer +#CFLAGS=-g -O2 -fomit-frame-pointer #CFLAGS=-g -O2 -#CFLAGS=-g -O0 +CFLAGS=-g -O0 #CFLAGS=-g -Os # an error occurred. .SUFFIXES: .cbc .o
--- a/CbC-examples/quicksort/quicksort_cbc.cbc Mon Jan 25 16:14:42 2010 +0900 +++ b/CbC-examples/quicksort/quicksort_cbc.cbc Mon Jan 25 16:51:28 2010 +0900 @@ -68,8 +68,7 @@ __code quicksort_divider_s(QS_IF *recvif, int s, int e, int p, stack sp) { if (recvif->v[s]<p) { - s++; - goto quicksort_divider_s(recvif, s, e, p, sp); + goto quicksort_divider_s(recvif, s+1, e, p, sp); } else goto quicksort_divider_e(recvif, s, e, p, sp); } @@ -88,8 +87,6 @@ tmp = recvif->v[s]; recvif->v[s] = recvif->v[e]; recvif->v[e] = tmp; - //s++; - //e--; goto quicksort_divider(recvif, s+1, e-1, p, sp); } else { goto quicksort_treecall(recvif, s, e, sp);