Comments (4)
Some thoughts:
ZExt
andSExt
return value attributes. We should probably also find a way to put these attributes intoFunctionDecl
s as well.- Investigate downstream uses of the value. Is it used in an arithmetic (signed) or logical shift (unsinged), in an unsigned or signed divide, in an add or sub with certain overflow characteristics, etc.
from anvill.
A function annotated to return a zext
integer should produce a return value type of an unsigned integer, and a function annotated to return a sext
integer should produce a return value type of a signed integer.
When parsing a function type or a function return value, if the integer type is un/signed, then we should add the corresponding zext
or sext
attributes.
from anvill.
Can someone explain why we need this? I thought the only thing that matters in LLVM-land is the comparisons, which are signed or unsigned, while all integers are always unsigned?
from anvill.
So I think when I first opened this issue I was trying to translate LLVM bitcode into a "spec". If I recall correctly this spec is basically a mapping of the llvm function signature to architecture specific set of memory locations and/or registers. When generating this spec it is useful to know whether or not an LLVM integer is signed or unsigned so we can keep that information in the spec.
The problem I was trying to tackle in this issue is to figure out from LLVM bitcode if an integer variable is signed or unsigned.
As @pgoodman suggested above, one simple way to do it is to inspect instructions involving that variable and see if we can deduce the signedness of it. Here is a very simple example where that approach would work: https://godbolt.org/z/j4YbjaTPq.
from anvill.
Related Issues (20)
- Assertion in LLVM hit in unit tests for `BrightenPointerOperations` pass HOT 1
- Missed pointer lifting opportunity for comparisons of pointers
- Implement optimization pass to remove `__anvill` switch intrinsics HOT 2
- Entry Point Return Addresses on Spec Export HOT 1
- Add a method to TypeProvider that passes in a caller address when looking up a callee function type HOT 1
- Q0 register support for ARMv7 HOT 3
- Have a way of annotating llvm instructions with the architecture HOT 1
- error linking with doctest lib HOT 2
- DSE and Sinking performance regression in LLVM 14
- Use anvill with IDA Home
- Remove obsolete LLVM version checks
- Rewrite ConvertIntegerToPointerOperations pass to not rely on pointer types
- Possible Regression in Address to Entity Uses
- Build fails with latest Remill HOT 1
- Return Address not eliminated for x86-64 HOT 1
- State escape with fizz_buzz
- Warnings from `test_anvill`
- Document what the compatibility with the new low-level lift architecture is for each pass HOT 5
- a solution tool to the "anvill-specify-bitcode(Currently unsupported)" HOT 1
- python plugin for IDA error: get_context_assignments_for_addr isn't implementation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anvill.