Skip to content

Conversation

@garrettgu10
Copy link

Right now, it seems like the CS_MODE_RISCVC mode is not used anywhere in the RISCV backend. We should enable or disable the compressed instructions based on whether or not the CS_MODE_RISCVC mode is specified.

Right now, it seems like the CS_MODE_RISCVC mode is not used anywhere in the RISCV backend. We should enable or disable the compressed instructions based on whether or not the CS_MODE_RISCVC mode is specified.
@garrettgu10
Copy link
Author

@tmfink @fanfuqiang

Can you please review this? Thank you!

RISCV_FeatureStdExtA | RISCV_FeatureStdExtF |
RISCV_FeatureStdExtD ;
RISCV_FeatureStdExtD |
(mode & CS_MODE_RISCVC ? RISCV_FeatureStdExtC: 0l) ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be cleaner to not try to put everything on one line. E.g.

    uint64_t ret = M | A | F | D;
    if (mode & CS_MODE_RISCV64)
        ret |= 64Bit;
    if (mode & CD_MODE_RISCVC)
        ret |= C;
    return ret;

@rth7680 rth7680 mentioned this pull request Sep 12, 2020
@aquynh
Copy link
Collaborator

aquynh commented Sep 15, 2020

can you look at #1682? if that is merged, this PR is not necessary anymore.

@aquynh
Copy link
Collaborator

aquynh commented Sep 16, 2020

close this since we merged the other one, thanks!

@aquynh aquynh closed this Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants