From 87617b588a88453ac6a3d3df6e56c494e8106e5d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 15 Jan 2017 01:27:01 +0100 Subject: [PATCH] - some minor optimization in the VM. --- src/scripting/vm/vmexec.h | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/scripting/vm/vmexec.h b/src/scripting/vm/vmexec.h index 1d685c69c..51c224649 100644 --- a/src/scripting/vm/vmexec.h +++ b/src/scripting/vm/vmexec.h @@ -399,21 +399,30 @@ begin: reg.s[a] = reg.s[B]; NEXTOP; OP(MOVEA): + { ASSERTA(a); ASSERTA(B); - reg.a[a] = reg.a[B]; - reg.atag[a] = reg.atag[B]; + int b = B; + reg.a[a] = reg.a[b]; + reg.atag[a] = reg.atag[b]; NEXTOP; + } OP(MOVEV2): + { ASSERTF(a); ASSERTF(B); - reg.f[a] = reg.f[B]; - reg.f[a+1] = reg.f[B+1]; + int b = B; + reg.f[a] = reg.f[b]; + reg.f[a + 1] = reg.f[b + 1]; NEXTOP; + } OP(MOVEV3): + { ASSERTF(a); ASSERTF(B); - reg.f[a] = reg.f[B]; - reg.f[a+1] = reg.f[B+1]; - reg.f[a+2] = reg.f[B+2]; + int b = B; + reg.f[a] = reg.f[b]; + reg.f[a + 1] = reg.f[b + 1]; + reg.f[a + 2] = reg.f[b + 2]; NEXTOP; + } OP(DYNCAST_R) : ASSERTA(a); ASSERTA(B); ASSERTA(C); b = B;