Commit Graph

5426 Commits

Author SHA1 Message Date
Oliver Stannard
4a04eb017b [ARM] Thumb2 LDR (literal) should accept PC as the destination
The version of this instruction with the .w suffix already correctly accepts
this, but the alias without the .w did not.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286446 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-10 13:20:41 +00:00
Dylan McKay
64af2512f1 [AVR] Add all of the machine code test suite
Summary: This adds all of the AVR machine code tests.

Reviewers: arsenm, kparzysz

Subscribers: wdng, japaric

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286417 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-09 23:46:25 +00:00
Ulrich Weigand
d57fec9698 [SystemZ] Add missing FP extension instructions
This completes assembler / disassembler support for all BFP
instructions provided by the floating-point extensions facility.
The instructions added here are not currently used for codegen.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286285 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-08 20:18:41 +00:00
Ulrich Weigand
c505e815ac [SystemZ] Add program mask and addressing mode instructions
Add several instructions that operate on the program mask
or the addressing mode.  These are not really needed for
code generation under Linux, but are provided for completeness
for the assembler/disassembler.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286284 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-08 20:17:02 +00:00
Ulrich Weigand
ba2fbb8f1e [SystemZ] Model access registers as LLVM registers
Add the 16 access registers as LLVM registers.  This allows removing
a lot of special cases in the assembler and disassembler where we
were handling access registers; this can all just use the generic
register code now.

Also add a bunch of instructions to operate on access registers,
for assembler/disassembler use only.  No change in code generation
intended.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286283 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-08 20:15:26 +00:00
Nirav Dave
4b0efd1095 [MC][AArch64] Cleanup end-of-line parsing in AArch64 AsmParser.
Reviewers: t.p.northover, rengolin

Subscribers: llvm-commits, aemerson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286265 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-08 18:31:04 +00:00
Ulrich Weigand
c84d2a5725 [SystemZ] Refactor branch and conditional instruction patterns
Rework patterns for branches, call & return instructions,
compare-and-branch, compare-and-trap, and conditional move
instructions.

In particular, simplify creation of patterns for the extended
opcodes of instructions that take a CC mask.

Also, use semantical instruction classes for all the instructions
instead of open-coding them in SystemZInstrInfo.td.

Adds a couple of the basic branch instructions (that are unused
for codegen) for the assembler/disassembler.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286263 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-08 18:30:50 +00:00
Weiming Zhao
7e3119cb1a Fix 24560: assembler does not share constant pool for same constants
Summary: This patch returns the same label if the CP entry with the same value has been created.

Reviewers: eli.friedman, rengolin, jmolloy

Subscribers: majnemer, jmolloy, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286006 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-04 19:17:32 +00:00
Adrian McCarthy
39374062b1 Emit S_COMPILE3 record once per TU rather than once per function
This has some ripple effects in several tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285862 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02 21:30:35 +00:00
Artem Tamazov
714be8be1c [AMDGPU][mc] Improve test of special asm symbols.
Test simplified. Coverage extended.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285844 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02 17:45:58 +00:00
Nirav Dave
965be184c4 [ARM][MC] Cleanup ARM Target Assembly Parser
Summary:
Correctly parse end-of-statement tokens and handle preprocessor
end-of-line comments in ARM assembly processor.

Reviewers: rnk, majnemer

Subscribers: aemerson, rengolin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285830 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02 16:22:51 +00:00
Nemanja Ivanovic
7e057dcd4e [PPC] add absolute difference altivec instructions and matching intrinsics
This patch corresponds to review https://reviews.llvm.org/D26072.
Committing on behalf of Sean Fertile.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285627 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-31 19:47:52 +00:00
Nirav Dave
30e34b0f1a [MC] Make llvm-mc fail cleanly on invalid output asm variant.
Fixes PR28488.

Reviewers: rnk, majnemer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285616 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-31 18:36:31 +00:00
Artem Tamazov
86d93952ed [AMDGPU][MC][gfx8] Support 20-bit immediate offset in SMEM instructions.
Fixes Bug 30808.
Note that passing subtarget information to predicates seems too complicated, so gfx8-specific def smrd_offset_20 introduced.
Old gfx6/7-specific def renamed to smrd_offset_8 for clarity.
Lit tests updated.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285590 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-31 16:07:39 +00:00
Ulrich Weigand
c1487e1e69 [SystemZ] Rework processor feature definitions and add -mcpu=archX support
This patch implements two changes:

- Move processor feature definition into a new file SystemZFeatures.td,
  and provide explicit lists of supported and unsupported features for
  each level of the z/Architecture.  This allows specifying unsupported
  features in the scheduler definition files for each processor.

- Add optional aliases for the -mcpu processor names according to the
  level of the z/Architecture, for compatibility with other compilers
  on the platform.  The supported aliases are:
    -mcpu=arch8  equals  -mcpu=z10
    -mcpu=arch9  equals  -mcpu=z196
    -mcpu=arch10 equals  -mcpu=zEC12
    -mcpu=arch11 equals  -mcpu=z13



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285577 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-31 14:33:29 +00:00
Ulrich Weigand
19e305e8e7 [SystemZ] Correctly diagnose missing features in AsmParser
Currently, when using an instruction that is not supported on the
currently selected architecture, the LLVM assembler is likely to
diagnose an "invalid operand" instead of a "missing feature".

This is because many operands require a custom parser in order to
be processed correctly, and if an instruction is not available
according to the current feature set, the generated parser code
will also not detect the associated custom operand parsers.

Fixed by temporarily enabling all features while parsing operands.
The missing features will then be correctly detected when actually
parsing the instruction itself.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285575 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-31 14:25:05 +00:00
Ulrich Weigand
b12a0a51d5 [SystemZ] Fix encoding of MVCK and .insn ss
LLVM currently treats the first operand of MVCK as if it were a
regular base+index+displacement address.  However, it is in fact
a base+displacement combined with a length register field.

While the two might look syntactically similar, there are two
semantic differences:
- %r0 is a valid length register, even though it cannot be used
  as an index register.
- In an expression with just a single register like 0(%rX), the
  register is treated as base with normal addresses, while it is
  treated as the length register (with an empty base) for MVCK.

Fixed by adding a new operand parser class BDRAddr and reworking
the assembler parser to distinguish between address + length
register operands and regular addresses.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285574 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-31 14:21:36 +00:00
Matt Arsenault
ac5efca3f0 AMDGPU: Use 1/2pi inline imm on VI
I'm guessing at how it is supposed to be printed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285490 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-29 04:05:06 +00:00
Matt Arsenault
d6028cdcc7 AMDGPU: Add definitions for scalar store instructions
Also add glc bit to the scalar loads since they exist on VI
and change the caching behavior.

This currently has an assembler bug where the glc bit is incorrectly
accepted on SI/CI which do not have it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285463 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-28 21:55:15 +00:00
Ekaterina Romanova
80b025217b Reverting back r285355: "Update .debug_line section version information to match DWARF version", while I'm investigating a test failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285362 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-27 23:20:19 +00:00
Ekaterina Romanova
e2196c5336 Update .debug_line section version information to match DWARF version.
In the past the compiler always emitted .debug_line version 2, though some opcodes from DWARF 3 (e.g. DW_LNS_set_prologue_end, DW_LNS_set_epilogue_begin or DW_LNS_set_isa) and from DWARF 4 could be emitted by the compiler. 

This patch changes version information of .debug_line to exactly match the DWARF version. For .debug_line version 4, a new field maximum_operations_per_instruction is emitted. 

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285355 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-27 22:37:25 +00:00
Nirav Dave
ebd807a35f [MC] Fix Various End Of Line Comment checkings
Fix AsmParser lines to correctly handle end-of-line pre-processor
comments parsing when '#' is not the assembly line comment prefix.

Reviewers: rnk

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284978 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-24 14:35:29 +00:00
Joel Jones
f2152944cb AArch64 ILP32 relocations for assembly and ELF
Summary:
Add relocations for AArch64 ILP32. Includes:
  - Addition of definitions for R_AARCH32_*
  - Definition of new -target-abi: ilp32
  - Definition of data layout string
  - Tests for added relocations. Not comprehensive, but matches
    existing tests for 64-bit. Renames "CHECK-OBJ" to "CHECK-OBJ-LP64".
  - Tests for llvm-readobj

Reviewers: zatrazz, peter.smith, echristo, t.p.northover

Subscribers: aemerson, rengolin, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284973 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-24 13:37:13 +00:00
Simon Dardis
7577cb98e6 [mips] synci microMIPS instruction definition.
Add synci to the microMIPS instruction definitions, mark the MIPS sync & synci
as not being part of microMIPS. This does not cover the sync instruction alias,
as that will be handled with a different patch. Add sync to the valid tests for
microMIPS.

Reviewers: vkalintiris

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284962 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-24 10:23:59 +00:00
Artem Tamazov
3398735496 [AMDGPU][mc] Fix ds_min/max[_rtn]_f32 - extra source operand removed.
Fixes Bug 28215. Lit tests updated.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284825 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-21 14:49:22 +00:00
Peter Collingbourne
f43c9c6d35 X86: Allow expressions to appear as u8imm operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284688 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-20 01:58:34 +00:00
NAKAMURA Takumi
a72922e1a6 llvm/test/MC/Mips/macro-ld-sd.s: Sweep a spurious character \xA0 in the test file.
It might crash FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284587 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-19 13:41:12 +00:00
Ulrich Weigand
bc50ab0dfa [SystemZ] Add missing vector instructions for the assembler
Most z13 vector instructions have a base form where the data type of
the operation (whether to consider the vector to be 16 bytes, 8
halfwords, 4 words, or 2 doublewords) is encoded into a mask field,
and then a set of extended mnemonics where the mask field is not
present but the data type is encoded into the mnemonic name.

Currently, LLVM only supports the type-specific forms (since those
are really the ones needed for code generation), but not the base
type-generic forms.

To complete the assembler support and make it fully compatible with
the GNU assembler, this commit adds assembler aliases for all the
base forms of the various vector instructions.

It also adds two more alias forms that are documented in the PoP:
VFPSO/VFPSODB/WFPSODB -- generic form of VFLCDB etc.
VNOT -- special variant of VNO



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284586 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-19 13:03:18 +00:00
Ulrich Weigand
a91221aaa6 [SystemZ] Add optional argument to some vector string instructions
The vfee[bhf], vfene[bhf], and vistr[bhf] assembler mnemonics are
documented in the Principles of Operation to have an optional last
operand to encode arbitrary values in a mask field.

This commit adds support for those optional operands, and cleans up
the patterns to generate vector string instruction as bit.  No change
to code generation intended.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284585 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-19 12:57:46 +00:00
Simon Dardis
4ec176ab25 [mips][ias] Handle more complicated expressions for memory operands
This patch teaches ias for mips to handle expressions such as
(8*4)+(8*31)($sp). Such expression typically occur from the expansion
of multiple macro definitions.

This partially resolves PR/30383.

Thanks to Sean Bruno for reporting the issue!

Reviewers: zoran.jovanovic, vkalintiris

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284485 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 15:17:17 +00:00
Simon Dardis
8e2c689fe9 [mips] Fix sync instruction definition
The 'sync' instruction for MIPS was defined in MIPS-II as taking no operands.
MIPS32 extended the define of 'sync' as taking an optional unsigned 5 bit
immediate.

This patch correct the definition of sync so that it is accepted with an
operand of 0 or no operand for MIPS-II to MIPS-V, and a 5 bit unsigned
immediate for MIPS32 and later revisions.

Additionally a clear error is given when the MIPS32 version of sync is
used when targeting pre MIPS32.

This partially resolves PR/30714.

Thanks to Daniel Sanders for reporting this issue!

Reveiwers: vkalintiris

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284483 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 14:42:13 +00:00
Simon Dardis
05fe9f3914 [mips] Macro expansion for ld, sd for O32
ld and sd when assembled for the O32 ABI expand to a pair of 32 bit word loads
or stores using the specified source or destination register and the next
register.

This patch does not add support for the cases where the offset is greater than
a 16 bit signed immediate as that would lead to a wrong/misleading error
message as the assembler would report "instruction requires a CPU feature
not currently enabled" for ld & sd for MIPS64 when their offset is not a signed
16 bit number.

This fixes PR/29159.

Thanks to Sean Bruno for reporting this issue!

Reviewers: vkalintiris, seanbruno, zoran.jovanovic

Differential Review: https://reviews.llvm.org/D24556


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284481 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 14:28:00 +00:00
Michael Zuckerman
d5f902eb11 [x86][inline-asm][avx512] allow swapping of '{k<num>}' & '{z}' marks
Committing on behalf of Coby Tayree: After check-all and LGTM

Desc:

AVX512 allows dest operand to be followed by an op-mask register specifier ('{k<num>}', which in turn may be followed by a merging/zeroing specifier ('{z}')
 Currently, the following forms are allowed:
 {k<num>}
 {k<num>}{z}

This patch allows the following forms:
 {z}{k<num>}

and ignores the next form:
 {z}

Justification would be quite simple - GCC

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284479 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 13:52:39 +00:00
Simon Dardis
5acb9d0671 [mips] Fix aui/daui/dahi/dati for MIPSR6
For compatiblity with binutils, define these instructions to take
two registers with a 16bit unsigned immediate. Both of the registers
have to be same for dahi and dati.

Reviewers: dsanders, zoran.jovanovic

Differential Review: https://reviews.llvm.org/D21473


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284218 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 09:31:42 +00:00
Konstantin Zhuravlyov
84208dd954 [AMDGPU] Add 32-bit lo/hi got and pc relative variant kinds and emit appropriate relocations
Differential Revision: https://reviews.llvm.org/D25548


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284195 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 04:21:32 +00:00
Simon Dardis
9f063fb182 [mips] Add IAS support for dvp, evp
These instructions were only defined for microMIPSR6 previously. Add
definitions for MIPSR6, correct definitions for microMIPSR6, flag these
instructions as having unmodelled side effects (they disable/enable
virtual processors) and add missing disassember tests for microMIPSR6.

Reviewers: vkalintiris

Differential Review: https://reviews.llvm.org/D24291


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284115 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 12:12:56 +00:00
Matt Arsenault
7e2ade4213 AMDGPU: Add instruction definitions for VGPR indexing
VI added a second method of indexing into VGPRs
besides using v_movrel*

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284027 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 18:00:51 +00:00
Nirav Dave
597ed351cb [MC] Fix Error Location for ParseIdentifier
Prevent partial parsing of '$' or '@' of invalid identifiers and fixup
workaround points. NFC Intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284017 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 13:58:07 +00:00
Konstantin Zhuravlyov
749baf326d [AMDGPU] Fix test that was broken by rL283893
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283911 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-11 18:16:56 +00:00
Bernard Ogden
e19c4b6b36 Let test pass for builds that support X86, but do not default to it
Differential Revision: https://reviews.llvm.org/D25471

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283902 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-11 16:34:49 +00:00
Diana Picus
8d8506a21e [AArch64] Allow label arithmetic with add/sub/cmp
Allow instructions such as 'cmp w0, #(end - start)' by folding the
expression into a constant. For ELF, we fold only if the symbols are in
the same section. For MachO, we fold if the expression contains only
symbols that are not linker visible.

Fixes https://llvm.org/bugs/show_bug.cgi?id=18920

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283862 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-11 09:17:47 +00:00
Tom Stellard
b44dba3340 AMDGPU/SI: Add support for 8-byte relocations
Reviewers: arsenm, kzhuravl

Subscribers: wdng, nhaehnle, yaxunl, llvm-commits, tony-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283593 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-07 20:36:58 +00:00
Artem Tamazov
97a1f765a3 [AMDGPU][mc] Add support for buffer_load_dwordx3, buffer_store_dwordx3.
Partially fixes Bug 28232.
Lit tests added.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283567 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-07 15:53:16 +00:00
Sam Kolton
a7de0c7962 [AMDGPU] Assembler: support v_mac_f32 DPP and SDWA. Move getNamedOperandIdx to AMDGPUBaseInfo.h
Reviewers: artem.tamazov, tstellarAMD

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283560 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-07 14:46:06 +00:00
Nirav Dave
c8f9ada8c6 [X86] Fix intel syntax push parsing bug
Change erroneous parsing of push immediate instructions in intel syntax
to default to pointer size by rewriting into the ATT style for matching.

This fixes PR22028.

Reviewers: majnemer, rnk

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283457 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-06 15:28:08 +00:00
Sam Kolton
665e97634e [AMDGPU] Disassembler: print label names in branch instructions
Summary: Add AMDGPUSymbolizer for finding names for labels from ELF symbol table.
Initialize MCObjectFileInfo with some default values.

Reviewers: vpykhtin, artem.tamazov, tstellarAMD

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283450 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-06 13:46:08 +00:00
Simon Dardis
27b0f61456 [mips][ias] fix li macro when values are negated with ~
The integrated assembler evaluates the expressions such as ~0x80000000 to
0xffffffff7fffffff early in the parsing process. This patch adds compatibility
with gas so that li loads the expected value (0x7fffffff) in those cases. This
only occurs iff all the upper 32bits are set and maintains existing checks by
not truncating the result down to 32 bits if any of the the upper bits are not
set.

Reviewers: dsanders, zoran.jovanovic

Differential Review: https://reviews.llvm.org/D23399


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283353 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-05 18:26:19 +00:00
Simon Dardis
e16f30e703 Recommit: "[mips] Add rsqrt, recip for MIPS"
Add rsqrt.[ds], recip.[ds] for MIPS. Correct the microMIPS definitions for
architecture support and register usage.

Reviewers: vkalintiris, zoran.jovanoic

Differential Review: https://reviews.llvm.org/D24499



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283334 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-05 16:11:01 +00:00
Simon Dardis
20d3d702f5 Revert "[mips] Add rsqrt, recip for MIPS"
This reverts commit r282485 which contain two patches instead of
one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283327 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-05 15:28:33 +00:00
Douglas Katzman
8bebbdc0d0 [X86] Don't randomly encode %rip where illegal
Differential Revision: https://reviews.llvm.org/D25112

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283326 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-05 15:23:35 +00:00