Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Evian-Zhang committed Jul 24, 2024
1 parent ce85ce5 commit 1c3d9ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ do_something:

Although the `if`-check is just `test`-`jnz` instructions, it can still be speedup. What about making the check just a `jmp` (skip over the `do_something` branch) or `nop` (always `do_something`)? This is what static keys do. To put it simply, we **modify** the instruction at runtime. After getting the `flag` passed from commandline, we dynamically modify the `if flag {}` check to be a `jmp` or `nop` according to the `flag` value.

For example, if user-specified `flag` is `true`, the assembled instructions will be **dynamically modified** to the following `nop` instruction.
For example, if user-specified `flag` is `false`, the assembled instructions will be **dynamically modified** to the following `nop` instruction.

```x86asm
nop DWORD PTR [rax+rax*1+0x0]
Expand All @@ -43,7 +43,7 @@ do_something:
jmp do_common_routines
```

If user-specified `flag` is `false`, then we will dynamically modify the instruction to an unconditional jump instruction:
If user-specified `flag` is `true`, then we will dynamically modify the instruction to an unconditional jump instruction:

```x86asm
jmp do_something
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ do_something:

Although the `if`-check is just `test`-`jnz` instructions, it can still be speedup. What about making the check just a `jmp` (skip over the `do_something` branch) or `nop` (always `do_something`)? This is what static keys do. To put it simply, we **modify** the instruction at runtime. After getting the `flag` passed from commandline, we dynamically modify the `if flag {}` check to be a `jmp` or `nop` according to the `flag` value.

For example, if user-specified `flag` is `true`, the assembled instructions will be **dynamically modified** to the following `nop` instruction.
For example, if user-specified `flag` is `false`, the assembled instructions will be **dynamically modified** to the following `nop` instruction.

```x86asm
nop DWORD PTR [rax+rax*1+0x0]
Expand All @@ -43,7 +43,7 @@ do_something:
jmp do_common_routines
```

If user-specified `flag` is `false`, then we will dynamically modify the instruction to an unconditional jump instruction:
If user-specified `flag` is `true`, then we will dynamically modify the instruction to an unconditional jump instruction:

```x86asm
jmp do_something
Expand Down

0 comments on commit 1c3d9ab

Please sign in to comment.