Update calling convention syntax

This commit is contained in:
Sam Tebbs 2020-01-07 13:30:54 +00:00
parent 33a9e517ce
commit 33136033c1
6 changed files with 17 additions and 17 deletions

View file

@ -66,7 +66,7 @@ export var kernel_stack: [16 * 1024]u8 align(16) linksection(".bss.stack") = und
extern fn kmain() void;
export nakedcc fn _start() align(16) linksection(".text.boot") noreturn {
export fn _start() align(16) linksection(".text.boot") callconv(.Naked) noreturn {
// Set the page directory to the boot directory
asm volatile (
\\.extern boot_page_directory
@ -91,7 +91,7 @@ export nakedcc fn _start() align(16) linksection(".text.boot") noreturn {
while (true) {}
}
export nakedcc fn start_higher_half() noreturn {
export fn start_higher_half() callconv(.Naked) noreturn {
// Invalidate the page for the first 4MiB as it's no longer needed
asm volatile ("invlpg (0)");

View file

@ -48,7 +48,7 @@ pub const IdtPtr = packed struct {
base: u32,
};
pub const InterruptHandler = nakedcc fn () void;
pub const InterruptHandler = fn () callconv(.Naked) void;
/// The error set for the IDT
pub const IdtError = error{
@ -189,8 +189,8 @@ pub fn init() void {
if (build_options.rt_test) runtimeTests();
}
nakedcc fn testHandler0() void {}
nakedcc fn testHandler1() void {}
fn testHandler0() callconv(.Naked) void {}
fn testHandler1() callconv(.Naked) void {}
fn mock_lidt(ptr: *const IdtPtr) void {
expectEqual(TABLE_SIZE, ptr.limit);

View file

@ -25,7 +25,7 @@ export fn handler(ctx: *arch.InterruptContext) void {
///
/// The common assembly that all exceptions and interrupts will call.
///
export nakedcc fn commonStub() void {
export fn commonStub() callconv(.Naked) void {
asm volatile (
\\pusha
\\push %%ds
@ -63,7 +63,7 @@ export nakedcc fn commonStub() void {
///
pub fn getInterruptStub(comptime interrupt_num: u32) idt.InterruptHandler {
return struct {
nakedcc fn func() void {
fn func() callconv(.Naked) void {
asm volatile (
\\ cli
);

View file

@ -140,7 +140,7 @@ pub fn init() void {
if (build_options.rt_test) runtimeTests();
}
nakedcc fn testFunction0() void {}
fn testFunction0() callconv(.Naked) void {}
fn testFunction1(ctx: *arch.InterruptContext) void {}
fn testFunction2(ctx: *arch.InterruptContext) void {}

View file

@ -248,7 +248,7 @@ pub fn init() void {
if (build_options.rt_test) runtimeTests();
}
nakedcc fn testFunction0() void {}
fn testFunction0() callconv(.Naked) void {}
fn testFunction1(ctx: *arch.InterruptContext) void {}
fn testFunction2(ctx: *arch.InterruptContext) void {}
fn testFunction3(ctx: *arch.InterruptContext) void {}