Commit Graph

7 Commits

Author SHA1 Message Date
Min-Yih Hsu a65b5ddd33 [M68k][test] Migrate MC tests related to MOVEM instruciton
Since we're now supporting the (correct) assembly syntax for MOVEM since
47f52f989b. The remaining MOVEM MC tests can not be migrated into
test/MC/M68k.
2021-08-24 13:09:53 -07:00
Min-Yih Hsu 175139b6fd [M68k][NFC] Tidy up the just-migrated MC tests
Cleanup the formats of the MC tests that were just migrated. NFC
2021-08-22 22:43:02 -07:00
Min-Yih Hsu da253d5690 [M68k][test] Migrate some MOVE instruction MC tests
Migrate some MOVE instruction MC tests from test/CodeGen/M68k.
Unfortunately the tests touched in this commit were failed due to
lacking of the `abs.W` operand, which forces any memory address parsed
from assembly being represented in 32-bits.
We're temporarily allowing these unwanted widening in the tests until
the support for `abs.W` is there.
2021-08-22 22:28:40 -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 5b3dd2a490 [M68k][AsmParser] Fix invalid register name parsing logics
Adjust sanity check in register parsing function to allow register
name with more than 2 characters (e.g. ccr).

Differential Revision: https://reviews.llvm.org/D101733
2021-05-05 17:13:02 -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