LLVM backend for 6502
Go to file
Ulrich Weigand a68f58ab2b [PowerPC] Always use "assembler dialect" 1
A setting in MCAsmInfo defines the "assembler dialect" to use.  This is used
by common code to choose between alternatives in a multi-alternative GNU
inline asm statement like the following:

  __asm__ ("{sfe|subfe} %0,%1,%2" : "=r" (out) : "r" (in1), "r" (in2));

The meaning of these dialects is platform specific, and GCC defines those
for PowerPC to use dialect 0 for old-style (POWER) mnemonics and 1 for
new-style (PowerPC) mnemonics, like in the example above.

To be compatible with inline asm used with GCC, LLVM ought to do the same.
Specifically, this means we should always use assembler dialect 1 since
old-style mnemonics really aren't supported on any current platform.

However, the current LLVM back-end uses:
  AssemblerDialect = 1;           // New-Style mnemonics.
in PPCMCAsmInfoDarwin, and
  AssemblerDialect = 0;           // Old-Style mnemonics.
in PPCLinuxMCAsmInfo.

The Linux setting really isn't correct, we should be using new-style
mnemonics everywhere.  This is changed by this commit.

Unfortunately, the setting of this variable is overloaded in the back-end
to decide whether or not we are on a Darwin target.  This is done in
PPCInstPrinter (the "SyntaxVariant" is initialized from the MCAsmInfo
AssemblerDialect setting), and also in PPCMCExpr.  Setting AssemblerDialect
to 1 for both Darwin and Linux no longer allows us to make this distinction.

Instead, this patch uses the MCSubtargetInfo passed to createPPCMCInstPrinter
to distinguish Darwin targets, and ignores the SyntaxVariant parameter.
As to PPCMCExpr, this patch adds an explicit isDarwin argument that needs
to be passed in by the caller when creating a target MCExpr.  (To do so
this patch implicitly also reverts commit 184441.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185858 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 20:20:51 +00:00
autoconf Reapply r185601 with a fix for the cmake build. 2013-07-04 01:10:38 +00:00
bindings We're in 3.4 land now. 2013-05-07 20:31:28 +00:00
cmake Reapply r185601 with a fix for the cmake build. 2013-07-04 01:10:38 +00:00
docs IR headers moved to llvm/IR some aeons ago, update documentation. 2013-07-08 19:59:35 +00:00
examples ExceptionDemo: Corresponding to r181820, SectionMemoryManager should belong to RTDyldMemoryManager. 2013-05-14 23:05:00 +00:00
include StringRef: add DenseMapInfo for StringRef. 2013-07-08 19:17:48 +00:00
lib [PowerPC] Always use "assembler dialect" 1 2013-07-08 20:20:51 +00:00
projects The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD. 2013-07-01 08:07:52 +00:00
runtime Remove "-Wl,-seg1addr -Wl,0xE0000000" from link options. 2013-06-04 15:26:37 +00:00
test [PowerPC] Always use "assembler dialect" 1 2013-07-08 20:20:51 +00:00
tools Create files with the correct permission instead of changing it afterwards. 2013-07-08 16:16:51 +00:00
unittests We now always create files with the correct permissions. Simplify the interface. 2013-07-08 16:42:01 +00:00
utils Extend 'readonly' and 'readnone' to work on function arguments as well as 2013-07-06 00:29:58 +00:00
.arcconfig Add .arcconfig to the repository. Useful if someone wants to use phabricator's command line tool. 2012-12-01 12:07:58 +00:00
.gitignore Add extra vim swap file pattern 2012-10-09 23:48:34 +00:00
CMakeLists.txt Support using "host" as a target in LLVM_TARGETS_TO_BUILD when using cmake. 2013-06-26 07:57:53 +00:00
CODE_OWNERS.TXT Add more owners to CODE_OWNERS.TXT (Kostya Serebryany: AddressSanitizer and ThreadSanitizer; Evgeniy Stepanov: MemorySanitizer) 2013-06-27 08:47:12 +00:00
configure Reapply r185601 with a fix for the cmake build. 2013-07-04 01:10:38 +00:00
CREDITS.TXT Identify me on IRC. 2013-06-18 22:09:36 +00:00
LICENSE.TXT Be more specific and capitalize filenames. 2013-05-21 21:22:34 +00:00
llvm.spec.in Tidy up. s/Low Level Virtual Machine/LLVM/. 2012-01-25 22:00:23 +00:00
LLVMBuild.txt LLVMBuild: Introduce a common section which currently has a list of the 2011-12-12 22:45:54 +00:00
Makefile Fix regular expression used by 'make update' to only look for 'I' and '?' at the start of svn info results and to check for spaces after 'I' instead of just after '?'. 2013-07-03 14:48:37 +00:00
Makefile.common Makefile.common: Update a description, s/Source/SOURCES/ , according to MakefileGuide.html#control-variables . 2012-12-07 01:43:23 +00:00
Makefile.config.in Add an autoconf option for turning on -gsplit-dwarf by default 2013-06-25 01:12:25 +00:00
Makefile.rules The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD. 2013-07-01 08:07:52 +00:00
README.txt test 2013-04-17 05:34:03 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.