Commit Graph

8 Commits

Author SHA1 Message Date
Alex Bradbury
d99baa702c [RISCV] MC layer support for the standard RV32A instruction set extension
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317791 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09 15:00:03 +00:00
Alex Bradbury
f8c0f51efe [RISCV] MC layer support for the standard RV32M instruction set extension
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317788 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09 14:46:30 +00:00
Alex Bradbury
8f5670fec2 [RISCV] RISCVAsmParser: early exit if RISCVOperand isn't immediate as expected
This is necessary to avoid an assertion in the included test case and similar 
assembler inputs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316168 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-19 16:22:51 +00:00
Alex Bradbury
afea6f4cd3 [RISCV] Bugfix createRISCVELFObjectWriter
r315275 set the IsLittleEndian parameter incorrectly. This patch corrects 
this, and adds a test to ensure such mistakes will be caught in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316091 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-18 16:11:31 +00:00
Alex Bradbury
5f9771e742 [RISCV] Add common fixups and relocations
%lo(), %hi(), and %pcrel_hi() are supported and test cases have been added to 
ensure the appropriate fixups and relocations are generated. I've added an 
instruction format field which is used in RISCVMCCodeEmitter to, for 
instance, tell whether it should emit a lo12_i fixup or a lo12_s fixup 
(RISC-V has two 12-bit immediate encodings depending on the instruction 
type).

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314389 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-28 08:26:24 +00:00
Alex Bradbury
a1c2bb91ad [RISCV] Add support for disassembly
This Disassembly support allows for 'round-trip' testing, and rv32i-valid.s
has been updated appropriately.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313486 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-17 14:36:28 +00:00
Alex Bradbury
26132ea8ed [RISCV] Add support for all RV32I instructions
This patch supports all RV32I instructions as described in the RISC-V manual.
A future patch will add support for pseudoinstructions and other instruction
expansions (e.g. 0-arg fence -> fence iorw, iorw).

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313485 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-17 14:27:35 +00:00
Alex Bradbury
1de4891dd5 [RISCV] Add RISCVInstPrinter and basic MC assembler tests
With the addition of RISCVInstPrinter, it is now possible to test the basic 
operation of the RISCV MC layer.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310917 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-15 13:08:29 +00:00