llvm/tools
Daniel Sanders 007417372d [mips][ias] Fix all the hacks related to MIPS-specific unary operators (%hi/%lo/%gp_rel/etc.).
Summary:
They are now lexed as a single token on targets where
MCAsmInfo::HasMipsExpressions is true and then parsed in a similar way to
the '~' operator as part of MCExpr::parseExpression.

As a result:
* expressions and immediates no longer have different parsing rules. The
  difference is now solely down to whether evaluateAsAbsolute() succeeds.
* %hi(%neg(%gp_rel(x))) are no longer parsed as a single operator and
  decomposed into the three MipsMCExpr nodes. They are parsed directly as
  three MipsMCExpr nodes.
  * parseMemOperand no longer needs to eat all the surrounding parenthesis
    to get at the outermost operator to make this work
* %hi(%neg(%gp_rel(x))) and %lo(%neg(%gp_rel(x))) are no longer the only
  3-in-1 relocs that parse for N64. They're still the only combinations that
  are permitted in relocatable expressions though. Fixing that should be a
  later patch.
* We no longer need to list all the tokens that can occur as the first token of
  an expression or immediate.

test/MC/Mips/expr1.s:
    This change also prevents the incorrect lowering of %lo(2*4)+foo to
    %lo(8+foo) which is not an equivalent expression (the difference is
    whether foo is truncated to 16-bit or not) and the test has been
    updated to account for the macro expansion the correct expression requires.

Reviewers: sdardis

Subscribers: dsanders, sdardis, llvm-commits

Differential Revision: https://reviews.llvm.org/D23110

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277988 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-08 09:20:52 +00:00
..
bugpoint [bugpoint] Add a -Os option 2016-07-31 19:25:16 +00:00
bugpoint-passes Remove autoconf support 2016-01-26 21:29:08 +00:00
dsymutil Resubmit "Make YAML support SmallVector" 2016-08-05 23:12:31 +00:00
gold [ThinLTO/gold] Support for getting list of included objects from gold 2016-07-22 18:20:22 +00:00
llc CommandFlags.h/llc: Move StopAfter/StartBefore options to llc. 2016-08-02 23:36:06 +00:00
lli [ORC] Re-apply r277896, removing bogus triples and datalayouts that broke tests 2016-08-06 22:36:26 +00:00
llvm-ar Clean up of libObject/Archive interfaces and change the last three uses of ErrorOr<> 2016-08-03 21:57:47 +00:00
llvm-as Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-as-fuzzer Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
llvm-bcanalyzer Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-c-test Add support for callsite in the new C API for attributes 2016-06-15 05:14:29 +00:00
llvm-config [llvm-config][GlobalISel] Canonicalize LLVM_HAS_GLOBAL_ISEL on ON/OFF. 2016-07-21 17:26:47 +00:00
llvm-cov [llvm-cov] Add some documentation for the -tab-size option 2016-08-04 18:00:42 +00:00
llvm-cxxdump [Object] Re-apply r275316 now that I have the corresponding LLD patch ready. 2016-07-14 02:24:01 +00:00
llvm-diff [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
llvm-dis IR: Allow metadata attachments on declarations, and fix lazy loaded metadata issue with globals. 2016-06-21 23:42:48 +00:00
llvm-dwarfdump Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-dwp MC] Provide an MCTargetOptions to implementors of MCAsmBackendCtorTy, NFC 2016-07-25 17:18:28 +00:00
llvm-extract Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-go [llvm-go] parameterize $GOPATH construction 2016-07-27 03:21:51 +00:00
llvm-jitlistener Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-link Don't verify inputs to the Linker if ODR merging. 2016-06-29 18:31:48 +00:00
llvm-lto Move legacy LTO interface headers to legacy/ directory. 2016-07-14 21:21:16 +00:00
llvm-mc [mips][ias] Fix all the hacks related to MIPS-specific unary operators (%hi/%lo/%gp_rel/etc.). 2016-08-08 09:20:52 +00:00
llvm-mc-fuzzer [llvm-mc-fuzzer] Use LLVMFuzzerInitialize() instead of a custom main() and FuzzerDriver() 2016-05-13 10:23:04 +00:00
llvm-mcmarkup Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-nm Add the first of what will be a long line of additional error checks for invalid Mach-O files. 2016-08-05 18:19:40 +00:00
llvm-objdump Reapply "More fixes to get good error messages for bad archives." 2016-08-03 19:02:50 +00:00
llvm-pdbdump [CodeView] Decouple record deserialization from visitor dispatch. 2016-08-05 21:45:34 +00:00
llvm-profdata llvm-profdata: Clarify the top level help 2016-08-03 23:10:51 +00:00
llvm-readobj [CodeView] Decouple record deserialization from visitor dispatch. 2016-08-05 21:45:34 +00:00
llvm-rtdyld [ExecutionEngine][MCJIT][Orc] Replace RuntimeDyld::SymbolInfo with JITSymbol. 2016-08-01 20:49:11 +00:00
llvm-shlib Revert "[CMake] LINK_LIBS need to be public for Darwin dylib targets" 2016-05-26 04:35:35 +00:00
llvm-size Add the first of what will be a long line of additional error checks for invalid Mach-O files. 2016-08-05 18:19:40 +00:00
llvm-split Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
llvm-stress [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
llvm-symbolizer Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
lto Move legacy LTO interface headers to legacy/ directory. 2016-07-14 21:21:16 +00:00
msbuild MSBuild integration: fix the loop in install.bat 2014-09-30 22:30:06 +00:00
obj2yaml [macho2yaml] String table can contain null strings 2016-08-04 19:19:25 +00:00
opt opt: Adding -O0 to opt tool 2016-08-05 16:27:33 +00:00
sancov [Object] Re-apply r275316 now that I have the corresponding LLD patch ready. 2016-07-14 02:24:01 +00:00
sanstats [Symbolize] Check if the PE file has a PDB and emit an error if we can't load it 2016-06-03 20:25:09 +00:00
verify-uselistorder Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
xcode-toolchain [CMake] Updating Xcode Toolchain creation to support Xcode 7 2016-07-26 00:47:52 +00:00
yaml2obj [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
CMakeLists.txt Fixup r271533, or check-clang didn't find llvm-lto as the target. 2016-06-02 20:39:24 +00:00
LLVMBuild.txt llvm-dwp: Initial layout 2015-12-01 00:48:34 +00:00