OSDN Git Service

[RISCV] MC layer support for the standard RV32F instruction set extension
authorAlex Bradbury <asb@lowrisc.org>
Thu, 7 Dec 2017 10:26:05 +0000 (10:26 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Thu, 7 Dec 2017 10:26:05 +0000 (10:26 +0000)
commite65af32d44f2d727de5ad3dda03a60fffe3ecdb7
tree8076df901edd1b67d0be261efc48a5f5a9cbea7c
parent2bd791038b53582293a9a6e9704af1c790f2f0b7
[RISCV] MC layer support for the standard RV32F instruction set extension

The most interesting part of this patch is probably the handling of
rounding mode arguments. Sadly, the RISC-V assembler handles floating point
rounding modes as a special "argument" when it would be more consistent to
handle them like the atomics, opcode suffixes. This patch supports parsing
this optional parameter, using InstAlias to allow parsing these floating point
instructions when no rounding mode is specified.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320020 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
lib/Target/RISCV/InstPrinter/RISCVInstPrinter.cpp
lib/Target/RISCV/InstPrinter/RISCVInstPrinter.h
lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
lib/Target/RISCV/RISCV.td
lib/Target/RISCV/RISCVInstrFormats.td
lib/Target/RISCV/RISCVInstrInfo.td
lib/Target/RISCV/RISCVInstrInfoF.td [new file with mode: 0644]
lib/Target/RISCV/RISCVRegisterInfo.td
lib/Target/RISCV/RISCVSubtarget.h
test/MC/RISCV/rv32f-invalid.s [new file with mode: 0644]
test/MC/RISCV/rv32f-valid.s [new file with mode: 0644]
test/MC/RISCV/rv32i-invalid.s