This is an archive of the discontinued LLVM Phabricator instance.

[M68k] Add addressing modes ARIPI and ARIPD support for BTST
ClosedPublic

Authored by Jim on Jan 4 2022, 12:16 AM.

Details

Summary

BTST missed ARIPI and ARIPD addressing modes support.

Diff Detail

Unit TestsFailed

Event Timeline

Jim created this revision.Jan 4 2022, 12:16 AM
Jim requested review of this revision.Jan 4 2022, 12:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2022, 12:16 AM
Jim edited the summary of this revision. (Show Details)Jan 4 2022, 12:19 AM
Jim added reviewers: myhsu, ricky26.
Jim updated this revision to Diff 398030.Jan 6 2022, 6:55 PM

Rebase

glaubitz added a subscriber: myhsu.Jan 14 2022, 1:04 PM
glaubitz added a subscriber: glaubitz.

Style is fine, tests run clean for me.

llvm/test/MC/M68k/Bits/Classes/MxBTST_MI.s
15

I'm not sure whether this is defined behaviour. The spec I have says that BTST with a register for the bit number wraps, but doesn't specify that behaviour for the immediate mode, so it probably works. Additionally, I don't think it would be signed, but again, I suspect it'll still work (-1 will be interpreted as 31).

myhsu added a comment.Jan 16 2022, 9:28 PM

This revision seems to be in conflict with D116993 . How are you going to resolve it? (e.g. rebasing this one on top of D116993 and setup a dependency)

Jim added a comment.Jan 19 2022, 9:27 PM

This revision seems to be in conflict with D116993 . How are you going to resolve it? (e.g. rebasing this one on top of D116993 and setup a dependency)

This revision is parent of D116993. It doesn't depend on D116993. I am going to resolve issue in D116993 you mentioned.

Jim marked an inline comment as done.Jan 19 2022, 9:36 PM
llvm/test/MC/M68k/Bits/Classes/MxBTST_MI.s
15

The spec for BTST mentioned When a data register is the destination, any of the 32 bits can be specified by a modulo 32- bit number. When a memory location is the destination, the operation is a byte operation, and the bit number is modulo 8.

Maybe have another revision to forbid signed number as immediate operand in the future.

The reference spec: https://www.nxp.com/files-static/archives/doc/ref_manual/M68000PRM.pdf

Jim marked an inline comment as done.Jan 26 2022, 6:05 PM

Kindly ping.

myhsu accepted this revision.Jan 27 2022, 2:55 AM

This revision seems to be in conflict with D116993 . How are you going to resolve it? (e.g. rebasing this one on top of D116993 and setup a dependency)

This revision is parent of D116993. It doesn't depend on D116993. I am going to resolve issue in D116993 you mentioned.

Sorry I missed this comment. LGTM now

llvm/test/MC/M68k/Bits/Classes/MxBTST_MI.s
15

Maybe have another revision to forbid signed number as immediate operand in the future.

GNU AS currently supports negative immediate so I'm incline not to remove this feature.

This revision is now accepted and ready to land.Jan 27 2022, 2:55 AM
This revision was automatically updated to reflect the committed changes.