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

amd64: removes embeddings of pointers of bit masks for FP arithmetics #648

Merged
merged 2 commits into from
Jun 22, 2022

Conversation

mathetake
Copy link
Member

@mathetake mathetake commented Jun 22, 2022

This removes part of the embeddings of raw pointers (uintptr) into the
native code on amd64 backed. Specifically, this removes the embeddings
of bit mask constants used for FP arithmetic.

This is necessary to make compiled code reusable across multiple
processes.

part of #618

Signed-off-by: Takeshi Yoneda <[email protected]>
@mathetake mathetake changed the title amd64: remove the embedding of pointers for floating point arithmetics amd64: remove the embedding of pointers of bit masks for FP arithmetics Jun 22, 2022
@mathetake mathetake changed the title amd64: remove the embedding of pointers of bit masks for FP arithmetics amd64: removes embeddings of pointers of bit masks for FP arithmetics Jun 22, 2022
@mathetake mathetake marked this pull request as ready for review June 22, 2022 03:44
)

func init() {
// TODO: what if these address exceed 32-bit address space? Even though AMD says 2GB memory space
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the TODO this PR resolves

panic("CompileLoadStaticConstToRegister cannot be supported by golang-asm")
// CompileStaticConstToRegister implements Assembler.CompileStaticConstToRegister.
func (ta *testAssembler) CompileStaticConstToRegister(asm.Instruction, []byte, asm.Register) (err error) {
panic("CompileStaticConstToRegister cannot be supported by golang-asm")
Copy link
Contributor

Choose a reason for hiding this comment

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

I can see a near future where this module ends up not usable anymore ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah for sure eventually removed :D

@mathetake mathetake merged commit 4136a36 into main Jun 22, 2022
@mathetake mathetake deleted the pieamd64 branch June 22, 2022 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants