mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 20:32:56 +03:00
Kernel: Move wait_cycles() function to Aarch_asm_utils.S
Just a bit of housekeeping.
This commit is contained in:
parent
18eb4a59d6
commit
d6021300d5
Notes:
sideshowbarker
2024-07-18 02:21:01 +09:00
Author: https://github.com/mundak Commit: https://github.com/SerenityOS/serenity/commit/d6021300d58 Pull-request: https://github.com/SerenityOS/serenity/pull/10403 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/jamesmintram Reviewed-by: https://github.com/linusg Reviewed-by: https://github.com/nico
@ -1,12 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2021, Nico Weber <thakis@chromium.org>
|
||||
* Copyright (c) 2021, Marcin Undak <mcinek@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
.global get_current_exception_level
|
||||
.type get_current_exception_level, @function
|
||||
get_current_exception_level:
|
||||
mrs x0, CurrentEL
|
||||
lsr x0, x0, #2
|
||||
and x0, x0, #0x3
|
||||
ret
|
||||
|
||||
.global wait_cycles
|
||||
.type wait_cycles, @function
|
||||
wait_cycles:
|
||||
Lstart:
|
||||
// This is probably too fast when caching and branch prediction is turned on.
|
||||
// FIXME: Make timer-based.
|
||||
subs x0, x0, #1
|
||||
bne Lstart
|
||||
ret
|
||||
|
@ -7,3 +7,4 @@
|
||||
#pragma once
|
||||
|
||||
extern "C" uint8_t get_current_exception_level();
|
||||
extern "C" void wait_cycles(int n);
|
||||
|
@ -30,13 +30,3 @@ Lbss_clear_loop:
|
||||
bne Lbss_clear_loop
|
||||
|
||||
b init
|
||||
|
||||
.globl wait_cycles
|
||||
.type wait_cycles, @function
|
||||
wait_cycles:
|
||||
Lstart:
|
||||
// This is probably too fast when caching and branch prediction is turned on.
|
||||
// FIXME: Make timer-based.
|
||||
subs x0, x0, #1
|
||||
bne Lstart
|
||||
ret
|
||||
|
Loading…
Reference in New Issue
Block a user