Commit Graph

10 Commits

Author SHA1 Message Date
Sheng cf0b6df6db [M68k][Disassembler] Adopt the new variable length decoder
This is an example usage of D120958.

After these patches are landed, we can strip off the codebeads officially.

Reviewed By: myhsu

Differential Revision: https://reviews.llvm.org/D120960
2022-05-15 08:44:58 +08:00
Sheng 4306fbff9c Revert "Revert "[M68k] Adopt VarLenCodeEmitter for control instructions""
This reverts commit 69a7d49de6.

llvm/test/MC/M68k/Relaxations/branch.s needs disassembler support.

So I disabled it temporarily
2022-02-16 17:41:49 +08:00
Sheng 69a7d49de6 Revert "[M68k] Adopt VarLenCodeEmitter for control instructions"
This reverts commit 9ffd498fcb.

This patch introduce regression on MC/M68k/Relaxations/branch.s
2022-02-16 17:09:46 +08:00
Sheng 9ffd498fcb [M68k] Adopt VarLenCodeEmitter for control instructions
Refactor the instructions in M68kInstrControl.td to use the VarLenCodeEmitter.

This patch is tested by the existing test cases.

Reviewed By: myhsu, ricky26

Differential Revision: https://reviews.llvm.org/D119665
2022-02-16 12:54:20 +08:00
Jim Lin 30d739603c [M68k][test][NFC] Remove new line at end of file 2022-01-05 17:05:54 +08:00
Min-Yih Hsu 28868027f7 [M68k][test] Migrate the remaining fixup and relaxation tests
Migrate the tests regarding fixup and relaxation on branch and call
targets.
This patch wraps up the migration from `test/CodeGen/M68k/Encoding` to
`test/MC/M68k`.
2021-09-04 16:27:13 -07:00
Min-Yih Hsu 7cbcde4aa3 [M68k] Use separate asm operand class for different widths of address
This could help asm parser to pick the correct variant of instruction.
This patch also migrated all the control instructions MC tests.
2021-08-09 00:07:19 -07:00
Min-Yih Hsu f6d7fc801b [M68k][test][NFC] Scrubing some tests
Remove unecessary labels and assembly directives. NFC.
2021-05-05 17:48:28 -07:00
Min-Yih Hsu abac6023bb [M68k][AsmParser] Support negative integer constants
Parsing negative integer constants as expressions.

Differential Revision: https://reviews.llvm.org/D101732
2021-05-05 17:11:59 -07:00
Min-Yih Hsu 34da083a8c [M68k][test] Initial migration of MC tests
As the context depicted by bug 49865[1], we are migrating tests under
`test/CodeGen/M68k/Encoding`, which was originally used to test
instruction encoding using MIR file as input, into `test/MC/M68k`. We
are also adding test directives for AsmParser using the same set of
inputs.

Currently we are converting the original MIR test files into assembly
code as well as translating the original LIT "RUN" statement into one
that only uses built-in LLVM tools (i.e. Get rid of `extract-section`).

However, since AsmParser has not completely finished, many of these
original test cases fail. Thus, this patch only migrate test files
that are passed by the current implementation of AsmParser (and
MCCodeEmitter). The remaining tests (under test/CodeGen/M68k/Encoding)
will be ported alone with the patch that fixes the related issues.

[1]: https://bugs.llvm.org/show_bug.cgi?id=49865

Differential Revision: https://reviews.llvm.org/D101410
2021-05-05 17:11:35 -07:00