perf_counter/systick_wrapper_gcc.s

46 lines
1.8 KiB
ArmAsm
Raw Normal View History

2021-07-19 23:55:51 +01:00
;/****************************************************************************
2022-02-26 23:28:27 +00:00
;* Copyright 2022 Gorgon Meducer (Email:embedded_zhuoran@hotmail.com) *
2021-07-19 23:55:51 +01:00
;* *
;* Licensed under the Apache License, Version 2.0 (the "License"); *
;* you may not use this file except in compliance with the License. *
;* You may obtain a copy of the License at *
;* *
;* http://www.apache.org/licenses/LICENSE-2.0 *
;* *
;* Unless required by applicable law or agreed to in writing, software *
;* distributed under the License is distributed on an "AS IS" BASIS, *
;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
;* See the License for the specific language governing permissions and *
;* limitations under the License. *
;* *
;****************************************************************************/
2021-07-20 00:08:26 +01:00
.syntax unified
.arch armv6-m
2021-07-19 23:55:51 +01:00
.text
2021-07-20 00:08:26 +01:00
.thumb
.thumb_func
.align 2
.globl __wrap_SysTick_Handler
.type __wrap_SysTick_Handler, %function
2021-07-19 23:55:51 +01:00
__wrap_SysTick_Handler:
push {r4, r5}
2022-06-12 19:43:30 -04:00
push {r4, lr}
2021-10-29 00:12:40 +01:00
ldr R0, =user_code_insert_to_systick_handler
blx R0
2022-06-12 19:43:30 -04:00
pop {r4, r5}
2021-07-19 23:55:51 +01:00
mov lr, r5
pop {r4, r5}
2021-10-29 00:12:40 +01:00
ldr R0, =__real_SysTick_Handler
2021-07-19 23:55:51 +01:00
bx R0
2021-07-20 00:08:26 +01:00
.globl __ensure_systick_wrapper
.type __ensure_systick_wrapper, %function
2021-07-19 23:55:51 +01:00
__ensure_systick_wrapper:
bx lr