diff options
author | Laszlo Ersek <lersek@redhat.com> | 2020-02-27 22:39:01 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-03-04 12:22:07 +0000 |
commit | 11ceb258f36fa5669badbac44ae4755d9885796a (patch) | |
tree | 883d36c69b11a2edc4a9f86c86fb0b44094655bc /ArmPkg/Library/CompilerIntrinsicsLib | |
parent | 1158fc8e2c7b30df8ab5f766ca64300b3b2de7e9 (diff) | |
download | edk2-11ceb258f36fa5669badbac44ae4755d9885796a.zip edk2-11ceb258f36fa5669badbac44ae4755d9885796a.tar.gz edk2-11ceb258f36fa5669badbac44ae4755d9885796a.tar.bz2 |
ArmPkg: convert LFs to CRLF, expand hard TABs
We're going to switch the internal line terminators globally to LF at some
point, but until then, let's use CRLF consistently. Convert source files
with LFs in them to CRLF, using "unix2dos".
"git show -b" prints no code changes for this patch.
(I collected all the file name suffixes in this package, with:
$ git ls-files -- $PACKAGE | rev | cut -f 1 -d . | sort -u | rev
I eliminated those suffixes that didn't stand for text files, then
blanket-converted the rest with unix2dos. Finally, picked up the actual
changes with git-add.)
At the same time, the following three files had to undergo TAB expansion:
ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.c
ArmPkg/Library/GccLto/liblto-aarch64.s
ArmPkg/Library/GccLto/liblto-arm.s
I used "expand -t 2", in order to stay close to the edk2 coding style
(which uses two spaces for indentation.)
Both the CRLF conversion and the TAB expansion are motivated by
"PatchCheck.py". "PatchCheck.py" is also the reason why CRLF conversion
and TAB expansion have to happen in the same patch.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1659
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20200227213903.13884-2-lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Diffstat (limited to 'ArmPkg/Library/CompilerIntrinsicsLib')
-rw-r--r-- | ArmPkg/Library/CompilerIntrinsicsLib/memset.c | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/memset.c b/ArmPkg/Library/CompilerIntrinsicsLib/memset.c index c5ae32e..24398d5 100644 --- a/ArmPkg/Library/CompilerIntrinsicsLib/memset.c +++ b/ArmPkg/Library/CompilerIntrinsicsLib/memset.c @@ -1,55 +1,55 @@ -//------------------------------------------------------------------------------ -// -// Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR> -// -// SPDX-License-Identifier: BSD-2-Clause-Patent -// -//------------------------------------------------------------------------------ - -typedef __SIZE_TYPE__ size_t; - -static __attribute__((__used__)) -void *__memset(void *s, int c, size_t n) -{ - unsigned char *d = s; - - while (n--) - *d++ = c; - - return s; -} - -// -// Other modules (such as CryptoPkg/IntrinsicLib) may provide another -// implementation of memset(), which may conflict with this one if this -// object was pulled into the link due to the definitions below. So make -// our memset() 'weak' to let the other implementation take precedence. -// -__attribute__((__weak__, __alias__("__memset"))) -void *memset(void *dest, int c, size_t n); - -#ifdef __arm__ - -void __aeabi_memset(void *dest, size_t n, int c) -{ - __memset(dest, c, n); -} - -__attribute__((__alias__("__aeabi_memset"))) -void __aeabi_memset4(void *dest, size_t n, int c); - -__attribute__((__alias__("__aeabi_memset"))) -void __aeabi_memset8(void *dest, size_t n, int c); - -void __aeabi_memclr(void *dest, size_t n) -{ - __memset(dest, 0, n); -} - -__attribute__((__alias__("__aeabi_memclr"))) -void __aeabi_memclr4(void *dest, size_t n); - -__attribute__((__alias__("__aeabi_memclr"))) -void __aeabi_memclr8(void *dest, size_t n); - -#endif +//------------------------------------------------------------------------------
+//
+// Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
+//
+// SPDX-License-Identifier: BSD-2-Clause-Patent
+//
+//------------------------------------------------------------------------------
+
+typedef __SIZE_TYPE__ size_t;
+
+static __attribute__((__used__))
+void *__memset(void *s, int c, size_t n)
+{
+ unsigned char *d = s;
+
+ while (n--)
+ *d++ = c;
+
+ return s;
+}
+
+//
+// Other modules (such as CryptoPkg/IntrinsicLib) may provide another
+// implementation of memset(), which may conflict with this one if this
+// object was pulled into the link due to the definitions below. So make
+// our memset() 'weak' to let the other implementation take precedence.
+//
+__attribute__((__weak__, __alias__("__memset")))
+void *memset(void *dest, int c, size_t n);
+
+#ifdef __arm__
+
+void __aeabi_memset(void *dest, size_t n, int c)
+{
+ __memset(dest, c, n);
+}
+
+__attribute__((__alias__("__aeabi_memset")))
+void __aeabi_memset4(void *dest, size_t n, int c);
+
+__attribute__((__alias__("__aeabi_memset")))
+void __aeabi_memset8(void *dest, size_t n, int c);
+
+void __aeabi_memclr(void *dest, size_t n)
+{
+ __memset(dest, 0, n);
+}
+
+__attribute__((__alias__("__aeabi_memclr")))
+void __aeabi_memclr4(void *dest, size_t n);
+
+__attribute__((__alias__("__aeabi_memclr")))
+void __aeabi_memclr8(void *dest, size_t n);
+
+#endif
|