-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
arch-x86_6464-bit x8664-bit x86backend-self-hostedenhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.
Milestone
Description
Zig Version
0.15.1
Steps to Reproduce and Observed Behavior
Create a zig file called reproduce.zig.
// Should not run on OS systems, but should compile
pub fn main() !void {
const sel: u64 = 0x80;
// Should load the segment selector 0x80 into CS
asm volatile (
\\ push %[sel]
\\ lea finish(%%rip), %%rax
\\ push %%rax
\\ lretq
\\ finish:
:
: [sel] "r" (sel),
: .{ .rax = true });
}zig build-exe reproduce.zig
$ zig build-exe reproduce.zig
reproduce.zig:1:5: error: invalid mnemonic: 'lretq'
pub fn main() !void {
~~~~^~~~~~~~~~~~~~~Expected Behavior
Inline assembly assembles
Metadata
Metadata
Assignees
Labels
arch-x86_6464-bit x8664-bit x86backend-self-hostedenhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.