Permalink
Browse files

Avoid pushf/popf - 25% win

  • Loading branch information...
1 parent b822023 commit 69d38b87dd55a2ba4425421b72cd3488edfb0543 @tadeuzagallo committed May 6, 2016
Showing with 2 additions and 3 deletions.
  1. +2 −3 compiler/interpreter.S
@@ -125,13 +125,11 @@ _op_call:
// check tag
rol $8, %rcx
test $CLOSURE_TAG, %cl
- pushf
- shr $8, %rcx
- popf
jnz _call_closure
jmp _call_builtin
_call_builtin:
+ shr $8, %rcx
push %rdi
ccall *%rcx
pop %rdi
@@ -140,6 +138,7 @@ _call_builtin:
skip $1
_call_closure:
+ shr $8, %rcx
push %BYTECODE
push %rdi
push %rbp

0 comments on commit 69d38b8

Please sign in to comment.