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

Support for inline assembler & goto instructions in inline assembler #1326

Open
wants to merge 72 commits into
base: master
Choose a base branch
from

Conversation

WernerDrasche
Copy link

@WernerDrasche WernerDrasche commented Jan 11, 2024

Depends on goblint/cil#161.


The tests with annotations will come in very few days.
We are sorry for this (right now still) unpolished state.

Changes in goblint-cil:

  • asm is now statement
  • goto asm is parsed

Changes in analyzer: all changes are switched off by default and can be turned on by --disable asm_is_nop

  • CFG now has edges to labels referenced in goto asm label list
  • base emits new Invalidate {lvals} event (with the lvals of the out-clobbers)
  • We tried to the best of our abilities to handle this event and/or add asm transfer functions in the analyses where necessary

Simon Tietz and others added 30 commits November 17, 2023 17:09
Warns upon longjump to invalid Jumpbuf
Simon Tietz and others added 2 commits January 25, 2024 10:53
@@ -724,7 +724,7 @@ struct
Array (CArrays.set ask n (array_idx_top) v)
| t , Blob n -> Blob (Blobs.invalidate_value ask t n)
| _ , Thread tid -> Thread (Threads.join (Threads.top ()) tid)
| _ , JmpBuf _ -> state (* TODO: no top jmpbuf *)
| _ , JmpBuf (b, c, _) -> JmpBuf(b, c, true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment should probably still remain, as we normally would have to do more here but just haven't gotten around to it yet.

Simon Tietz and others added 2 commits February 1, 2024 11:43
@@ -73,6 +75,17 @@ struct
ctx.local
end

let asm ctx outs ins =
if not !ignore_asm then begin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the asm_is_top flag impact all analyses? If this check be moved into the mCP, so that it only needs to be done once?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it probably should be at the FromSpec level even. And the top-level asm_is_nop option should probably be replaced with something more organized like sem.asm.nop.

@sim642 sim642 mentioned this pull request Feb 15, 2024
3 tasks
@sim642 sim642 modified the milestones: v2.4.0, v2.5.0 Jun 25, 2024
@sim642 sim642 modified the milestones: v2.5.0, v2.6.0 Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature pr-dependency Depends or builds on another PR, which should be merged before practical-course Practical Course at TUM student-job
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants