llvm-project/llvm/test/CodeGen/LoongArch
Weining Lu c063f9da55 [LoongArch] Add EncoderMethods for transformed immediate operands
This is a split patch of D120476 and thanks to myhsu.

'Transformed' means the encoding of an immediate is not the same as
its binary representation. For example, the `bl` instruction
requires a signed 28-bits integer as its operand and the low 2 bits
must be 0. So only the upper 26 bits are needed to get encoded into
the instruction.

Based on the above reason this kind of immediate needs a customed
`EncoderMethod` to get the real value getting encoded into the
instruction.

Currently these immediate includes:
```
  uimm2_plus1
  simm14_lsl2
  simm16_lsl2
  simm21_lsl2
  simm26_lsl2
```

This patch adds those `EncoderMethod`s and revises related .mir test
in previous patch.

Reviewed By: xen0n, MaskRay

Differential Revision: https://reviews.llvm.org/D120545
2022-03-07 16:47:26 +08:00
..
1ri.mir [LoongArch] Add EncoderMethods for transformed immediate operands 2022-03-07 16:47:26 +08:00
2r.mir [LoongArch] Add missing dollar prefix to register name in InstPrinter 2022-02-18 09:41:08 +08:00
2ri.mir [LoongArch] Add EncoderMethods for transformed immediate operands 2022-03-07 16:47:26 +08:00
3r.mir [LoongArch] Fix atomic instructions operands sequence 2022-02-19 09:22:10 +08:00
3ri.mir [LoongArch] Add EncoderMethods for transformed immediate operands 2022-03-07 16:47:26 +08:00
lit.local.cfg [LoongArch][test] (6/6) Add encoding and mnemonics tests 2022-02-10 10:23:34 +00:00
misc.mir [LoongArch] Add EncoderMethods for transformed immediate operands 2022-03-07 16:47:26 +08:00
target_support.ll