llvm-project/llvm/lib
Daniel Sanders f8bb23e509 [mips] Range check uimm16 and fix several bugs this revealed.
Summary:
The bugs were:
* teq and similar take 4-bit unsigned immediates on microMIPS.
* teqi and similar have side-effects like teq do.
* shll_s.w and shra_r.w take 5-bit unsigned immediates.
* The various DSP ext* instructions take a 5-bit immediate.
* repl.qh takes an 8-bit unsigned immediate.
* repl.ph takes a 10-bit unsigned immediate.
* rddsp/wrdsp take a 10-bit unsigned immediate.
* teqi and similar take signed 16-bit immediates (10-bit for microMIPS).
* Out-of-range immediate macros for or/xor take a simm32/simm64 depending
  on architecture. I'll fix the simm64 case properly when I reach simm32.

lui is a bit more lenient than GAS and accepts signed immediates in addition
to unsigned. This is because MipsMCExpr can produce signed values when
constant folding and it currently lacks a way of knowing it should fold to
an unsigned value.

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

Differential Revision: http://reviews.llvm.org/D15446

llvm-svn: 259360
2016-02-01 15:13:31 +00:00
..
Analysis [BasicAA] NFC - revised comment for function adjustToPointerSize() 2016-01-30 05:58:38 +00:00
AsmParser Remove autoconf support 2016-01-26 21:29:08 +00:00
Bitcode Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
CodeGen Improved macro emission in dwarf. 2016-02-01 14:09:41 +00:00
DebugInfo [DebugInfo] Support zero-length CIE in the _eh_frame parser 2016-01-27 14:05:35 +00:00
ExecutionEngine [RuntimeDyld][MachO] Fix handling of empty eh-frame sections. 2016-01-28 22:35:48 +00:00
Fuzzer [libFuzzer] add -timeout_exitcode option 2016-01-29 23:30:07 +00:00
IR clean up; NFC 2016-01-31 16:32:23 +00:00
IRReader Remove autoconf support 2016-01-26 21:29:08 +00:00
LTO Move MCTargetAsmParser.h to llvm/MC/MCParser where it belongs. 2016-01-27 10:01:28 +00:00
LibDriver Remove autoconf support 2016-01-26 21:29:08 +00:00
LineEditor Remove autoconf support 2016-01-26 21:29:08 +00:00
Linker Improve efficiency of handling unmapped subprogram metadata 2016-01-28 15:08:09 +00:00
MC Improved macro emission in dwarf. 2016-02-01 14:09:41 +00:00
Object Move MCTargetAsmParser.h to llvm/MC/MCParser where it belongs. 2016-01-27 10:01:28 +00:00
Option Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
Passes Remove autoconf support 2016-01-26 21:29:08 +00:00
ProfileData [Profiling] Add a -sparse mode to llvm-profdata merge 2016-01-29 22:54:45 +00:00
Support Shrink character buffer size in raw_ostream::write_hex to 16 characters intead of 20 as that's the largest string a 64-bit hex value can be. 2016-01-31 01:12:38 +00:00
TableGen Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
Target [mips] Range check uimm16 and fix several bugs this revealed. 2016-02-01 15:13:31 +00:00
Transforms Reapply commit r258404 with fix. 2016-02-01 13:38:29 +00:00
CMakeLists.txt
LLVMBuild.txt