mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
Add sp loading
This commit is contained in:
parent
23433fb317
commit
c29da84c0e
@ -544,6 +544,9 @@ pub const timezone = extern struct {
|
||||
tz_dsttime: i32,
|
||||
};
|
||||
|
||||
// TODO I'm not sure if the code below is correct, need someone with more
|
||||
// knowledge about sparc64 linux internals to look into.
|
||||
|
||||
pub const Elf_Symndx = u32;
|
||||
|
||||
pub const fpstate = extern struct {
|
||||
|
||||
@ -147,6 +147,11 @@ fn _start() callconv(.Naked) noreturn {
|
||||
: "r0"
|
||||
);
|
||||
},
|
||||
.sparcv9 => {
|
||||
starting_stack_ptr = asm (""
|
||||
: [argc] "={o6}" (-> [*]usize)
|
||||
);
|
||||
},
|
||||
else => @compileError("unsupported arch"),
|
||||
}
|
||||
// If LLVM inlines stack variables into _start, they will overwrite
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user