Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/5] ARM: convert to unified syntax
@ 2019-02-07  9:48 Stefan Agner
  2019-02-07  9:48 ` [PATCH 1/5] ARM: use unified assembler in macros Stefan Agner
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Stefan Agner @ 2019-02-07  9:48 UTC (permalink / raw)
  To: linux
  Cc: nicolas.pitre, mark.rutland, arnd, ard.biesheuvel, will.deacon,
	julien.thierry, ndesaulniers, linux-kernel, Stefan Agner,
	thierry.reding, natechancellor, linux-arm-kernel

This patchset converts all assembly code to unified assembler
language (UAL) compatible assembly code. From what I can tell,
this mainly boils down to using conditional infixes instead of
postfixes.

Most of the conversion has been done using the following regular
expression:
  find ./arch/arm/ -name "*.[hSc]" -exec sed -i -r \
    "s/^((\s*[._a-zA-Z0-9]*[\:\(])?\s*)([a-z]{3})(eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)([a-z]{1,2})(\s)/\1\3\5\4\6/"
\
    {} \;

The expression resulted in some false positives and missed some
instances where infix conditionals have been used. With this
changes applied, I compiled several kernel configurations
successfully and without a warning.

The file arch/arm/probes/kprobes/test-arm.c is still using some
divided syntax assembler.

This does not allow to use LLVM's integrated assembler just yet,
there is still some assembler which the integrated assembler does
not like (yet). But it is a big step towards that direction.

--
Stefan

Stefan Agner (5):
  ARM: use unified assembler in macros
  ARM: use unified assembler in headers
  ARM: use unified assembler in assembly files
  ARM: use unified assembler in c files
  ARM: warn if divided syntax assembler is used

 arch/arm/Makefile                             |  3 --
 arch/arm/boot/bootp/init.S                    |  2 +-
 arch/arm/boot/compressed/ll_char_wr.S         |  4 +-
 arch/arm/include/asm/assembler.h              |  8 ++--
 .../include/asm/hardware/entry-macro-iomd.S   | 10 ++---
 arch/arm/include/asm/vfpmacros.h              |  8 ++--
 arch/arm/include/debug/tegra.S                |  2 +-
 arch/arm/kernel/debug.S                       |  2 +-
 arch/arm/kernel/entry-armv.S                  | 12 +++---
 arch/arm/kernel/entry-common.S                |  2 +-
 arch/arm/kernel/entry-header.S                |  8 ++--
 arch/arm/lib/bitops.h                         |  8 ++--
 arch/arm/lib/clear_user.S                     |  2 +-
 arch/arm/lib/copy_from_user.S                 |  2 +-
 arch/arm/lib/copy_page.S                      |  4 +-
 arch/arm/lib/copy_template.S                  |  4 +-
 arch/arm/lib/copy_to_user.S                   |  2 +-
 arch/arm/lib/csumpartial.S                    | 20 ++++-----
 arch/arm/lib/csumpartialcopygeneric.S         |  4 +-
 arch/arm/lib/csumpartialcopyuser.S            |  2 +-
 arch/arm/lib/div64.S                          |  4 +-
 arch/arm/lib/floppydma.S                      | 10 ++---
 arch/arm/lib/io-readsb.S                      | 20 ++++-----
 arch/arm/lib/io-readsl.S                      |  2 +-
 arch/arm/lib/io-readsw-armv3.S                |  6 +--
 arch/arm/lib/io-readsw-armv4.S                | 12 +++---
 arch/arm/lib/io-writesb.S                     | 20 ++++-----
 arch/arm/lib/io-writesl.S                     |  2 +-
 arch/arm/lib/io-writesw-armv3.S               |  2 +-
 arch/arm/lib/io-writesw-armv4.S               |  6 +--
 arch/arm/lib/lib1funcs.S                      |  4 +-
 arch/arm/lib/memcpy.S                         |  4 +-
 arch/arm/lib/memmove.S                        | 24 +++++------
 arch/arm/lib/memset.S                         | 42 +++++++++----------
 .../mach-ks8695/include/mach/entry-macro.S    |  2 +-
 arch/arm/mach-tegra/reset-handler.S           |  2 +-
 arch/arm/mm/cache-v6.S                        |  8 ++--
 arch/arm/mm/copypage-v4mc.c                   |  2 +-
 arch/arm/mm/copypage-v4wb.c                   |  2 +-
 arch/arm/mm/copypage-v4wt.c                   |  2 +-
 arch/arm/mm/proc-v7m.S                        |  4 +-
 41 files changed, 143 insertions(+), 146 deletions(-)

-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, back to index

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-07  9:48 [PATCH 0/5] ARM: convert to unified syntax Stefan Agner
2019-02-07  9:48 ` [PATCH 1/5] ARM: use unified assembler in macros Stefan Agner
2019-02-07 13:34   ` Ard Biesheuvel
2019-02-07 15:52   ` Nicolas Pitre
2019-02-07  9:48 ` [PATCH 2/5] ARM: use unified assembler in headers Stefan Agner
2019-02-07 16:10   ` Nicolas Pitre
2019-02-09 22:54     ` Stefan Agner
2019-02-07  9:48 ` [PATCH 3/5] ARM: use unified assembler in assembly files Stefan Agner
2019-02-07  9:48 ` [PATCH 4/5] ARM: use unified assembler in c files Stefan Agner
2019-02-09 17:28   ` Stefan Agner
2019-02-11 18:17     ` Nick Desaulniers
2019-02-12 19:26       ` Stefan Agner
2019-02-07  9:48 ` [PATCH 5/5] ARM: warn if divided syntax assembler is used Stefan Agner
2019-02-07 20:52   ` Nick Desaulniers

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org infradead-linux-arm-kernel@archiver.kernel.org
	public-inbox-index linux-arm-kernel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox