summaryrefslogtreecommitdiff
path: root/ArmPkg/Library/BaseMemoryLibVstm/Arm
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-08-31 09:50:23 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-09-01 15:03:00 +0100
commit5322ee484b54bc78023383a546971b601dcc4ce1 (patch)
treed94a94e613ad1b1776634687604e8e7215b8b28c /ArmPkg/Library/BaseMemoryLibVstm/Arm
parenta0cf6b8d93d7fab44f8bcb850ebbe696d0c3d4bd (diff)
downloadedk2-platforms-5322ee484b54bc78023383a546971b601dcc4ce1.tar.xz
ArmPkg: remove BaseMemoryLibVstm implementation of BaseMemoryLib
The BaseMemoryLibVstm implementation of BaseMemoryLib is ARM only, uses the NEON register file despite the fact that the UEFI spec does not allow it, and is currently not used anywhere. So remove it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPkg/Library/BaseMemoryLibVstm/Arm')
-rw-r--r--ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S112
-rw-r--r--ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm114
-rw-r--r--ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S76
-rw-r--r--ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm78
4 files changed, 0 insertions, 380 deletions
diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S b/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S
deleted file mode 100644
index 69de4c1fd4..0000000000
--- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S
+++ /dev/null
@@ -1,112 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# CopyMem() worker for ARM
-#
-# This file started out as C code that did 64 bit moves if the buffer was
-# 32-bit aligned, else it does a byte copy. It also does a byte copy for
-# any trailing bytes. Update using VSTM/SLDM to do 128 byte copies.
-#
-# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-#------------------------------------------------------------------------------
-
-#include <AsmMacroIoLib.h>
-
-/**
- Copy Length bytes from Source to Destination. Overlap is OK.
-
- This implementation
-
- @param Destination Target of copy
- @param Source Place to copy from
- @param Length Number of bytes to copy
-
- @return Destination
-
-
-VOID *
-EFIAPI
-InternalMemCopyMem (
- OUT VOID *DestinationBuffer,
- IN CONST VOID *SourceBuffer,
- IN UINTN Length
- )
-**/
-ASM_FUNC(InternalMemCopyMem)
- stmfd sp!, {r4, r9, lr}
- tst r0, #3
- mov r4, r0
- mov r9, r0
- mov ip, r2
- mov lr, r1
- movne r0, #0
- bne L4
- tst r1, #3
- movne r3, #0
- moveq r3, #1
- cmp r2, #127
- movls r0, #0
- andhi r0, r3, #1
-L4:
- cmp r4, r1
- bcc L26
- bls L7
- rsb r3, r1, r4
- cmp ip, r3
- bcc L26
- cmp ip, #0
- beq L7
- add r9, r4, ip
- add lr, ip, r1
- b L16
-L29:
- sub ip, ip, #8
- cmp ip, #7
- ldrd r2, [lr, #-8]!
- movls r0, #0
- cmp ip, #0
- strd r2, [r9, #-8]!
- beq L7
-L16:
- cmp r0, #0
- bne L29
- sub r3, lr, #1
- sub ip, ip, #1
- ldrb r3, [r3, #0]
- sub r2, r9, #1
- cmp ip, #0
- sub r9, r9, #1
- sub lr, lr, #1
- strb r3, [r2, #0]
- bne L16
- b L7
-L11:
- ldrb r3, [lr], #1
- sub ip, ip, #1
- strb r3, [r9], #1
-L26:
- cmp ip, #0
- beq L7
-L30:
- cmp r0, #0
- beq L11
- sub ip, ip, #128 // 32
- cmp ip, #127 // 31
- vldm lr!, {d0-d15}
- movls r0, #0
- cmp ip, #0
- vstm r9!, {d0-d15}
- bne L30
-L7:
- dsb
- mov r0, r4
- ldmfd sp!, {r4, r9, pc}
-
-
diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm b/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm
deleted file mode 100644
index 5afd1e5f2b..0000000000
--- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm
+++ /dev/null
@@ -1,114 +0,0 @@
-;------------------------------------------------------------------------------
-;
-; CopyMem() worker for ARM
-;
-; This file started out as C code that did 64 bit moves if the buffer was
-; 32-bit aligned, else it does a byte copy. It also does a byte copy for
-; any trailing bytes. Update using VSTM/SLDM to do 128 byte copies.
-;
-; Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
-; This program and the accompanying materials
-; are licensed and made available under the terms and conditions of the BSD License
-; which accompanies this distribution. The full text of the license may be found at
-; http://opensource.org/licenses/bsd-license.php
-;
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-;
-;------------------------------------------------------------------------------
-
-/**
- Copy Length bytes from Source to Destination. Overlap is OK.
-
- This implementation
-
- @param Destination Target of copy
- @param Source Place to copy from
- @param Length Number of bytes to copy
-
- @return Destination
-
-
-VOID *
-EFIAPI
-InternalMemCopyMem (
- OUT VOID *DestinationBuffer,
- IN CONST VOID *SourceBuffer,
- IN UINTN Length
- )
-**/
-
- INCLUDE AsmMacroExport.inc
-
- RVCT_ASM_EXPORT InternalMemCopyMem
- stmfd sp!, {r4, r9, lr}
- tst r0, #3
- mov r4, r0
- mov r9, r0
- mov ip, r2
- mov lr, r1
- movne r0, #0
- bne L4
- tst r1, #3
- movne r3, #0
- moveq r3, #1
- cmp r2, #127
- movls r0, #0
- andhi r0, r3, #1
-L4
- cmp r4, r1
- bcc L26
- bls L7
- rsb r3, r1, r4
- cmp ip, r3
- bcc L26
- cmp ip, #0
- beq L7
- add r9, r4, ip
- add lr, ip, r1
- b L16
-L29
- sub ip, ip, #8
- cmp ip, #7
- ldrd r2, [lr, #-8]!
- movls r0, #0
- cmp ip, #0
- strd r2, [r9, #-8]!
- beq L7
-L16
- cmp r0, #0
- bne L29
- sub r3, lr, #1
- sub ip, ip, #1
- ldrb r3, [r3, #0]
- sub r2, r9, #1
- cmp ip, #0
- sub r9, r9, #1
- sub lr, lr, #1
- strb r3, [r2, #0]
- bne L16
- b L7
-L11
- ldrb r3, [lr], #1
- sub ip, ip, #1
- strb r3, [r9], #1
-L26
- cmp ip, #0
- beq L7
-L30
- cmp r0, #0
- beq L11
- sub ip, ip, #128 // 32
- cmp ip, #127 // 31
- vldm lr!, {d0-d15}
- movls r0, #0
- cmp ip, #0
- vstm r9!, {d0-d15}
- bne L30
-L7
- dsb
- mov r0, r4
- ldmfd sp!, {r4, r9, pc}
-
- END
-
diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S b/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S
deleted file mode 100644
index 28ba38b79c..0000000000
--- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S
+++ /dev/null
@@ -1,76 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# SemMem() worker for ARM
-#
-# This file started out as C code that did 64 bit moves if the buffer was
-# 32-bit aligned, else it does a byte copy. It also does a byte copy for
-# any trailing bytes. Update to use VSTM/VLDM to do 128 byte writes.
-#
-# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-#------------------------------------------------------------------------------
-
-#include <AsmMacroIoLib.h>
-
-/**
- Set Buffer to Value for Size bytes.
-
- @param Buffer Memory to set.
- @param Length Number of bytes to set
- @param Value Value of the set operation.
-
- @return Buffer
-
-VOID *
-EFIAPI
-InternalMemSetMem (
- OUT VOID *Buffer,
- IN UINTN Length,
- IN UINT8 Value
- )
-**/
-ASM_FUNC(InternalMemSetMem)
- stmfd sp!, {r4-r7, lr}
- tst r0, #3
- movne r3, #0
- moveq r3, #1
- cmp r1, #127
- movls lr, #0
- andhi lr, r3, #1
- cmp lr, #0
- mov r12, r0
- bne L31
-L32:
- mov r3, #0
- b L43
-L31:
- vdup.8 q0,r2
- vmov q1,q0
- vmov q2,q0
- vmov q3,q0
- vmov q4,q0
- vmov q5,q0
- vmov q6,q0
- vmov q7,q0
- b L32
-L34:
- cmp lr, #0
- streqb r2, [r12], #1
- subeq r1, r1, #1
- beq L43
- sub r1, r1, #128
- cmp r1, #127
- cmp r1, #31
- movls lr, r3
- vstm r12!, {d0-d15}
-L43:
- cmp r1, #0
- bne L34
- ldmfd sp!, {pc}
diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm b/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm
deleted file mode 100644
index c4a7c2b720..0000000000
--- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm
+++ /dev/null
@@ -1,78 +0,0 @@
-;------------------------------------------------------------------------------
-;
-; SetMem() worker for ARM
-;
-; This file started out as C code that did 64 bit moves if the buffer was
-; 32-bit aligned, else it does a byte copy. It also does a byte copy for
-; any trailing bytes. Update to use VSTM/VLDM to do 128 byte writes.
-;
-; Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
-; This program and the accompanying materials
-; are licensed and made available under the terms and conditions of the BSD License
-; which accompanies this distribution. The full text of the license may be found at
-; http://opensource.org/licenses/bsd-license.php
-;
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-;
-
-/**
- Set Buffer to Value for Size bytes.
-
- @param Buffer Memory to set.
- @param Length Number of bytes to set
- @param Value Value of the set operation.
-
- @return Buffer
-
-VOID *
-EFIAPI
-InternalMemSetMem (
- OUT VOID *Buffer,
- IN UINTN Length,
- IN UINT8 Value
- )
-**/
-
-
- INCLUDE AsmMacroExport.inc
-
- RVCT_ASM_EXPORT InternalMemSetMem
- stmfd sp!, {lr}
- tst r0, #3
- movne r3, #0
- moveq r3, #1
- cmp r1, #127
- movls lr, #0
- andhi lr, r3, #1
- cmp lr, #0
- mov r12, r0
- bne L31
-L32
- mov r3, #0
- b L43
-L31
- vdup.8 q0,r2
- vmov q1,q0
- vmov q2,q0
- vmov q3,q0
- vmov q4,q0
- vmov q5,q0
- vmov q6,q0
- vmov q7,q0
- b L32
-L34
- cmp lr, #0
- streqb r2, [r12], #1
- subeq r1, r1, #1
- beq L43
- sub r1, r1, #128
- cmp r1, #127
- movls lr, r3
- vstm r12!, {d0-d15}
-L43
- cmp r1, #0
- bne L34
- ldmfd sp!, {pc}
-
- END