From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- .../Library/CompilerIntrinsicsLib/Arm/switch32.S | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 roms/edk2/ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch32.S (limited to 'roms/edk2/ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch32.S') diff --git a/roms/edk2/ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch32.S b/roms/edk2/ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch32.S new file mode 100644 index 000000000..fbf72dd5f --- /dev/null +++ b/roms/edk2/ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch32.S @@ -0,0 +1,23 @@ +#/** @file +# Compiler intrinsic for ARM compiler +# +# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# +#**/ +# + +#include + +.syntax unified + +ASM_FUNC(__switch32) + ldr ip, [lr, #-1] + cmp r0, ip + add r0, lr, r0, lsl #2 + ldrcc r0, [r0, #3] + add ip, lr, ip, lsl #2 + ldrcs r0, [ip, #3] + add ip, lr, r0 + bx ip + -- cgit 1.2.3-korg