Implement binary emission of RISC-V return instructions.

The return address is now always supplied in %x1, so the return address
predictor will recognize the jalr as a return and not some indirect
branch.
This commit is contained in:
Jakob Stoklund Olesen
2017-04-19 16:26:04 -07:00
parent 0cb36c9031
commit d66a9d196e
3 changed files with 15 additions and 6 deletions

View File

@@ -110,7 +110,7 @@ Iicmp = EncRecipe(
# I-type encoding for `jalr` as a return instruction. We won't use the
# immediate offset.
# The variable return values are not encoded.
Iret = EncRecipe('Iret', MultiAry, size=4, ins=GPR, outs=())
Iret = EncRecipe('Iret', MultiAry, size=4, ins=(), outs=())
# U-type instructions have a 20-bit immediate that targets bits 12-31.
U = EncRecipe(