Verified Commit 9d771134 authored by Bernd Paysan's avatar Bernd Paysan

Merge branch 'master' of git.sv.gnu.org:/srv/git/gforth

parents 44e1523b 800eb28b
Pipeline #1304 passed with stage
in 15 minutes and 13 seconds
......@@ -90,20 +90,47 @@ explicit register allocation and efforts to stop coalescing.
*/
#if defined(FORCE_REG) && !defined(DOUBLY_INDIRECT) && !defined(VM_PROFILING)
/* tested with gcc 4.4, 4.6, 4.7, 4.8, 5.2 */
#define RPREG asm("%r13")
/* tested with gcc 4.4, 4.8, 4.9, 7.4, 8.3 */
#define FPREG asm("%r12")
#define TOSREG asm("%r14")
# define SPREG asm("%r15")
# define IPREG asm("%rbx")
#if ((__GNUC__==4 && defined(__GNUC_MINOR__) && __GNUC_MINOR__>=6) || (__GNUC__>=5))
#define LPREG asm("%rbp") /* inefficient wit gcc-4.4 */
#define LPREG asm("%rbp") /* inefficient with gcc-4.4 */
#endif
#define FTOSREG asm("%xmm15")
#ifdef __clang__
/* maybe we need some other options for clang */
/* but so far, clang doesn't support manual register allocation */
#endif
/* Results of explicit register allocation
for i in 4.4 4.9 7.4 8.3; do echo $i; perf stat -x' ' -e cycles:u -e instructions:u gforth-fast-reg-$i onebench.fs >/dev/null; perf stat -x' ' -e cycles:u -e instructions:u gforth-fast-newreg-$i onebench.fs >/dev/null; done
For various gcc versions; the upper results are with the old explicit
register allocation, the lower results with this one:
Haswell Zen2 Goldmont
4.4 4.4 4.4
1471993782 cycles:u 1331162435 2338608502
3829917395 instructions:u 3828147564 3829372879
1431364615 cycles:u 1274677422 2228754145
3372490900 instructions:u 3370798243 3371941456
4.9 4.9 4.9
1388148914 cycles:u 1242016559 2169850504
3295249015 instructions:u 3293099054 3294788843
1403757388 cycles:u 1267331033 2185304203
3400541439 instructions:u 3398124383 3400032204
7.4 7.4 7.4
1433156560 cycles:u 1252978107 2212397812
3376331020 instructions:u 3374174822 3375864973
1411925157 cycles:u 1261224513 2137450203
3216957194 instructions:u 3214914874 3216485013
8.3 8.3 8.3
1386077004 cycles:u 1239162675 2170227276
3295249024 instructions:u 3293098814 3294788948
1386562707 cycles:u 1253242147 2152653048
3204296317 instructions:u 3202150063 3203823888
*/
#endif
#define GOTO_ALIGN asm(".p2align 4,,7");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment