[18/*] So another option would be to get serious about inline assembler, and make a pleasant-to-use, well specific ASM syntax that can be placed in C. I'd be fine with either.
-
Show this thread
-
-
-
-
-
Replying to @cmuratori @yvz_gny
Disclaimer: I'm not a Zig zealot or even a user so this isn't a recommendation: inline asm input/output/clobbering syntax does look like someone put thought into it. https://ziglang.org/documentation/master/#Assembly …
1 reply 0 retweets 0 likes -
Except it doesn't? That looks exactly as crappy as the CLANG version, where the syntax is unreadable due to tons of unnecessary markup.
1 reply 0 retweets 0 likes -
Replying to @cmuratori @yvz_gny
Not disagreeing, but curious (again, not zealot / defending Zig at all)- I'd want to see a 1:1 mapping of variables to registers, then my asm code, then a map from regs I care about to output values. I do agree that syntax is gross but don't have any better ideas :( Got anything?
2 replies 0 retweets 0 likes -
I actually don't want that. I want automatic register assignment most of the time, and only when I want to manually specify all registers do I want to do that. Most of the time if I specify the exact ASM stream a register allocator can figure it out.
1 reply 0 retweets 0 likes -
Replying to @cmuratori @yvz_gny
Ah yeah, gotcha, kinda like MSVC: "__asm { mov ecx, my_c_var }" with no restrictions except that they fit? Agree, that would be nice.
1 reply 0 retweets 0 likes
Casey Muratori Retweeted Ryan Flaherty
JAI has this now, BTW.https://twitter.com/rflaherty71/status/1422785381729177601 …
Casey Muratori added,
-
-
Replying to @cmuratori @yvz_gny
That's .... very cool. Thanks for linking!1 reply 0 retweets 0 likes -
Unlike all the languages I am constantly asked about, look at, and think are uninteresting (Rust/Zig/nim/etc.), JAI is actually very exciting. It has a lot of really smart stuff in it so far, I think.
1 reply 0 retweets 9 likes - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.