2013-01-25 12:28:06 +01:00
|
|
|
#/** @file
|
|
|
|
# Compiler intrinsic for ARM compiler
|
|
|
|
#
|
|
|
|
# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
2019-04-04 01:03:18 +02:00
|
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
2013-01-25 12:28:06 +01:00
|
|
|
#
|
|
|
|
#**/
|
2014-08-19 15:29:52 +02:00
|
|
|
#
|
2013-01-25 12:28:06 +01:00
|
|
|
|
2016-08-10 14:38:08 +02:00
|
|
|
#include <AsmMacroIoLib.h>
|
2013-01-25 12:28:06 +01:00
|
|
|
|
2016-08-10 14:38:08 +02:00
|
|
|
.syntax unified
|
2013-01-25 12:28:06 +01:00
|
|
|
|
2016-08-10 14:38:08 +02:00
|
|
|
ASM_FUNC(__switch16)
|
2013-01-25 12:28:06 +01:00
|
|
|
ldrh ip, [lr, #-1]
|
|
|
|
cmp r0, ip
|
|
|
|
add r0, lr, r0, lsl #1
|
2015-12-15 16:01:42 +01:00
|
|
|
ldrshcc r0, [r0, #1]
|
2013-01-25 12:28:06 +01:00
|
|
|
add ip, lr, ip, lsl #1
|
2015-12-15 16:01:42 +01:00
|
|
|
ldrshcs r0, [ip, #1]
|
2013-01-25 12:28:06 +01:00
|
|
|
add ip, lr, r0, lsl #1
|
|
|
|
bx ip
|
|
|
|
|
|
|
|
|