Christoffer Lerno

Results 1217 comments of Christoffer Lerno

Ok, let's continue the discussion there.

I've done some research: - MSVC x86 inline asm is well loved, but lacks the ability to integrate well with the compiler and is overly pessimistic. MSVC decided to only...

An example: ```c __asm__("movq $100, %%rdx\t\n" "addq %1,%2" : "=r" (sum) : "r" (a), "0" (b) : "%rdx"); ``` In order to write this MSVC style, we'd have to do...

I terms of string literal I was thinking this would be a thing to remove, but then I realized that if one has a multiline string then the problem mostly...

Noting that output and input aren't ambiguous, would it make sense to put them together? ```c asm{""" mov rdx, 100 add %2,%1 """} sum: "=r", a: "r", b: "0", "%rdx";...

You should be able to do that with the current asm though?

Writing `asm("... asm here ...");` should work.

No, the inline asm is too limited, it doesn't allow you to pass arguments for example, it can just take a string which it sends to LLVM, which then assumes...

Yeah, so currently you can't really do that nicely (it should work with a @naked function where one could return the value in the right register)

Isn't there a C syscall function in Linux? If so then you should be able to call it simply by declaring (on x64): ```c extern fn long syscall(long, ...); ```