aboutsummaryrefslogtreecommitdiff
path: root/elymas
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2015-05-28 17:00:08 +0200
committerDrahflow <drahflow@gmx.de>2015-05-28 17:00:08 +0200
commit30d0ce33136b06ba804790951c4a26194aac06fa (patch)
tree19c415ce6cf9dbbfcba55175c941955b3273330f /elymas
parent09656b0290c331a497b11cfd1a31976f1debd821 (diff)
Inlined logical or as well
Diffstat (limited to 'elymas')
-rw-r--r--elymas/lib/sys/opt.ey46
1 files changed, 42 insertions, 4 deletions
diff --git a/elymas/lib/sys/opt.ey b/elymas/lib/sys/opt.ey
index 8316e27..ffdae28 100644
--- a/elymas/lib/sys/opt.ey
+++ b/elymas/lib/sys/opt.ey
@@ -200,6 +200,46 @@
@done
]] ] ==:INLINEBLOCKAND
+ [ NATIVENOSCOPE [[
+ /rcx :popqReg
+ /rdx :popqReg
+
+ /rcx /rax :movqRegReg
+ /rdx /rbp :movqRegReg
+
+ 63 /rax :btrqImm8Reg
+ /nonInlineCase :jncLbl8
+ 63 /rbp :btrqImm8Reg
+ /nonInlineCase :jncLbl8
+
+ /rax /rax :testqRegReg
+ /positive :jnzLbl8
+ /rbp /rbp :testqRegReg
+ /positive :jnzLbl8
+
+ /rax /rax :xorqRegReg
+ 63 /rax :btsqImm8Reg
+ /rax :pushqReg
+ /done :jmpLbl8
+
+ @positive
+ 1 /rax :movqImmReg
+ 63 /rax :btsqImm8Reg
+ /rax :pushqReg
+ /done :jmpLbl8
+
+ @nonInlineCase
+ /rdx :pushqReg
+ /rcx :pushqReg
+
+ |and ::rawAddress /rax :movqImmReg
+ /rax :pushqReg
+ "*" | ::rawCodeAddress /rax :movqImmReg
+ /rax :callqReg
+
+ @done
+ ]] ] ==:INLINEBLOCKOR
+
{ ==negatedOpcodeName ==functionName
[ NATIVENOSCOPE [[
/rcx :popqReg
@@ -644,10 +684,8 @@
{ 0 last * PUSH eq }' andif
{
[
- { 1 last * |and ::rawAddress eq }' {
- INLINEBLOCKAND i logic =[]
- [ NOP ] i 1 sub logic =[]
- }
+ { 1 last * |and ::rawAddress eq }' { INLINEBLOCKAND i logic =[] [ NOP ] i 1 sub logic =[] }
+ { 1 last * |or ::rawAddress eq }' { INLINEBLOCKOR i logic =[] [ NOP ] i 1 sub logic =[] }
{ 1 last * |eq ::rawAddress eq }' { INLINEBLOCKEQ i logic =[] [ NOP ] i 1 sub logic =[] }
{ 1 last * |neq ::rawAddress eq }' { INLINEBLOCKNEQ i logic =[] [ NOP ] i 1 sub logic =[] }