Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for llvm.fshl.i32 #721

Closed
weaversa opened this issue May 19, 2020 · 4 comments
Closed

Add support for llvm.fshl.i32 #721

weaversa opened this issue May 19, 2020 · 4 comments
Assignees
Labels
subsystem: crucible-llvm Issues related to LLVM bitcode verification with crucible-llvm type: enhancement Issues describing an improvement to an existing feature or capability

Comments

@weaversa
Copy link
Contributor

or llvm.fshl.i64, or any llvm.fshl.i# really...

Symbolic execution failed.
Abort due to false assumption:
  Pointer is not a function pointer:
(2, 0x0:[64])
  in XXH_rotl32 at xxhash/xxhash32-ref.c:60:36
Stack frame
  Allocations:
    
  Writes:
    
Base memory
  Allocations:
    GlobalAlloc 7 0x0:[64] Immutable 1-byte-aligned XXH_rotl32
    GlobalAlloc 6 0x0:[64] Immutable 1-byte-aligned XXH_read32
    GlobalAlloc 5 0x0:[64] Immutable 1-byte-aligned XXH32_round
    GlobalAlloc 4 0x0:[64] Immutable 1-byte-aligned XXH32_avalanche
    GlobalAlloc 3 0x0:[64] Immutable 1-byte-aligned XXH32
    GlobalAlloc 2 0x0:[64] Immutable 1-byte-aligned llvm.fshl.i32
    GlobalAlloc 1 0x0:[64] Immutable 1-byte-aligned llvm.dbg.value
  Writes:
@weaversa
Copy link
Contributor Author

Here's the intrinsic page: https://llvm.org/docs/LangRef.html#llvm-fshl-intrinsic

It turns out that if you implement the rotate function using the (shift-left | shift-right) method, llvm with -O1 (at least) just changes it into rotate.

@robdockins
Copy link
Contributor

Interesting. I haven't bumped into funnel shifts before. Looks like it should be pretty easy to implement.

@robdockins robdockins added subsystem: crucible-llvm Issues related to LLVM bitcode verification with crucible-llvm type: enhancement Issues describing an improvement to an existing feature or capability labels May 19, 2020
@robdockins robdockins self-assigned this May 19, 2020
@robdockins
Copy link
Contributor

This should be fixed once we propagate GaloisInc/crucible@e1cb3b5 into SAWScript.

@robdockins
Copy link
Contributor

I believe this is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subsystem: crucible-llvm Issues related to LLVM bitcode verification with crucible-llvm type: enhancement Issues describing an improvement to an existing feature or capability
Projects
None yet
Development

No branches or pull requests

2 participants