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

fix a bug on the handling of #VPEXTR_8 and #VPEXTR_16 #394

Merged
merged 3 commits into from
Mar 22, 2023

Conversation

bacelar
Copy link
Collaborator

@bacelar bacelar commented Mar 19, 2023

Attempt to fix a bug in the handling of #VPEXTR_8 and #VPEXTR_16, which are currently miscompiled into "vpextrq".

@vbgl
Copy link
Member

vbgl commented Mar 20, 2023

Thanks. It seems that the semantics of the instruction is also wrong: the value of the immediate argument is truncated depending to the given size. Currently, the semantics overlooks this detail.

@bacelar
Copy link
Collaborator Author

bacelar commented Mar 20, 2023

Thanks. It seems that the semantics of the instruction is also wrong: the value of the immediate argument is truncated depending to the given size. Currently, the semantics overlooks this detail.

right, that's true. I'll fix that and return back later. It appears that the same issue might also be present in other instructions (at first sight, it appears to be the case for the VPINSR instruction -- I'll to look at it also...)

@vbgl vbgl self-assigned this Mar 21, 2023
@vbgl
Copy link
Member

vbgl commented Mar 21, 2023

Many thanks. I’ll test a bit and add a CHANGELOG entry.

@vbgl
Copy link
Member

vbgl commented Mar 22, 2023

I thought I would be able to push myself to this branch. But I can’t. So I’ll bother you Bacelar: can you please add a changelog entry? Here is what I had:

--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -96,6 +96,10 @@
   fixes [#385](https://github.com/jasmin-lang/jasmin/issues/385)),
   [#386](https://github.com/jasmin-lang/jasmin/issues/386)).

+- Fix compilation and semantics of the `VPEXTR` and `VPINSR` instructions
+  ([PR #394](https://github.com/jasmin-lang/jasmin/pull/394);
+  fixes [#395](https://github.com/jasmin-lang/jasmin/issues/395)).
+
 ## Other changes

 - Explicit if-then-else in flag combinations is no longer supported

@vbgl vbgl added the bug label Mar 22, 2023
@vbgl vbgl merged commit 7711d4b into jasmin-lang:main Mar 22, 2023
vbgl pushed a commit that referenced this pull request Mar 22, 2023
* fix a bug on the handling of #VPEXTR_8 and #VPEXTR_16

* fix semantics of VPEXTR and VPINSR

* add CHANGELOG entry

---------

Co-authored-by: José Bacelar Almeida <jba@di.uminho.pt>
(cherry picked from commit 7711d4b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants