question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

parse constants from lea instruction as both number and offset features

See original GitHub issue

we often see the lea instruction used for arithmetic e.g.

lea eax, [eax+61C88647h]

where in the above example 0x61C88647 is a magic value used in the tiny encryption algorithm (TEA).

Currently we parse 0x61C88647 as an offset feature but ideally we would also parse the value as a number feature to allow more concise rule writing. Parsing as both offset and number features would only apply to lea instructions.

Pros:

  • more concise rules for situations where lea is used for arithmetic

Cons:

  • we potentially generate many additional number features

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
mr-tzcommented, Mar 24, 2022

dup of #320 😄

0reactions
williballenthincommented, Apr 5, 2022

e.g.

image
Read more comments on GitHub >

github_iconTop Results From Across the Web

What's the purpose of the LEA instruction? - Stack Overflow
LEA , the only instruction that performs memory addressing calculations but doesn't actually address memory. LEA accepts a standard memory addressing operand, ...
Read more >
Using the LEA instruction for arbitrary arithmetic
We have no constant offset in this example, so that has been left out. rsi : This is the register used for index...
Read more >
What is the difference between LEA and MOV offset instruction ...
The simplest way to think of it is that MOV deals with data, whereas LEA deals with addresses. Both instructions are similar in...
Read more >
Midterm 2 Review LC-3
Example: LDR R1, R4, #1. R1 is loaded from address pointed by R4 with offset 1. Store instructions use the same addressing modes,...
Read more >
18. The OFFSET Operator and LEA Instruction - C-Jump
The OFFSET Operator and LEA Instruction. An address constant is a special type of immediate operand that consists of an offset or segment...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found