Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

Consider trading conditional branch ranges for more type D instructions #104

Closed
mbitsnbites opened this issue Mar 27, 2020 · 2 comments
Closed
Milestone

Comments

@mbitsnbites
Copy link
Member

We currently have 8 conditional branches. We could combine all branch instructions into a single type-D instructions by reducing the branch range by 3 bits (from 21 bits to 18 bits).

Motivation:

  • Type-D instruction space is very limited.
  • Conditional branches typically do not need a very wide address range.
@mbitsnbites
Copy link
Member Author

Another thing to consider for conditional branch instructions is a branch-hint field (provided that we have bits to spare and we're going for a completely new instruction encoding format anyway). It would typically require two bits, e.g.:

Hint Meaning
00 No hint
01 No hint (reserved)
10 The branch is very likely not to be taken
11 The branch is very likely to be taken

@mbitsnbites
Copy link
Member Author

Yet another thing to consider is if we want to reserve a bit in the instruction encoding for the possibility to use a vector register as a branch condition (see https://www.bitsnbites.eu/ideas-for-mrisc32-vector-operations/).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant