User Tools

Site Tools


sd:code_gremlins

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
sd:code_gremlins [2026/04/01 04:10] appledogsd:code_gremlins [2026/04/01 04:17] (current) appledog
Line 86: Line 86:
 or maybe or maybe
  
-    ^\s+(LD|ADD|SUB|AND|OR|XOR|SHR|SHL)\w*.*\n\s+CMP\s+[A-Za-z]+,\s*[#$]?0\b\n\s+JZ+    ^\s+(LD|ADD|SUB|AND|OR|XOR|SHR|SHL|INC|DEC|MOV)\w*.*\n\s+CMP\s+[A-Za-z]+,\s*[#$]?0\b\n\s+JZ
  
 Surefire cases look like this: Surefire cases look like this:
Line 95: Line 95:
  
 Here, the CMP is always redundant as LD sets Z. Other common ops that set Z; ST, AND, DIV, MOV, INC, DEC... Here, the CMP is always redundant as LD sets Z. Other common ops that set Z; ST, AND, DIV, MOV, INC, DEC...
 +
 +=== Zero gremlins II: The Revenge
 +The Zero gremlin never really went away, he just changed masks.
 +
 +    ^\s+(LD|ST)\w+.*\n\s+(INC|DEC)\s+
 +    ^\s+(INC|DEC)\s+.*\n\s+(LD|ST)\w+
 +
 +The above will unmask these goblins right away!
  
 == History == History
sd/code_gremlins.1775016654.txt.gz · Last modified: by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki