[PATCH] D108598: [ARC] Add codegen for the readcyclecounter intrinsic along with disassembly for associated instructions
Thomas Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 23 16:53:04 PDT 2021
thomasjohns created this revision.
thomasjohns added a reviewer: marksl.
Herald added a subscriber: hiraditya.
thomasjohns requested review of this revision.
Herald added a project: LLVM.
This adds lowering rules for the `llvm.readcyclecounter` intrinsic along with a codegen test for the ARC backend. To perform the lowering, we needed to generate the LR (Load from Auxiliary Register) instruction to read from the `COUNT0` timer register (which has number 33 or 0x22). Thus, this patch also adds support for the LR instruction with both LR_rs12 and LR_ru6 immediate formats along with custom disassembler code and tests.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D108598
Files:
llvm/lib/Target/ARC/ARCISelLowering.cpp
llvm/lib/Target/ARC/ARCISelLowering.h
llvm/lib/Target/ARC/ARCInstrFormats.td
llvm/lib/Target/ARC/ARCInstrInfo.td
llvm/lib/Target/ARC/Disassembler/ARCDisassembler.cpp
llvm/test/CodeGen/ARC/intrinsics.ll
llvm/test/MC/Disassembler/ARC/ldst.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108598.368238.patch
Type: text/x-patch
Size: 9659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210823/bc1b903f/attachment.bin>
More information about the llvm-commits
mailing list