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

start of base of ASM building #35

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

zarlo
Copy link
Collaborator

@zarlo zarlo commented Feb 6, 2025

No description provided.

@valentinbreiz
Copy link
Owner

hello @zarlo, should not we focus on x64 since NativeAOT barely supports x32? I think we should focus on x64 and ARM

@ascpixi
Copy link

ascpixi commented Feb 27, 2025

Are we sure we need the X# builder API surface? While it would be nice, I think it'd be a lot more code to maintain, especially given the fact that x86-64 has a lot of ISA extensions itself. If we're limiting inline assembly to the minimum, wouldn't X# be extremely underutilized in this scenario?

I believe that we could get by if we only did what is currently known as LiteralAssemblerCode in IL2CPU. That is, when defining an inline assembly method, we would do the following:

[InlineAssembly]
public static void ReadCr3() {
  InlineAssembly.Literal("""
    mov rax, cr3
    ret
  """);
}

...or, alternatively:

[InlineAssembly(
  """
    mov rax, cr3
    ret
  """
)]
public static extern void ReadCr3();

The latter would be easier to manipulate from compile-time IL weavers. That is, we would only need to read custom attribute data, rather than interpret known IL patterns.

@valentinbreiz
Copy link
Owner

valentinbreiz commented Mar 1, 2025

I think we may discuss with coredevs regarding XSharp @zarlo
before completely removing it
to identify our objectives and needs

@zarlo
Copy link
Collaborator Author

zarlo commented Mar 1, 2025

@valentinbreiz ill keep working on the build tasks i am not (build asm and link the objects in to one) as we will need it either way

@zarlo zarlo mentioned this pull request Mar 4, 2025
@zarlo zarlo changed the title [WIP] start of base of XSharp 3 [WIP] start of base of ASM building Mar 8, 2025
@zarlo zarlo changed the title [WIP] start of base of ASM building start of base of ASM building Mar 8, 2025
@zarlo zarlo marked this pull request as ready for review March 8, 2025 23:09
@zarlo
Copy link
Collaborator Author

zarlo commented Mar 10, 2025

im going to wait for #43 so this can be easily tested

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.

3 participants