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

Stoke can't handle inlined memset #912

Open
jrkoenig opened this issue Jun 1, 2016 · 1 comment
Open

Stoke can't handle inlined memset #912

jrkoenig opened this issue Jun 1, 2016 · 1 comment

Comments

@jrkoenig
Copy link
Contributor

jrkoenig commented Jun 1, 2016

It appears when the memset() function call gets inlined, it is implemented with the instruction:

rep stosq %es:(%rdi)

x64asm claims this is not encodable within 3 bytes, probably due to the segment register (which on 64 is always zero anyway, but is the only way to encode stosq)

@bchurchill
Copy link
Member

The underlying problem is that we don't have sandbox support for any rep
instructions. This shouldn't be too hard to add, but it will require
mucking with the sandbox code. I'm not sure about x64asm support.

The easiest workaround is to get your compiler to create a real loop that
does memset and inline that.
On Jun 1, 2016 12:22, "Jason R Koenig" [email protected] wrote:

It appears when the memset() function call gets inlined, it is implemented
with the instruction:

rep stosq %es:(%rdi)

x64asm claims this is not encodable within 3 bytes, probably due to the
segment register (which on 64 is always zero anyway, but is the only way to
encode stosq)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#912, or mute the thread
https://github.com/notifications/unsubscribe/AAnG6TBLWoKcDAB8AH0Bqe3PAtYJj_9Oks5qHdv-gaJpZM4Ir44b
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants